From 98cd695571ca5ace55ee6646468e88eefef89ee8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 5 Nov 2026 20:56:53 +0000 Subject: [PATCH] Regenerate client from commit bd8dd57 of spec repo --- .generator/schemas/v2/openapi.yaml | 7466 ++++++++++++- .../ai-gateway/BulkCreateAiGatewayModels.java | 51 + .../v2/ai-gateway/CreateAiGatewayBudget.java | 58 + .../CreateAiGatewayDataCaptureOverride.java | 60 + .../v2/ai-gateway/CreateAiGatewayModel.java | 45 + .../ai-gateway/CreateAiGatewayModelGroup.java | 54 + .../ai-gateway/CreateAiGatewayProvider.java | 79 + .../ai-gateway/CreateAiGatewayRateLimit.java | 47 + .../CreateAiGatewayRoutingRule.java | 62 + .../v2/ai-gateway/DeleteAiGatewayBudget.java | 25 + .../DeleteAiGatewayDataCaptureOverride.java | 51 + .../v2/ai-gateway/DeleteAiGatewayModel.java | 24 + .../ai-gateway/DeleteAiGatewayModelGroup.java | 24 + .../DeleteAiGatewayModelPricing.java | 24 + .../v2/ai-gateway/DeleteAiGatewayPolicy.java | 24 + .../ai-gateway/DeleteAiGatewayProvider.java | 24 + .../ai-gateway/DeleteAiGatewayRateLimit.java | 25 + .../DeleteAiGatewayRoutingRule.java | 24 + .../v2/ai-gateway/GetAiGatewayBudget.java | 28 + .../GetAiGatewayBudgetCurrentPeriod.java | 29 + .../GetAiGatewayBudgetInstancesSummary.java | 29 + .../GetAiGatewayDataCaptureConfiguration.java | 28 + .../v2/ai-gateway/GetAiGatewayGovernance.java | 26 + .../v2/ai-gateway/GetAiGatewayModelGroup.java | 26 + .../ai-gateway/GetAiGatewayModelPricing.java | 27 + .../v2/ai-gateway/GetAiGatewayPolicy.java | 26 + .../v2/ai-gateway/GetAiGatewayProvider.java | 26 + .../v2/ai-gateway/GetAiGatewayRateLimit.java | 29 + .../GetAiGatewayRateLimitUsage.java | 26 + .../ai-gateway/GetAiGatewayRoutingRule.java | 26 + ...ListAiGatewayBudgetInstanceDimensions.java | 30 + .../ListAiGatewayBudgetInstances.java | 29 + .../v2/ai-gateway/ListAiGatewayBudgets.java | 26 + .../ai-gateway/ListAiGatewayModelGroups.java | 26 + .../v2/ai-gateway/ListAiGatewayModels.java | 26 + .../ListAiGatewayModelsByCanonical.java | 26 + .../v2/ai-gateway/ListAiGatewayPolicies.java | 26 + .../ListAiGatewayProviderModels.java | 27 + .../v2/ai-gateway/ListAiGatewayProviders.java | 26 + .../ai-gateway/ListAiGatewayRateLimits.java | 26 + .../ai-gateway/ListAiGatewayRoutingRules.java | 26 + ...errideAiGatewayBudgetInstanceCapacity.java | 45 + .../ResetAiGatewayBudgetInstanceSpend.java | 43 + .../v2/ai-gateway/UpdateAiGatewayBudget.java | 51 + .../UpdateAiGatewayDataCaptureOverride.java | 61 + .../ai-gateway/UpdateAiGatewayGovernance.java | 50 + .../v2/ai-gateway/UpdateAiGatewayModel.java | 46 + .../ai-gateway/UpdateAiGatewayModelGroup.java | 46 + .../UpdateAiGatewayModelPricing.java | 55 + .../ai-gateway/UpdateAiGatewayProvider.java | 41 + .../ai-gateway/UpdateAiGatewayRateLimit.java | 50 + .../UpdateAiGatewayRoutingRule.java | 62 + .../v2/ai-gateway/UpsertAiGatewayPolicy.java | 53 + .../com/datadog/api/client/ApiClient.java | 52 + .../api/client/v2/api/AiGatewayApi.java | 9344 +++++++++++++++++ .../v2/model/AiGatewayBudgetAttributes.java | 605 ++ .../AiGatewayBudgetCreateAttributes.java | 456 + .../v2/model/AiGatewayBudgetCreateData.java | 185 + .../model/AiGatewayBudgetCreateRequest.java | 149 + .../v2/model/AiGatewayBudgetEnforcement.java | 57 + .../AiGatewayBudgetInstanceAttributes.java | 339 + ...getInstanceCapacityOverrideAttributes.java | 210 + ...wayBudgetInstanceCapacityOverrideData.java | 189 + ...BudgetInstanceCapacityOverrideRequest.java | 154 + ...ewayBudgetInstanceDimensionAttributes.java | 321 + ...ayBudgetInstanceDimensionListResponse.java | 169 + ...atewayBudgetInstanceDimensionResource.java | 217 + .../AiGatewayBudgetInstanceDimensionType.java | 60 + ...AiGatewayBudgetInstanceDimensionValue.java | 205 + .../AiGatewayBudgetInstanceListResponse.java | 201 + ...iGatewayBudgetInstanceResetAttributes.java | 174 + .../AiGatewayBudgetInstanceResetData.java | 187 + .../AiGatewayBudgetInstanceResetRequest.java | 151 + .../AiGatewayBudgetInstanceResource.java | 214 + .../AiGatewayBudgetInstanceResponse.java | 151 + .../v2/model/AiGatewayBudgetInstanceSort.java | 61 + .../v2/model/AiGatewayBudgetInstanceType.java | 57 + ...tewayBudgetInstancesSummaryAttributes.java | 349 + ...GatewayBudgetInstancesSummaryResource.java | 218 + ...GatewayBudgetInstancesSummaryResponse.java | 153 + .../AiGatewayBudgetInstancesSummaryType.java | 59 + .../model/AiGatewayBudgetListAttributes.java | 733 ++ .../v2/model/AiGatewayBudgetListResource.java | 214 + .../v2/model/AiGatewayBudgetListResponse.java | 164 + .../AiGatewayBudgetPeriodAttributes.java | 347 + .../model/AiGatewayBudgetPeriodResource.java | 214 + .../model/AiGatewayBudgetPeriodResponse.java | 150 + .../v2/model/AiGatewayBudgetPeriodType.java | 57 + .../v2/model/AiGatewayBudgetResource.java | 213 + .../v2/model/AiGatewayBudgetResponse.java | 148 + .../model/AiGatewayBudgetSelectorEntry.java | 214 + .../client/v2/model/AiGatewayBudgetType.java | 54 + .../AiGatewayBudgetUpdateAttributes.java | 347 + .../v2/model/AiGatewayBudgetUpdateData.java | 214 + .../model/AiGatewayBudgetUpdateRequest.java | 149 + .../v2/model/AiGatewayBudgetWindowPolicy.java | 60 + ...AiGatewayCaptureConfigurationResponse.java | 152 + ...tewayCaptureConfigurationResponseData.java | 219 + ...reConfigurationResponseDataAttributes.java | 299 + ...tionResponseDataAttributesDefaultMode.java | 67 + ...yCaptureConfigurationResponseDataType.java | 63 + .../model/AiGatewayCaptureCreateRequest.java | 150 + .../AiGatewayCaptureCreateRequestData.java | 218 + ...wayCaptureCreateRequestDataAttributes.java | 401 + ...aptureCreateRequestDataAttributesMode.java | 65 + ...eCreateRequestDataAttributesOperation.java | 67 + ...AiGatewayCaptureCreateRequestDataType.java | 62 + .../model/AiGatewayCaptureDeleteRequest.java | 150 + .../AiGatewayCaptureDeleteRequestData.java | 218 + ...wayCaptureDeleteRequestDataAttributes.java | 349 + ...aptureDeleteRequestDataAttributesMode.java | 65 + ...eDeleteRequestDataAttributesOperation.java | 67 + ...AiGatewayCaptureDeleteRequestDataType.java | 62 + .../v2/model/AiGatewayCaptureOverride.java | 413 + .../model/AiGatewayCaptureOverrideMode.java | 59 + .../AiGatewayCaptureOverrideResponse.java | 151 + .../AiGatewayCaptureOverrideResponseData.java | 218 + ...CaptureOverrideResponseDataAttributes.java | 326 + ...ureOverrideResponseDataAttributesMode.java | 65 + ...atewayCaptureOverrideResponseDataType.java | 63 + .../model/AiGatewayCaptureResponseScope.java | 157 + .../v2/model/AiGatewayCaptureScope.java | 160 + .../model/AiGatewayCaptureUpdateRequest.java | 150 + .../AiGatewayCaptureUpdateRequestData.java | 218 + ...wayCaptureUpdateRequestDataAttributes.java | 400 + ...aptureUpdateRequestDataAttributesMode.java | 65 + ...eUpdateRequestDataAttributesOperation.java | 67 + ...AiGatewayCaptureUpdateRequestDataType.java | 62 + ...tewayCustomProviderSupportedOperation.java | 68 + .../v2/model/AiGatewayDataCaptureMode.java | 59 + .../AiGatewayDiscoveredModelAttributes.java | 216 + .../AiGatewayDiscoveredModelListResponse.java | 166 + .../AiGatewayDiscoveredModelResource.java | 216 + .../model/AiGatewayDiscoveredModelType.java | 57 + .../model/AiGatewayGovernanceAttributes.java | 230 + .../AiGatewayGovernanceReplaceAttributes.java | 232 + .../model/AiGatewayGovernanceReplaceData.java | 215 + .../AiGatewayGovernanceReplaceRequest.java | 151 + .../v2/model/AiGatewayGovernanceResource.java | 213 + .../v2/model/AiGatewayGovernanceResponse.java | 149 + .../v2/model/AiGatewayGovernanceType.java | 56 + .../v2/model/AiGatewayKnownProvider.java | 80 + .../v2/model/AiGatewayMaxReasoningLevel.java | 64 + .../model/AiGatewayMetadataCaptureItem.java | 86 + .../v2/model/AiGatewayModelCapabilities.java | 283 + .../AiGatewayModelCatalogEntryAttributes.java | 406 + .../AiGatewayModelCatalogEntryIdentifier.java | 181 + ...iGatewayModelCatalogEntryListResponse.java | 167 + .../AiGatewayModelCatalogEntryResource.java | 216 + .../AiGatewayModelCatalogEntryResponse.java | 151 + .../model/AiGatewayModelCatalogEntryType.java | 58 + .../model/AiGatewayModelCreateAttributes.java | 219 + .../v2/model/AiGatewayModelCreateData.java | 185 + .../v2/model/AiGatewayModelCreateRequest.java | 149 + .../model/AiGatewayModelGroupAttributes.java | 523 + .../v2/model/AiGatewayModelGroupBinding.java | 187 + .../AiGatewayModelGroupBindingRelation.java | 63 + .../AiGatewayModelGroupCreateAttributes.java | 372 + .../model/AiGatewayModelGroupCreateData.java | 185 + .../AiGatewayModelGroupCreateRequest.java | 151 + .../AiGatewayModelGroupListResponse.java | 165 + .../v2/model/AiGatewayModelGroupModel.java | 431 + .../v2/model/AiGatewayModelGroupProvider.java | 174 + .../v2/model/AiGatewayModelGroupResource.java | 213 + .../v2/model/AiGatewayModelGroupResponse.java | 149 + .../model/AiGatewayModelGroupRoutingRule.java | 145 + .../v2/model/AiGatewayModelGroupType.java | 57 + .../AiGatewayModelGroupUpdateAttributes.java | 362 + .../model/AiGatewayModelGroupUpdateData.java | 213 + .../AiGatewayModelGroupUpdateRequest.java | 151 + .../client/v2/model/AiGatewayModelInput.java | 216 + .../client/v2/model/AiGatewayModelLimits.java | 193 + .../v2/model/AiGatewayModelMetadata.java | 637 ++ .../v2/model/AiGatewayModelMetadataKind.java | 66 + .../AiGatewayModelMetadataLifecycle.java | 64 + .../model/AiGatewayModelMetadataSource.java | 294 + ...AiGatewayModelMetadataSourceMatchedBy.java | 75 + .../model/AiGatewayModelMetadataStatus.java | 62 + .../v2/model/AiGatewayModelModalities.java | 182 + .../AiGatewayModelPricingAttributes.java | 175 + ...tewayModelPricingCatalogRequestConfig.java | 159 + ...tewayModelPricingCatalogRequestSource.java | 127 + ...yModelPricingCatalogRequestSourceType.java | 62 + .../v2/model/AiGatewayModelPricingConfig.java | 243 + ...atewayModelPricingCustomRequestConfig.java | 162 + ...atewayModelPricingCustomRequestSource.java | 98 + ...ayModelPricingCustomRequestSourceType.java | 62 + .../AiGatewayModelPricingEffectiveSource.java | 64 + .../v2/model/AiGatewayModelPricingRates.java | 175 + .../model/AiGatewayModelPricingRequest.java | 150 + ...iGatewayModelPricingRequestAttributes.java | 152 + .../AiGatewayModelPricingRequestConfig.java | 310 + .../AiGatewayModelPricingRequestData.java | 215 + .../AiGatewayModelPricingRequiredRates.java | 194 + .../model/AiGatewayModelPricingResponse.java | 150 + .../AiGatewayModelPricingResponseData.java | 214 + .../v2/model/AiGatewayModelPricingSource.java | 179 + .../AiGatewayModelPricingSourceType.java | 60 + .../v2/model/AiGatewayModelPricingType.java | 57 + .../v2/model/AiGatewayModelReasoning.java | 163 + .../model/AiGatewayModelReasoningControl.java | 244 + .../AiGatewayModelReasoningControlType.java | 63 + .../model/AiGatewayModelReferencePrice.java | 354 + .../client/v2/model/AiGatewayModelSource.java | 56 + .../model/AiGatewayModelUpdateAttributes.java | 182 + .../v2/model/AiGatewayModelUpdateData.java | 213 + .../v2/model/AiGatewayModelUpdateRequest.java | 149 + .../AiGatewayModelsBulkCreateAttributes.java | 166 + .../model/AiGatewayModelsBulkCreateData.java | 186 + .../AiGatewayModelsBulkCreateRequest.java | 151 + .../AiGatewayModelsByCanonicalAttributes.java | 199 + ...iGatewayModelsByCanonicalListResponse.java | 167 + .../AiGatewayModelsByCanonicalResource.java | 216 + .../model/AiGatewayModelsByCanonicalType.java | 58 + .../AiGatewayNullableMaxReasoningLevel.java | 72 + ...atewayNullableRoutingRuleTierOrdering.java | 70 + .../v2/model/AiGatewayPolicyAttributes.java | 193 + .../v2/model/AiGatewayPolicyListResponse.java | 164 + .../v2/model/AiGatewayPolicyRequest.java | 148 + .../AiGatewayPolicyRequestAttributes.java | 222 + .../v2/model/AiGatewayPolicyRequestData.java | 185 + .../v2/model/AiGatewayPolicyResource.java | 212 + .../v2/model/AiGatewayPolicyResponse.java | 148 + .../v2/model/AiGatewayPolicyTarget.java | 240 + .../model/AiGatewayPolicyTargetRequest.java | 194 + .../client/v2/model/AiGatewayPolicyTier.java | 163 + .../v2/model/AiGatewayPolicyTierRequest.java | 193 + .../client/v2/model/AiGatewayPolicyType.java | 56 + .../v2/model/AiGatewayProviderAttributes.java | 366 + .../AiGatewayProviderCreateAttributes.java | 403 + .../v2/model/AiGatewayProviderCreateData.java | 185 + .../model/AiGatewayProviderCreateRequest.java | 150 + .../AiGatewayProviderInitialBinding.java | 189 + ...GatewayProviderInitialBindingRelation.java | 65 + .../AiGatewayProviderIntegrationConfig.java | 302 + .../model/AiGatewayProviderListResponse.java | 164 + .../v2/model/AiGatewayProviderModelEntry.java | 402 + .../AiGatewayProviderModelsRelationship.java | 166 + .../model/AiGatewayProviderRelationships.java | 151 + .../v2/model/AiGatewayProviderResource.java | 244 + .../v2/model/AiGatewayProviderResponse.java | 200 + .../v2/model/AiGatewayProviderType.java | 54 + .../AiGatewayProviderUpdateAttributes.java | 167 + .../v2/model/AiGatewayProviderUpdateData.java | 213 + .../model/AiGatewayProviderUpdateRequest.java | 150 + .../model/AiGatewayRateLimitAttributes.java | 662 ++ .../AiGatewayRateLimitCreateAttributes.java | 400 + .../model/AiGatewayRateLimitCreateData.java | 185 + .../AiGatewayRateLimitCreateRequest.java | 151 + .../model/AiGatewayRateLimitListResponse.java | 165 + .../v2/model/AiGatewayRateLimitMode.java | 57 + .../v2/model/AiGatewayRateLimitResource.java | 214 + .../v2/model/AiGatewayRateLimitResponse.java | 149 + .../v2/model/AiGatewayRateLimitType.java | 57 + .../AiGatewayRateLimitUpdateAttributes.java | 452 + .../model/AiGatewayRateLimitUpdateData.java | 214 + .../AiGatewayRateLimitUpdateRequest.java | 151 + .../AiGatewayRateLimitUsageAttributes.java | 268 + .../AiGatewayRateLimitUsageListResponse.java | 165 + .../AiGatewayRateLimitUsageResource.java | 215 + .../v2/model/AiGatewayRateLimitUsageType.java | 57 + .../model/AiGatewayRestrictedDetailsMeta.java | 147 + .../model/AiGatewayRoutingReasoningLevel.java | 87 + .../model/AiGatewayRoutingRuleAttributes.java | 251 + .../AiGatewayRoutingRuleCreateAttributes.java | 196 + .../model/AiGatewayRoutingRuleCreateData.java | 187 + .../AiGatewayRoutingRuleCreateRequest.java | 151 + .../AiGatewayRoutingRuleListResponse.java | 165 + ...AiGatewayRoutingRuleReplaceAttributes.java | 166 + .../AiGatewayRoutingRuleReplaceData.java | 215 + .../AiGatewayRoutingRuleReplaceRequest.java | 151 + .../model/AiGatewayRoutingRuleResource.java | 213 + .../model/AiGatewayRoutingRuleResponse.java | 150 + .../v2/model/AiGatewayRoutingRuleTarget.java | 375 + .../AiGatewayRoutingRuleTargetRequest.java | 388 + .../model/AiGatewayRoutingRuleTargetType.java | 60 + .../v2/model/AiGatewayRoutingRuleTier.java | 220 + .../AiGatewayRoutingRuleTierOrdering.java | 60 + ...AiGatewayRoutingRuleTierOrderingIssue.java | 69 + .../AiGatewayRoutingRuleTierRequest.java | 216 + .../v2/model/AiGatewayRoutingRuleType.java | 57 + .../v2/model/AiGatewaySupportedOperation.java | 80 + .../api/client/v2/model/AiGatewayZDRMode.java | 55 + .../api/client/v2/api/ai_gateway.feature | 1074 ++ .../com/datadog/api/client/v2/api/undo.json | 319 + .../test-runner-data/manifest.json | 63 + ...vernance-controls-returns-ok-response.json | 18 + ...ure-configuration-returns-ok-response.json | 18 + ...i-gateway-budgets-returns-ok-response.json | 18 + ...eway-model-groups-returns-ok-response.json | 18 + ...s-by-canonical-id-returns-ok-response.json | 18 + ...gateway-providers-returns-ok-response.json | 18 + ...teway-rate-limits-returns-ok-response.json | 18 + ...-routing-policies-returns-ok-response.json | 18 + ...way-routing-rules-returns-ok-response.json | 18 + .../test-server-data/manifest.json | 5 + .../test-server-data/v2/ai-gateway.json | 286 + 297 files changed, 62535 insertions(+), 207 deletions(-) create mode 100644 examples/v2/ai-gateway/BulkCreateAiGatewayModels.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayBudget.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayDataCaptureOverride.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayModel.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayModelGroup.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayProvider.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayRateLimit.java create mode 100644 examples/v2/ai-gateway/CreateAiGatewayRoutingRule.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayBudget.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayDataCaptureOverride.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayModel.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayModelGroup.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayModelPricing.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayPolicy.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayProvider.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayRateLimit.java create mode 100644 examples/v2/ai-gateway/DeleteAiGatewayRoutingRule.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayBudget.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayBudgetCurrentPeriod.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayBudgetInstancesSummary.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayDataCaptureConfiguration.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayGovernance.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayModelGroup.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayModelPricing.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayPolicy.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayProvider.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayRateLimit.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayRateLimitUsage.java create mode 100644 examples/v2/ai-gateway/GetAiGatewayRoutingRule.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayBudgetInstanceDimensions.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayBudgetInstances.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayBudgets.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayModelGroups.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayModels.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayModelsByCanonical.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayPolicies.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayProviderModels.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayProviders.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayRateLimits.java create mode 100644 examples/v2/ai-gateway/ListAiGatewayRoutingRules.java create mode 100644 examples/v2/ai-gateway/OverrideAiGatewayBudgetInstanceCapacity.java create mode 100644 examples/v2/ai-gateway/ResetAiGatewayBudgetInstanceSpend.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayBudget.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayDataCaptureOverride.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayGovernance.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayModel.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayModelGroup.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayModelPricing.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayProvider.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayRateLimit.java create mode 100644 examples/v2/ai-gateway/UpdateAiGatewayRoutingRule.java create mode 100644 examples/v2/ai-gateway/UpsertAiGatewayPolicy.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetEnforcement.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionValue.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceSort.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetSelectorEntry.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetWindowPolicy.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesOperation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesOperation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverride.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributesMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureResponseScope.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureScope.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesOperation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayCustomProviderSupportedOperation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayDataCaptureMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayKnownProvider.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayMaxReasoningLevel.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayMetadataCaptureItem.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCapabilities.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryIdentifier.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupBinding.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupBindingRelation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupModel.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupProvider.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupRoutingRule.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelInput.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelLimits.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadata.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataKind.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataLifecycle.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSourceMatchedBy.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataStatus.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelModalities.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestConfig.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestSourceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingConfig.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestConfig.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestSourceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingEffectiveSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRates.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestConfig.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequiredRates.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSourceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoning.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoningControl.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoningControlType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReferencePrice.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableMaxReasoningLevel.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableRoutingRuleTierOrdering.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTarget.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTargetRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTier.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTierRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBinding.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBindingRelation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderIntegrationConfig.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelEntry.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelsRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRestrictedDetailsMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingReasoningLevel.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTarget.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTargetRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTargetType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTier.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrdering.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrderingIssue.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewaySupportedOperation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AiGatewayZDRMode.java create mode 100644 src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-ai-gateway-governance-controls-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-the-ai-gateway-data-capture-configuration-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-budgets-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-model-groups-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-models-by-canonical-id-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-providers-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-rate-limits-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-policies-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-rules-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-server-data/v2/ai-gateway.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c1d320d57f4..0b9bd93706f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -101,6 +101,247 @@ components: schema: example: "00000000-0000-1234-0000-000000000000" type: string + AiGatewayBudgetID: + description: Budget UUID. + example: 11111111-1111-1111-1111-111111111111 + in: path + name: id + required: true + schema: + format: uuid + type: string + AiGatewayBudgetInstanceDimension: + description: Return only these split dimensions, such as `dim=user_id`. Repeat the parameter for several dimensions. Omit it to return every split dimension of the budget. + example: + - user_id + explode: true + in: query + name: dim + required: false + schema: + items: + type: string + type: array + style: form + AiGatewayBudgetInstanceDimensionLimit: + description: Maximum number of values to return per dimension. + in: query + name: limit + required: false + schema: + default: 50 + format: int64 + maximum: 500 + minimum: 1 + type: integer + AiGatewayBudgetInstanceDimensionQuery: + description: Keep only values that contain this text, case-insensitively. It matches raw values, so User and Team values match their UUIDs; search their names elsewhere and pass the IDs as `value`. + example: prod + in: query + name: query + required: false + schema: + type: string + AiGatewayBudgetInstanceDimensionValues: + description: Keep only these values. Repeat the parameter to check several candidates, such as User IDs found by name, and learn which of them have instance counters. + example: + - 11111111-1111-1111-1111-111111111111 + explode: true + in: query + name: value + required: false + schema: + items: + type: string + type: array + style: form + AiGatewayBudgetInstanceLimit: + description: Maximum number of budget instance counters to return. + in: query + name: limit + required: false + schema: + default: 50 + format: int64 + maximum: 500 + minimum: 1 + type: integer + AiGatewayBudgetInstanceOffset: + description: Number of budget instance counters to skip. + in: query + name: offset + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + AiGatewayBudgetInstanceSort: + description: Sort order for budget instance counters. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceSort" + AiGatewayBudgetInstanceSplitDim: + description: Keep only instance counters whose split dimension equals a value, written as `=`, such as `split_dim=user_id=&split_dim=tag:env=prod`. Dimensions use the `split_dims` names `user_id`, `team_id`, `model`, `provider`, and `tag:`. Repeat the parameter to filter on several dimensions; a counter must match all of them. Each dimension may appear once and must be a per-value dimension of the budget. + example: + - user_id=11111111-1111-1111-1111-111111111111 + - tag:env=prod + explode: true + in: query + name: split_dim + required: false + schema: + items: + type: string + type: array + style: form + AiGatewayBudgetInstanceWindow: + description: RFC3339 timestamp inside the desired accounting window. Omit to use the current window. + in: query + name: window + required: false + schema: + format: date-time + type: string + AiGatewayIntegrationAccountID: + description: Provider integration account ID. + example: account-123 + in: query + name: integration_account_id + required: true + schema: + maxLength: 256 + type: string + AiGatewayIntegrationType: + description: Provider integration type. + example: openai + in: query + name: integration_type + required: true + schema: + type: string + AiGatewayModelCanonicalID: + description: Canonical model identifier. + example: gpt-5.2-codex + in: path + name: canonical + required: true + schema: + maxLength: 256 + type: string + AiGatewayModelGroupID: + description: Model group ID, or "default" for the explicit organization-wide access policy. + example: "7" + in: path + name: id + required: true + schema: + type: string + AiGatewayPolicyInbound: + description: Inbound routing pattern. + example: coding-agent + in: path + name: inbound + required: true + schema: + maxLength: 256 + type: string + AiGatewayPolicyUserID: + description: Filter or scope policies to a specific user. Omit for organization-wide policies. + in: query + name: user_id + required: false + schema: + format: uuid + type: string + AiGatewayProviderBedrockRegion: + description: AWS region used for Bedrock model discovery. Required for Amazon Bedrock integrations. + example: us-east-1 + in: query + name: bedrock_region + required: false + schema: + type: string + AiGatewayProviderForceDelete: + description: Apply the routing rule changes returned by provider_in_use. Defaults to false. + in: query + name: force + required: false + schema: + default: false + type: boolean + AiGatewayProviderFoundryResourceID: + description: ARM resource ID of the Azure AI Foundry resource used for model discovery. Required for Azure AI Foundry integrations. + example: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry + in: query + name: foundry_resource_id + required: false + schema: + type: string + AiGatewayProviderID: + description: Provider ID. + example: 42 + in: path + name: id + required: true + schema: + format: int64 + minimum: 1 + type: integer + AiGatewayProviderIDForModels: + description: Provider ID. + example: 42 + in: path + name: provider_id + required: true + schema: + format: int64 + minimum: 1 + type: integer + AiGatewayProviderLocation: + description: Optional GCP location used for Gemini model discovery. Defaults to global. + example: us-central1 + in: query + name: location + required: false + schema: + type: string + AiGatewayProviderProjectID: + description: GCP project ID used for Gemini model discovery. Required for Gemini integrations. + example: my-project + in: query + name: project_id + required: false + schema: + type: string + AiGatewayRateLimitID: + description: Rate limit UUID. + example: 33333333-3333-3333-3333-333333333333 + in: path + name: id + required: true + schema: + format: uuid + type: string + AiGatewayRoutingRuleForceDelete: + description: Delete referencing tiers and recursively delete parent rules left without tiers. + in: query + name: force + required: false + schema: + default: false + type: boolean + AiGatewayRoutingRuleSlug: + description: Organization-unique routing rule slug. + example: coding + in: query + name: slug + required: true + schema: + maxLength: 128 + type: string AnnotationEndTimeQueryParameter: description: End of the time window in milliseconds since the Unix epoch. example: 1704153600000 @@ -7107,6 +7348,4162 @@ components: required: - data type: object + AiGatewayBudgetAttributes: + description: AI Gateway budget configuration and metadata. + properties: + capacity_microcents: + description: Budget capacity in microcents. + example: 100000000 + format: int64 + type: integer + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + created_by: + description: Identifier of the principal that created the resource. + example: admin@example.com + type: string + enabled: + description: Whether the resource is enabled. + example: true + type: boolean + enforcement: + $ref: "#/components/schemas/AiGatewayBudgetEnforcement" + monitor_id: + description: Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or failed. + example: 12345678 + format: int64 + nullable: true + type: integer + name: + description: Human-readable resource name. + example: Coding agents + type: string + scope_restricted: + description: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. + example: false + type: boolean + selector: + $ref: "#/components/schemas/AiGatewayBudgetSelector" + tags: + $ref: "#/components/schemas/AiGatewayBudgetTags" + team_id: + description: Optional Datadog Team scope. + format: uuid + type: string + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + user_id: + description: User scope. Omitted when the budget is not user-scoped. + format: uuid + type: string + warning_threshold: + description: Fraction of capacity at which to issue a warning. + example: 0.9 + format: double + type: number + window_policy: + $ref: "#/components/schemas/AiGatewayBudgetWindowPolicy" + required: + - scope_restricted + - monitor_id + - name + - tags + - capacity_microcents + - window_policy + - warning_threshold + - enforcement + - enabled + - created_by + - created_at + - updated_at + type: object + AiGatewayBudgetCreateAttributes: + description: Attributes used to create an AI Gateway budget. + properties: + capacity_microcents: + description: Budget capacity in microcents. + example: 100000000 + format: int64 + minimum: 1 + type: integer + enforcement: + $ref: "#/components/schemas/AiGatewayBudgetEnforcement" + name: + description: Human-readable resource name. + example: Coding agents + minLength: 1 + type: string + selector: + $ref: "#/components/schemas/AiGatewayBudgetSelector" + tags: + $ref: "#/components/schemas/AiGatewayBudgetTags" + team_id: + description: Optional Datadog Team scope. + format: uuid + type: string + track_existing: + default: false + description: Initialize current-period spend from historical priced LLM Observability spans. Defaults to false. Unsupported for template budgets; failures can be retried with an update. + type: boolean + user_id: + description: Optional user scope. + format: uuid + type: string + warning_threshold: + default: 0.9 + description: Fraction of capacity at which to issue a warning. + exclusiveMinimum: true + format: double + maximum: 1 + minimum: 0 + type: number + window_policy: + $ref: "#/components/schemas/AiGatewayBudgetWindowPolicy" + required: + - name + - capacity_microcents + - window_policy + - enforcement + type: object + AiGatewayBudgetCreateData: + description: Data used to create an AI Gateway budget. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayBudgetType" + required: + - type + - attributes + type: object + AiGatewayBudgetCreateRequest: + description: Request to create an AI Gateway budget. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetCreateData" + required: + - data + type: object + AiGatewayBudgetEnforcement: + description: Action taken when spend exceeds the budget. + enum: + - BLOCK + - NOTIFY + example: BLOCK + type: string + x-enum-varnames: + - BLOCK + - NOTIFY + AiGatewayBudgetInstanceAttributes: + description: One budget instance counter. + properties: + budget_id: + description: Budget identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + effective_capacity_microcents: + description: Capacity enforced for this instance, in microcents. + example: 100000000 + format: int64 + type: integer + instance_key: + description: Opaque canonical counter key. Empty for legacy pooled counters. + example: "" + type: string + modified_at: + description: Time the instance counter was last modified. + example: "2026-10-05T12:00:00Z" + format: date-time + type: string + spend_microcents: + description: Spend counted against this instance, in microcents. + example: 25000000 + format: int64 + type: integer + split_dims: + additionalProperties: + type: string + description: Dimension values decoded from instance_key. User and Team values are raw UUIDs. + example: {} + type: object + window_start: + description: Start of the accounting window. + example: "2026-10-01T00:00:00Z" + format: date-time + type: string + required: + - budget_id + - window_start + - instance_key + - split_dims + - spend_microcents + - effective_capacity_microcents + - modified_at + type: object + AiGatewayBudgetInstanceCapacityOverrideAttributes: + description: Attributes used to override one budget instance's active-period capacity. + properties: + capacity_microcents: + description: New capacity for this instance in the active accounting period, in microcents. + example: 250000000 + format: int64 + minimum: 1 + type: integer + instance_key: + description: Counter key of the instance to override, as returned by the list budget instances endpoint. + example: "v1|7:user_id=36:22222222-2222-2222-2222-222222222222" + minLength: 1 + type: string + reason: + description: Optional reason recorded with the capacity override. + example: Temporary increase for a launch week + maxLength: 1024 + type: string + required: + - instance_key + - capacity_microcents + type: object + AiGatewayBudgetInstanceCapacityOverrideData: + description: Data used to override one budget instance's active-period capacity. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetInstanceCapacityOverrideAttributes" + type: + $ref: "#/components/schemas/AiGatewayBudgetInstanceType" + required: + - type + - attributes + type: object + AiGatewayBudgetInstanceCapacityOverrideRequest: + description: Request to override one budget instance's active-period capacity. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetInstanceCapacityOverrideData" + required: + - data + type: object + AiGatewayBudgetInstanceDimensionAttributes: + description: Values of one budget split dimension. + properties: + budget_id: + description: Budget identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + dim: + description: Split dimension name, as used in `split_dims` and the `split_dim` filter. + example: tag:env + type: string + restricted_details: + description: Whether identifying instance details were withheld. Aggregate totals still include restricted instances. + example: false + type: boolean + truncated: + description: Whether more values matched than were returned. Narrow the results with `query` or `value` to see them. + example: false + type: boolean + values: + description: Values of this dimension across matching instance counters, highest spend first and at most `limit` of them. Values are counted under every `split_dim` filter except the one for this dimension. + items: + $ref: "#/components/schemas/AiGatewayBudgetInstanceDimensionValue" + type: array + window_start: + description: Start of the accounting window. + example: "2026-10-01T00:00:00Z" + format: date-time + type: string + required: + - restricted_details + - budget_id + - window_start + - dim + - values + - truncated + type: object + AiGatewayBudgetInstanceDimensionListResponse: + description: Response containing values of budget split dimensions. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayBudgetInstanceDimensionResource" + type: array + required: + - data + type: object + AiGatewayBudgetInstanceDimensionResource: + description: Values of one budget split dimension. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetInstanceDimensionAttributes" + id: + description: Resource identifier. + example: 11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z|tag:env + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetInstanceDimensionType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetInstanceDimensionType: + description: Budget split dimension values resource type. + enum: + - budget-instance-dimensions + example: budget-instance-dimensions + type: string + x-enum-varnames: + - BUDGET_INSTANCE_DIMENSIONS + AiGatewayBudgetInstanceDimensionValue: + description: One value of a budget split dimension. + properties: + instance_count: + description: Number of instance counters carrying this value. + example: 2 + format: int64 + type: integer + spend_microcents: + description: Spend summed across those instance counters, in microcents. + example: 50000000 + format: int64 + type: integer + value: + description: Raw dimension value. User and Team values are UUIDs. A counter with no value for the dimension carries the null character (U+0000). + example: prod + type: string + required: + - value + - instance_count + - spend_microcents + type: object + AiGatewayBudgetInstanceListResponse: + description: Response containing budget instance counters. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResource" + type: array + meta: + $ref: "#/components/schemas/AiGatewayRestrictedDetailsMeta" + required: + - meta + - data + type: object + AiGatewayBudgetInstanceResetAttributes: + description: Attributes used to reset one budget instance's active-period spend. + properties: + instance_key: + description: Counter key of the instance to reset, as returned by the list budget instances endpoint. + example: "v1|7:user_id=36:22222222-2222-2222-2222-222222222222" + minLength: 1 + type: string + reason: + description: Optional reason recorded with the spend reset. + example: Credit approved after incorrect usage attribution + maxLength: 1024 + type: string + required: + - instance_key + type: object + AiGatewayBudgetInstanceResetData: + description: Data used to reset one budget instance's active-period spend. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResetAttributes" + type: + $ref: "#/components/schemas/AiGatewayBudgetInstanceType" + required: + - type + - attributes + type: object + AiGatewayBudgetInstanceResetRequest: + description: Request to reset one budget instance's active-period spend. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResetData" + required: + - data + type: object + AiGatewayBudgetInstanceResource: + description: One budget instance counter. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetInstanceAttributes" + id: + description: Resource identifier. + example: 11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z| + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetInstanceType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetInstanceResponse: + description: Response containing one budget instance counter. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResource" + required: + - data + type: object + AiGatewayBudgetInstanceSort: + default: spend_desc + description: Sort order for budget instance counters. + enum: + - spend_desc + - spend_asc + - key_asc + example: spend_desc + type: string + x-enum-varnames: + - SPEND_DESC + - SPEND_ASC + - KEY_ASC + AiGatewayBudgetInstanceType: + description: Budget instance counter resource type. + enum: + - budget-instances + example: budget-instances + type: string + x-enum-varnames: + - BUDGET_INSTANCES + AiGatewayBudgetInstancesSummaryAttributes: + description: Aggregate state across budget instance counters. + properties: + budget_id: + description: Budget identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + exceeded_capacity_count: + description: Number of instances at or above capacity. + example: 0 + format: int64 + type: integer + instance_count: + description: Number of instance counters. + example: 3 + format: int64 + type: integer + over_warning_threshold_count: + description: Number of instances at or above the warning threshold. + example: 1 + format: int64 + type: integer + restricted_details: + description: Whether instances were withheld because their provider or model is hidden. Summary counts and totals exclude those instances. + example: false + type: boolean + total_spend_microcents: + description: Spend summed across all instances, in microcents. + example: 75000000 + format: int64 + type: integer + window_start: + description: Start of the accounting window. + example: "2026-10-01T00:00:00Z" + format: date-time + type: string + required: + - restricted_details + - budget_id + - window_start + - instance_count + - total_spend_microcents + - over_warning_threshold_count + - exceeded_capacity_count + type: object + AiGatewayBudgetInstancesSummaryResource: + description: Aggregate state across budget instance counters. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetInstancesSummaryAttributes" + id: + description: Resource identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetInstancesSummaryType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetInstancesSummaryResponse: + description: Response containing aggregate state across budget instance counters. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetInstancesSummaryResource" + required: + - data + type: object + AiGatewayBudgetInstancesSummaryType: + description: Budget instance summary resource type. + enum: + - budget-instances-summary + example: budget-instances-summary + type: string + x-enum-varnames: + - BUDGET_INSTANCES_SUMMARY + AiGatewayBudgetListAttributes: + description: Budget configuration including spend and capacity for the active accounting window. + properties: + capacity_microcents: + description: Budget capacity in microcents. + example: 100000000 + format: int64 + type: integer + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + created_by: + description: Identifier of the principal that created the resource. + example: admin@example.com + type: string + current_period_capacity_microcents: + description: Capacity enforced for the active window, in microcents. + example: 120000000 + format: int64 + type: integer + current_spend_microcents: + description: Spend currently counted against the active window, in microcents. + example: 25000000 + format: int64 + type: integer + enabled: + description: Whether the resource is enabled. + example: true + type: boolean + enforcement: + $ref: "#/components/schemas/AiGatewayBudgetEnforcement" + monitor_id: + description: Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or failed. + example: 12345678 + format: int64 + nullable: true + type: integer + name: + description: Human-readable resource name. + example: Coding agents + type: string + scope_restricted: + description: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. + example: false + type: boolean + selector: + $ref: "#/components/schemas/AiGatewayBudgetSelector" + tags: + $ref: "#/components/schemas/AiGatewayBudgetTags" + team_id: + description: Optional Datadog Team scope. + format: uuid + type: string + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + user_id: + description: User scope. Omitted when the budget is not user-scoped. + format: uuid + type: string + warning_threshold: + description: Fraction of capacity at which to issue a warning. + example: 0.9 + format: double + type: number + window_end: + description: End of the active accounting window. + example: "2026-09-01T00:00:00Z" + format: date-time + type: string + window_policy: + $ref: "#/components/schemas/AiGatewayBudgetWindowPolicy" + window_start: + description: Start of the active accounting window. + example: "2026-08-01T00:00:00Z" + format: date-time + type: string + required: + - scope_restricted + - monitor_id + - name + - tags + - capacity_microcents + - window_policy + - warning_threshold + - enforcement + - enabled + - created_by + - created_at + - updated_at + - window_start + - window_end + - current_spend_microcents + - current_period_capacity_microcents + type: object + AiGatewayBudgetListResource: + description: Budget resource including active-window spend and capacity. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetListAttributes" + id: + description: Resource identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetListResponse: + description: Response containing AI Gateway budgets. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayBudgetListResource" + type: array + required: + - data + type: object + AiGatewayBudgetPeriodAttributes: + description: Accounting state enforced for an AI Gateway budget's active period. + properties: + budget_id: + description: Budget resource identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + current_spend_microcents: + description: Spend currently counted against the active accounting period. + example: 25000000 + format: int64 + type: integer + default_capacity_microcents: + description: Capacity that new accounting periods inherit from the budget definition. + example: 100000000 + format: int64 + type: integer + effective_capacity_microcents: + description: Capacity enforced for the active accounting period. + example: 120000000 + format: int64 + type: integer + monitor_id: + description: Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or failed. + example: 12345678 + format: int64 + nullable: true + type: integer + window_end: + description: End of the active accounting window. + example: "2026-08-28T00:00:00Z" + format: date-time + type: string + window_start: + description: Start of the active accounting window. + example: "2026-08-27T00:00:00Z" + format: date-time + type: string + required: + - budget_id + - monitor_id + - window_start + - window_end + - default_capacity_microcents + - effective_capacity_microcents + - current_spend_microcents + type: object + AiGatewayBudgetPeriodResource: + description: Active accounting period for an AI Gateway budget. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetPeriodAttributes" + id: + description: Budget identifier associated with this active period. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetPeriodType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetPeriodResponse: + description: Response containing an AI Gateway budget's active period. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetPeriodResource" + required: + - data + type: object + AiGatewayBudgetPeriodType: + description: AI Gateway budget period resource type. + enum: + - budget-periods + example: budget-periods + type: string + x-enum-varnames: + - BUDGET_PERIODS + AiGatewayBudgetResource: + description: AI Gateway budget resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetAttributes" + id: + description: Resource identifier. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetResponse: + description: Response containing one AI Gateway budget. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetResource" + required: + - data + type: object + AiGatewayBudgetSelector: + description: Dimension rules for a template budget. A nonempty selector creates independent counters for matched instances. Omit or pass an empty selector for a legacy fixed-scope budget. + items: + $ref: "#/components/schemas/AiGatewayBudgetSelectorEntry" + nullable: true + type: array + AiGatewayBudgetSelectorEntry: + description: One dimension rule in a template budget selector. + properties: + dim: + description: "Dimension to match: user_id, team_id, model, provider, or tag:. Reserved metadata tag keys are rejected." + example: user_id + type: string + per_value: + default: false + description: Separate counters by the matched value when true. Otherwise, pool spend within the other separated dimensions. + example: true + type: boolean + values: + description: Allowed dimension values. Omit to match any value, including an absent dimension. An explicit list must contain at least one value. + example: + - 11111111-1111-1111-1111-111111111111 + items: + type: string + minItems: 1 + type: array + required: + - dim + - per_value + type: object + AiGatewayBudgetTags: + additionalProperties: + type: string + description: Request tags that must match for the budget to apply. + example: + model: gpt-5.2-codex + type: object + AiGatewayBudgetType: + description: AI Gateway budget resource type. + enum: + - budgets + example: budgets + type: string + x-enum-varnames: + - BUDGETS + AiGatewayBudgetUpdateAttributes: + description: Mutable attributes of an AI Gateway budget. + properties: + apply_to_current_period: + default: false + description: Whether a capacity change also applies to the active accounting period. Requires capacity_microcents. Unsupported for template budgets. + type: boolean + capacity_microcents: + description: Default capacity for future accounting periods, in microcents. + example: 120000000 + format: int64 + minimum: 1 + type: integer + enabled: + description: Whether the budget is enabled. + example: true + type: boolean + enforcement: + $ref: "#/components/schemas/AiGatewayBudgetEnforcement" + name: + description: Human-readable resource name. + example: Coding agents + minLength: 1 + type: string + reason: + description: Optional reason recorded with an active-period capacity adjustment. + example: Temporary capacity increase approved for an incident + maxLength: 1024 + type: string + track_existing: + default: false + description: Initialize current-period spend from historical priced LLM Observability spans. Defaults to false. Unsupported for template budgets; failures can be retried with an update. + type: boolean + warning_threshold: + description: Fraction of capacity at which to issue a warning. + example: 0.8 + exclusiveMinimum: true + format: double + maximum: 1 + minimum: 0 + type: number + type: object + AiGatewayBudgetUpdateData: + description: Data used to update an AI Gateway budget. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayBudgetUpdateAttributes" + id: + description: Resource identifier. Must match the budget ID in the path. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayBudgetType" + required: + - type + - id + - attributes + type: object + AiGatewayBudgetUpdateRequest: + description: Request to update an AI Gateway budget. + properties: + data: + $ref: "#/components/schemas/AiGatewayBudgetUpdateData" + required: + - data + type: object + AiGatewayBudgetWindowPolicy: + description: UTC accounting period for a budget. + enum: + - DAILY + - WEEKLY + - MONTHLY + example: MONTHLY + type: string + x-enum-varnames: + - DAILY + - WEEKLY + - MONTHLY + AiGatewayCaptureConfigurationResponse: + description: Response containing the organization data capture configuration. + properties: + data: + $ref: "#/components/schemas/AiGatewayCaptureConfigurationResponseData" + required: + - data + type: object + AiGatewayCaptureConfigurationResponseData: + description: Organization data capture configuration, including its default mode and scoped overrides. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayCaptureConfigurationResponseDataAttributes" + id: + description: Identifier of the organization configuration resource, always `organization`. + example: organization + type: string + type: + $ref: "#/components/schemas/AiGatewayCaptureConfigurationResponseDataType" + required: + - id + - type + - attributes + type: object + AiGatewayCaptureConfigurationResponseDataAttributes: + description: Organization default mode, scoped overrides, and current configuration revision. + properties: + configuration_revision: + description: Opaque revision of the organization default and all overrides. Writes require the revision returned by a current read or preview. + example: "capture-revision-1" + type: string + default_metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Items Metadata-only capture adds by default, when no scoped override matches. Change them in **Org defaults**. + default_mode: + $ref: "#/components/schemas/AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode" + overrides: + description: Scoped overrides currently configured for the organization. + items: + $ref: "#/components/schemas/AiGatewayCaptureOverride" + type: array + required: + - configuration_revision + - default_mode + - overrides + type: object + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode: + description: Default capture mode for the organization. Change it in **Org defaults**. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayCaptureConfigurationResponseDataType: + default: data-capture-configurations + description: Data capture configurations resource type. + enum: + - data-capture-configurations + example: data-capture-configurations + type: string + x-enum-varnames: + - DATA_CAPTURE_CONFIGURATIONS + AiGatewayCaptureCreateRequest: + description: Request body for creating a scoped data capture override. + properties: + data: + $ref: "#/components/schemas/AiGatewayCaptureCreateRequestData" + required: + - data + type: object + AiGatewayCaptureCreateRequestData: + description: New data capture override with a client-generated UUID and its settings. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayCaptureCreateRequestDataAttributes" + id: + description: Client-generated UUID for the override. + example: "11111111-1111-4111-8111-111111111111" + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayCaptureCreateRequestDataType" + required: + - id + - type + - attributes + type: object + AiGatewayCaptureCreateRequestDataAttributes: + description: Settings and configuration revision for creating the override. + properties: + configuration_revision: + description: Opaque revision of the organization default and all overrides. Writes require the revision returned by a current read or preview. + example: "capture-revision-1" + type: string + confirm_full_capture: + description: >- + Set to `true` to confirm a change that can enable full capture, including a deletion that causes a `full_capture` override or the organization default to apply. + type: boolean + metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Optional items Metadata-only capture adds for matching requests: structure and counts, never conversation text. Applies only under `metadata_only`. Omit it on replacement to keep the stored items. + mode: + $ref: "#/components/schemas/AiGatewayCaptureCreateRequestDataAttributesMode" + name: + description: Display name of the override. Names need not be unique; identify overrides by `id`. + example: Research + maxLength: 256 + minLength: 1 + type: string + operation: + $ref: "#/components/schemas/AiGatewayCaptureCreateRequestDataAttributesOperation" + revision: + description: Current override revision, required for replacement or deletion. + example: 1 + format: int64 + type: integer + scope: + $ref: "#/components/schemas/AiGatewayCaptureScope" + required: + - name + - mode + - scope + - configuration_revision + type: object + AiGatewayCaptureCreateRequestDataAttributesMode: + description: Capture mode for matching traffic. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayCaptureCreateRequestDataAttributesOperation: + description: Proposed operation for preview. Write endpoints infer it from the HTTP method. + enum: + - create + - replace + - delete + example: create + type: string + x-enum-varnames: + - CREATE + - REPLACE + - DELETE + AiGatewayCaptureCreateRequestDataType: + default: data-capture-overrides + description: Data capture overrides resource type. + enum: + - data-capture-overrides + example: data-capture-overrides + type: string + x-enum-varnames: + - DATA_CAPTURE_OVERRIDES + AiGatewayCaptureDeleteRequest: + description: Request body for deleting a scoped data capture override. + properties: + data: + $ref: "#/components/schemas/AiGatewayCaptureDeleteRequestData" + required: + - data + type: object + AiGatewayCaptureDeleteRequestData: + description: Override identifier, revisions, and confirmation required for deletion. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayCaptureDeleteRequestDataAttributes" + id: + description: UUID of the override to delete. Must match the `id` path parameter. + example: "11111111-1111-4111-8111-111111111111" + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayCaptureDeleteRequestDataType" + required: + - id + - type + - attributes + type: object + AiGatewayCaptureDeleteRequestDataAttributes: + description: Revisions and confirmation used to delete the override. + properties: + configuration_revision: + description: Opaque revision of the organization default and all overrides. Writes require the revision returned by a current read or preview. + example: "capture-revision-1" + type: string + confirm_full_capture: + description: >- + Set to `true` to confirm a change that can enable full capture, including a deletion that causes a `full_capture` override or the organization default to apply. + type: boolean + mode: + $ref: "#/components/schemas/AiGatewayCaptureDeleteRequestDataAttributesMode" + name: + description: Display name of the override. Names need not be unique; identify overrides by `id`. + example: Research + type: string + operation: + $ref: "#/components/schemas/AiGatewayCaptureDeleteRequestDataAttributesOperation" + revision: + description: Current override revision, required for replacement or deletion. + example: 1 + format: int64 + type: integer + scope: + $ref: "#/components/schemas/AiGatewayCaptureScope" + required: + - revision + - configuration_revision + type: object + AiGatewayCaptureDeleteRequestDataAttributesMode: + description: Capture mode for matching traffic. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayCaptureDeleteRequestDataAttributesOperation: + description: Proposed operation for preview. Write endpoints infer it from the HTTP method. + enum: + - create + - replace + - delete + example: create + type: string + x-enum-varnames: + - CREATE + - REPLACE + - DELETE + AiGatewayCaptureDeleteRequestDataType: + default: data-capture-overrides + description: Data capture overrides resource type. + enum: + - data-capture-overrides + example: data-capture-overrides + type: string + x-enum-varnames: + - DATA_CAPTURE_OVERRIDES + AiGatewayCaptureOverride: + description: Saved data capture override with its request filters, capture mode, revision, and timestamps. + properties: + created_at: + description: Timestamp when the override was created. + example: "2026-10-15T12:00:00Z" + format: date-time + type: string + id: + description: UUID identifying the override within the organization. + example: "11111111-1111-4111-8111-111111111111" + format: uuid + type: string + metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Items Metadata-only capture adds for matching requests. Empty when none are selected. + mode: + $ref: "#/components/schemas/AiGatewayCaptureOverrideMode" + name: + description: Display name of the override. Names need not be unique; identify overrides by `id`. + example: Research + type: string + revision: + description: Current override revision, required for replacement or deletion. + example: 1 + format: int64 + type: integer + scope: + $ref: "#/components/schemas/AiGatewayCaptureResponseScope" + scope_restricted: + description: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. + example: false + type: boolean + updated_at: + description: Timestamp when the override was last modified. + example: "2026-10-15T12:00:00Z" + format: date-time + type: string + required: + - scope_restricted + - created_at + - id + - mode + - name + - revision + - scope + - updated_at + type: object + AiGatewayCaptureOverrideMode: + description: Capture mode for matching traffic. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayCaptureOverrideResponse: + description: Response containing a data capture override after creation or replacement. + properties: + data: + $ref: "#/components/schemas/AiGatewayCaptureOverrideResponseData" + required: + - data + type: object + AiGatewayCaptureOverrideResponseData: + description: Saved data capture override with its identifier, mode, scope, and revision. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayCaptureOverrideResponseDataAttributes" + id: + description: UUID of the saved override, used to retrieve it from the configuration or change it. + example: "11111111-1111-4111-8111-111111111111" + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayCaptureOverrideResponseDataType" + required: + - id + - type + - attributes + type: object + AiGatewayCaptureOverrideResponseDataAttributes: + description: Saved name, capture mode, request filters, and revision of the override. + properties: + metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Items Metadata-only capture adds for matching requests. Empty when none are selected. + mode: + $ref: "#/components/schemas/AiGatewayCaptureOverrideResponseDataAttributesMode" + name: + description: Display name of the override. Names need not be unique; identify overrides by `id`. + example: Research + type: string + revision: + description: Current override revision, required for replacement or deletion. + example: 1 + format: int64 + type: integer + scope: + $ref: "#/components/schemas/AiGatewayCaptureResponseScope" + scope_restricted: + description: Whether provider or model scope metadata was withheld. Omit unchanged scope on replacement to preserve it. + example: false + type: boolean + required: + - scope_restricted + - mode + - name + - revision + - scope + type: object + AiGatewayCaptureOverrideResponseDataAttributesMode: + description: Capture mode for matching traffic. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayCaptureOverrideResponseDataType: + default: data-capture-overrides + description: Data capture overrides resource type. + enum: + - data-capture-overrides + example: data-capture-overrides + type: string + x-enum-varnames: + - DATA_CAPTURE_OVERRIDES + AiGatewayCaptureResponseScope: + additionalProperties: false + description: >- + Visible request filters. Provider and model tags are withheld when the caller cannot view them. An empty object or empty tags can represent a fully restricted scope; scope_restricted identifies redaction. + example: + tags: + env: prod + properties: + tags: + additionalProperties: + type: string + description: >- + Exact-match request tags with lowercase keys. The reserved `model` tag is the canonical model ID, and the reserved `provider` tag is the configured connection slug. The server sets both. Custom tags come from `x-dd-tag` headers. Keys and values must not have leading or trailing white space. Values are case-sensitive. + maxProperties: 100 + type: object + team_id: + description: >- + UUID of a Datadog team. Matches the authorized team selected by the `x-ai-gateway-team` request header. Requests without this header do not match team-scoped overrides. Open-membership teams cannot scope overrides. + format: uuid + type: string + user_id: + description: Authenticated Datadog user UUID in this organization. + format: uuid + type: string + type: object + AiGatewayCaptureScope: + additionalProperties: false + description: >- + All selected filters combine with AND, with one value per filter. The `model` and `provider` tags apply to each actual direct or routed attempt, including fallback destinations. Routes are not selectable filters. At least one filter is required. + + If any matching override uses `metadata_only`, that mode applies. Otherwise, if any matching override uses `full_capture`, that mode applies. The organization default applies only when no override matches. Overrides have no priority or specificity ordering. + example: + tags: + env: prod + minProperties: 1 + properties: + tags: + additionalProperties: + type: string + description: >- + Exact-match request tags with lowercase keys. The reserved `model` tag is the canonical model ID, and the reserved `provider` tag is the configured connection slug. The server sets both. Custom tags come from `x-dd-tag` headers. Keys and values must not have leading or trailing white space. Values are case-sensitive. + maxProperties: 100 + minProperties: 1 + type: object + team_id: + description: >- + UUID of a Datadog team. Matches the authorized team selected by the `x-ai-gateway-team` request header. Requests without this header do not match team-scoped overrides. Open-membership teams cannot scope overrides. + format: uuid + type: string + user_id: + description: Authenticated Datadog user UUID in this organization. + format: uuid + type: string + type: object + AiGatewayCaptureUpdateRequest: + description: Request body for replacing a scoped data capture override. + properties: + data: + $ref: "#/components/schemas/AiGatewayCaptureUpdateRequestData" + required: + - data + type: object + AiGatewayCaptureUpdateRequestData: + description: Existing override identifier, replacement settings, and revisions required for the update. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayCaptureUpdateRequestDataAttributes" + id: + description: UUID of the override to replace. Must match the `id` path parameter. + example: "11111111-1111-4111-8111-111111111111" + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayCaptureUpdateRequestDataType" + required: + - id + - type + - attributes + type: object + AiGatewayCaptureUpdateRequestDataAttributes: + description: Replacement settings and revisions for updating the override. + properties: + configuration_revision: + description: Opaque revision of the organization default and all overrides. Writes require the revision returned by a current read or preview. + example: "capture-revision-1" + type: string + confirm_full_capture: + description: >- + Set to `true` to confirm a change that can enable full capture, including a deletion that causes a `full_capture` override or the organization default to apply. + type: boolean + metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Optional items Metadata-only capture adds for matching requests: structure and counts, never conversation text. Applies only under `metadata_only`. Omit it on replacement to keep the stored items. + mode: + $ref: "#/components/schemas/AiGatewayCaptureUpdateRequestDataAttributesMode" + name: + description: Display name of the override. Names need not be unique; identify overrides by `id`. + example: Research + maxLength: 256 + minLength: 1 + type: string + operation: + $ref: "#/components/schemas/AiGatewayCaptureUpdateRequestDataAttributesOperation" + revision: + description: Current override revision, required for replacement or deletion. + example: 1 + format: int64 + type: integer + scope: + $ref: "#/components/schemas/AiGatewayCaptureScope" + description: Omit on replacement to preserve the saved scope, including hidden provider and model references. An explicitly supplied scope replaces it. + required: + - name + - mode + - revision + - configuration_revision + type: object + AiGatewayCaptureUpdateRequestDataAttributesMode: + description: Capture mode for matching traffic. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayCaptureUpdateRequestDataAttributesOperation: + description: Proposed operation for preview. Write endpoints infer it from the HTTP method. + enum: + - create + - replace + - delete + example: create + type: string + x-enum-varnames: + - CREATE + - REPLACE + - DELETE + AiGatewayCaptureUpdateRequestDataType: + default: data-capture-overrides + description: Data capture overrides resource type. + enum: + - data-capture-overrides + example: data-capture-overrides + type: string + x-enum-varnames: + - DATA_CAPTURE_OVERRIDES + AiGatewayCustomProviderSupportedOperation: + description: Operation supported by a custom provider. + enum: + - OPENAI_CHAT_COMPLETIONS + - OPENAI_RESPONSES + - ANTHROPIC_MESSAGES + example: OPENAI_CHAT_COMPLETIONS + type: string + x-enum-varnames: + - OPENAI_CHAT_COMPLETIONS + - OPENAI_RESPONSES + - ANTHROPIC_MESSAGES + AiGatewayDataCaptureMode: + description: Controls whether AI Gateway captures request and response content in addition to metadata. + enum: + - metadata_only + - full_capture + example: metadata_only + type: string + x-enum-varnames: + - METADATA_ONLY + - FULL_CAPTURE + AiGatewayDiscoveredModelAttributes: + description: Model discovered from a provider integration account. + properties: + display_name: + description: Human-readable model name. + example: GPT-5.2 Codex + type: string + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + type: string + supported_operations: + description: Operations supported by the model. + example: + - OPENAI_CHAT_COMPLETIONS + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + required: + - model_id_wire + - supported_operations + type: object + AiGatewayDiscoveredModelListResponse: + description: Response containing models discovered from an integration account. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayDiscoveredModelResource" + description: Discovered provider model. + type: array + required: + - data + type: object + AiGatewayDiscoveredModelResource: + description: Discovered provider model resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayDiscoveredModelAttributes" + id: + description: Resource identifier. + example: gpt-5.2-codex + type: string + type: + $ref: "#/components/schemas/AiGatewayDiscoveredModelType" + required: + - type + - id + - attributes + type: object + AiGatewayDiscoveredModelType: + description: Discovered provider model resource type. + enum: + - provider-models + example: provider-models + type: string + x-enum-varnames: + - PROVIDER_MODELS + AiGatewayGovernanceAttributes: + description: Organization-wide AI Gateway governance controls. + properties: + data_capture_mode: + $ref: "#/components/schemas/AiGatewayDataCaptureMode" + description: Data capture mode used when no scoped override matches the request. + metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Items Metadata-only capture adds when no scoped override matches. Empty when none are selected. + zdr_mode: + $ref: "#/components/schemas/AiGatewayZDRMode" + description: Whether the organization requires every request to reach a provider covered by a zero data retention agreement. + required: + - data_capture_mode + - zdr_mode + type: object + AiGatewayGovernanceReplaceAttributes: + description: Organization-wide AI Gateway governance controls to replace. + properties: + data_capture_mode: + $ref: "#/components/schemas/AiGatewayDataCaptureMode" + description: Data capture mode used when no scoped override matches the request. + metadata_capture: + $ref: "#/components/schemas/AiGatewayMetadataCapture" + description: >- + Optional items Metadata-only capture adds when no scoped override matches. Omit it to keep the stored items. + zdr_mode: + $ref: "#/components/schemas/AiGatewayZDRMode" + description: Whether the organization requires every request to reach a provider covered by a zero data retention agreement. Omit to leave unchanged. + required: + - data_capture_mode + type: object + AiGatewayGovernanceReplaceData: + description: Data used to replace the organization's AI Gateway governance controls. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayGovernanceReplaceAttributes" + id: + description: Optional singleton governance resource identifier. When provided, it must be `organization`. + example: organization + type: string + type: + $ref: "#/components/schemas/AiGatewayGovernanceType" + required: + - type + - attributes + type: object + AiGatewayGovernanceReplaceRequest: + description: Request to replace the organization's AI Gateway governance controls. + properties: + data: + $ref: "#/components/schemas/AiGatewayGovernanceReplaceData" + required: + - data + type: object + AiGatewayGovernanceResource: + description: Organization-wide AI Gateway governance resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayGovernanceAttributes" + id: + description: Singleton governance resource identifier. + example: organization + type: string + type: + $ref: "#/components/schemas/AiGatewayGovernanceType" + required: + - type + - id + - attributes + type: object + AiGatewayGovernanceResponse: + description: Response containing the organization's AI Gateway governance controls. + properties: + data: + $ref: "#/components/schemas/AiGatewayGovernanceResource" + required: + - data + type: object + AiGatewayGovernanceType: + description: AI Gateway governance resource type. + enum: + - governance + example: governance + type: string + x-enum-varnames: + - GOVERNANCE + AiGatewayKnownProvider: + description: Known provider implementation. + enum: + - custom + - anthropic + - openai + - azure_openai + - bedrock + - gemini + - baseten + - fireworks + - together + - typesafe + - azure_foundry + example: openai + type: string + x-enum-varnames: + - CUSTOM + - ANTHROPIC + - OPENAI + - AZURE_OPENAI + - BEDROCK + - GEMINI + - BASETEN + - FIREWORKS + - TOGETHER + - TYPESAFE + - AZURE_FOUNDRY + AiGatewayMaxReasoningLevel: + description: Maximum reasoning level permitted by a model group. + enum: + - none + - minimal + - low + - medium + - high + - xhigh + - max + example: high + type: string + x-enum-varnames: + - NONE + - MINIMAL + - LOW + - MEDIUM + - HIGH + - XHIGH + - MAX + AiGatewayMetadataCapture: + description: >- + Items Metadata-only capture adds, each listed once. An item requires the items whose information it already reveals: `tool_output_size`, `tool_names` and `conversation_shape` require `tool_usage`, and `input_size_by_role` requires `tool_output_size`. A set that leaves out a required item is rejected. When several Metadata-only overrides match a request, it gets only the items all of them select. + example: + - tool_usage + - tool_output_size + - tool_names + items: + $ref: "#/components/schemas/AiGatewayMetadataCaptureItem" + type: array + uniqueItems: true + AiGatewayMetadataCaptureItem: + description: >- + An item Metadata-only capture can add to LLM Observability spans. Each is structure or a number, never conversation text. `tool_usage` adds tool call and result counts; `tool_output_size` adds estimated tool output tokens, total and average; `tool_names` adds each tool call and result with its name, ID and type; `conversation_shape` adds every message with its role and no text; `input_size_by_role` adds estimated input tokens per role; `available_tools` adds the names of the tools the request offered; `generation_settings` adds numeric and enumerated settings such as temperature and the finish reason. + enum: + - tool_usage + - tool_output_size + - tool_names + - conversation_shape + - input_size_by_role + - available_tools + - generation_settings + example: tool_usage + type: string + x-enum-varnames: + - TOOL_USAGE + - TOOL_OUTPUT_SIZE + - TOOL_NAMES + - CONVERSATION_SHAPE + - INPUT_SIZE_BY_ROLE + - AVAILABLE_TOOLS + - GENERATION_SETTINGS + AiGatewayModelCapabilities: + description: Model features reported by the enrichment source. Omitted properties are unknown. + properties: + attachment: + description: Whether attachment input is supported. + type: boolean + interleaved_reasoning: + description: Whether reasoning can be interleaved with tool use. + type: boolean + reasoning: + description: Whether reasoning is supported. + type: boolean + structured_output: + description: Whether structured output is supported. + type: boolean + temperature: + description: Whether temperature can be configured. + type: boolean + tool_call: + description: Whether tool calls are supported. + type: boolean + type: object + AiGatewayModelCatalogEntryAttributes: + description: Model catalog entry configuration and metadata. + properties: + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + enabled: + description: Whether the resource is enabled. + example: true + type: boolean + metadata: + $ref: "#/components/schemas/AiGatewayModelMetadata" + model_id_canonical: + description: Provider-independent model identifier. + example: gpt-5.2-codex + type: string + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + type: string + provider_id: + description: Provider identifier. + example: 42 + format: int64 + type: integer + source: + $ref: "#/components/schemas/AiGatewayModelSource" + supported_operations: + description: Operations supported by the model. + example: + - OPENAI_CHAT_COMPLETIONS + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + required: + - provider_id + - model_id_canonical + - model_id_wire + - supported_operations + - enabled + - source + - created_at + - updated_at + type: object + AiGatewayModelCatalogEntryIdentifier: + description: Model catalog entry identifier. + properties: + id: + description: Resource identifier. + example: "101" + type: string + type: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryType" + required: + - type + - id + type: object + AiGatewayModelCatalogEntryListResponse: + description: Response containing model catalog entries. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryResource" + description: Model catalog entry resource. + type: array + required: + - data + type: object + AiGatewayModelCatalogEntryResource: + description: AI Gateway model catalog entry resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryAttributes" + id: + description: Resource identifier. + example: "101" + type: string + type: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryType" + required: + - type + - id + - attributes + type: object + AiGatewayModelCatalogEntryResponse: + description: Response containing one model catalog entry. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryResource" + required: + - data + type: object + AiGatewayModelCatalogEntryType: + description: Model catalog entry resource type. + enum: + - model-catalog-entries + example: model-catalog-entries + type: string + x-enum-varnames: + - MODEL_CATALOG_ENTRIES + AiGatewayModelCreateAttributes: + description: Attributes used to create a model catalog entry. + properties: + model_id_canonical: + description: Provider-independent model identifier. + example: gpt-5.2-codex + maxLength: 256 + minLength: 1 + type: string + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + maxLength: 256 + minLength: 1 + type: string + supported_operations: + description: Operations supported by the model. + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + required: + - model_id_canonical + - model_id_wire + type: object + AiGatewayModelCreateData: + description: Data used to create a model catalog entry. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryType" + required: + - type + - attributes + type: object + AiGatewayModelCreateRequest: + description: Request to create a model catalog entry. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelCreateData" + required: + - data + type: object + AiGatewayModelGroupAttributes: + description: Complete AI Gateway model group configuration. + properties: + allow_fast_mode: + description: Whether fast mode is allowed for models and routing rules in the group. + example: true + type: boolean + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + max_reasoning_level: + $ref: "#/components/schemas/AiGatewayNullableMaxReasoningLevel" + description: Maximum reasoning level. Null means there is no group-specific limit. + model_ids: + description: All saved model catalog IDs, including selections whose provider metadata is hidden. Preserve these IDs independently of the visible catalog. + example: + - 101 + items: + description: Saved opaque model catalog ID. + example: 101 + format: int64 + minimum: 1 + type: integer + type: array + models: + description: Metadata for saved model selections whose providers the caller can view. Missing metadata does not remove a saved ID. + items: + $ref: "#/components/schemas/AiGatewayModelGroupModel" + type: array + name: + description: Human-readable resource name. + example: Coding models + type: string + provider_ids: + description: All explicitly selected provider IDs, including hidden providers. Embedded provider metadata includes only viewable providers. + example: + - 42 + items: + description: Saved opaque provider ID. + example: 42 + format: int64 + minimum: 1 + type: integer + type: array + providers: + description: Viewable explicitly selected providers, separate from individually selected models. Use provider_ids to retain all selections. + items: + $ref: "#/components/schemas/AiGatewayModelGroupProvider" + type: array + revision: + description: Revision of the organization-wide policy. Present for the default model group and absent for named policies. + format: int64 + minimum: 0 + type: integer + routing_rules: + items: + $ref: "#/components/schemas/AiGatewayModelGroupRoutingRule" + description: Routing rule in the group. + type: array + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + required: + - model_ids + - provider_ids + - name + - models + - providers + - routing_rules + - created_at + - updated_at + - allow_fast_mode + - max_reasoning_level + type: object + AiGatewayModelGroupBinding: + description: Initial access binding for an AI Gateway model group. + properties: + principals: + description: Principals granted the relation. + example: + - "user:55555555-5555-5555-5555-555555555555" + items: + description: Principal identifier. + example: "user:55555555-5555-5555-5555-555555555555" + minLength: 1 + type: string + minItems: 1 + type: array + relation: + $ref: "#/components/schemas/AiGatewayModelGroupBindingRelation" + required: + - relation + - principals + type: object + AiGatewayModelGroupBindingRelation: + description: Access relation granted on a model group. + enum: + - viewer + - runner + - editor + example: runner + type: string + x-enum-varnames: + - VIEWER + - RUNNER + - EDITOR + AiGatewayModelGroupCreateAttributes: + description: Attributes used to create an AI Gateway model group. + properties: + allow_fast_mode: + default: true + description: Whether fast mode is allowed for models and routing rules in the group. + example: true + type: boolean + bindings: + description: Optional initial model-group access bindings. + items: + $ref: "#/components/schemas/AiGatewayModelGroupBinding" + type: array + max_reasoning_level: + $ref: "#/components/schemas/AiGatewayMaxReasoningLevel" + description: Optional maximum reasoning level. Omit for no group-specific limit. + model_ids: + description: Model catalog IDs to select. New selections require provider View. + items: + description: Model catalog entry ID. + example: 101 + format: int64 + minimum: 1 + type: integer + type: array + name: + description: Human-readable resource name. + example: Coding models + maxLength: 256 + minLength: 1 + type: string + provider_ids: + description: Explicit provider selections, including current and future models. Omit to preserve selections on update; an empty array clears them. Null is invalid. New selections require provider View; saved hidden IDs can be retained or removed. + items: + description: Provider ID. + format: int64 + minimum: 1 + type: integer + type: array + routing_rule_slugs: + description: Organization-unique routing rule slugs, such as coding-route. + items: + description: Routing rule slug. + example: coding-route + maxLength: 128 + minLength: 1 + type: string + type: array + required: + - name + type: object + AiGatewayModelGroupCreateData: + description: Data used to create an AI Gateway model group. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelGroupCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayModelGroupType" + required: + - type + - attributes + type: object + AiGatewayModelGroupCreateRequest: + description: Request to create an AI Gateway model group. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelGroupCreateData" + required: + - data + type: object + AiGatewayModelGroupListResponse: + description: Response containing AI Gateway model groups. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayModelGroupResource" + description: AI Gateway model group resource. + type: array + required: + - data + type: object + AiGatewayModelGroupModel: + description: Model catalog entry embedded in a model group. + properties: + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + enabled: + description: Whether the resource is enabled. + example: true + type: boolean + id: + description: Model catalog entry identifier. + example: "101" + type: string + metadata: + $ref: "#/components/schemas/AiGatewayModelMetadata" + model_id_canonical: + description: Provider-independent model identifier. + example: gpt-5.2-codex + type: string + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + type: string + provider_id: + description: Provider identifier. + example: 42 + format: int64 + type: integer + source: + $ref: "#/components/schemas/AiGatewayModelSource" + supported_operations: + description: Operations supported by the model. + example: + - OPENAI_CHAT_COMPLETIONS + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + required: + - id + - provider_id + - model_id_canonical + - model_id_wire + - supported_operations + - enabled + - source + - created_at + - updated_at + type: object + AiGatewayModelGroupProvider: + description: Explicitly selected provider. Its current and future models are covered. + properties: + id: + description: Provider ID. + example: 42 + format: int64 + minimum: 1 + type: integer + name: + description: Provider display name. + example: production-us + type: string + required: + - id + - name + type: object + AiGatewayModelGroupResource: + description: AI Gateway model group resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelGroupAttributes" + id: + description: Resource identifier. + example: "7" + type: string + type: + $ref: "#/components/schemas/AiGatewayModelGroupType" + required: + - type + - id + - attributes + type: object + AiGatewayModelGroupResponse: + description: Response containing one AI Gateway model group. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelGroupResource" + required: + - data + type: object + AiGatewayModelGroupRoutingRule: + description: Routing rule in an AI Gateway model group. + properties: + slug: + description: Organization-unique routing rule slug. + example: coding-route + type: string + required: + - slug + type: object + AiGatewayModelGroupType: + description: AI Gateway model group resource type. + enum: + - model-groups + example: model-groups + type: string + x-enum-varnames: + - MODEL_GROUPS + AiGatewayModelGroupUpdateAttributes: + description: Attributes used to update an AI Gateway model group. + properties: + allow_fast_mode: + description: Whether fast mode is allowed for models and routing rules in the group. + example: true + type: boolean + expected_revision: + description: Required when updating the default model group. Must match its current revision; a stale revision returns HTTP 409. Omit for named policies. + format: int64 + minimum: 0 + type: integer + max_reasoning_level: + $ref: "#/components/schemas/AiGatewayNullableMaxReasoningLevel" + description: Maximum reasoning level. Null clears the group-specific limit. + model_ids: + description: Individually selected model catalog IDs. Replaces this selection only. Omit to preserve it; an empty array clears it. Null is invalid. Individual selections do not include future models. New selections require provider View; retaining or removing saved hidden selections requires only parent Edit. + items: + description: Model catalog entry ID. + example: 101 + format: int64 + minimum: 1 + type: integer + type: array + name: + description: Human-readable resource name. + example: Coding models + maxLength: 256 + minLength: 1 + type: string + provider_ids: + description: Explicit provider selections, including current and future models. Omit to preserve selections on update; an empty array clears them. Null is invalid. New selections require provider View; saved hidden IDs can be retained or removed. + items: + description: Provider ID. + format: int64 + minimum: 1 + type: integer + type: array + routing_rule_slugs: + description: Organization-unique routing rule slugs. Replaces route selections only. Omit to preserve them; an empty array clears them. Null is invalid. + items: + description: Routing rule slug. + example: coding-route + maxLength: 128 + minLength: 1 + type: string + type: array + type: object + AiGatewayModelGroupUpdateData: + description: Data used to update an AI Gateway model group. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelGroupUpdateAttributes" + id: + description: Resource identifier. + example: "7" + type: string + type: + $ref: "#/components/schemas/AiGatewayModelGroupType" + required: + - type + - id + - attributes + type: object + AiGatewayModelGroupUpdateRequest: + description: Request to update an AI Gateway model group. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelGroupUpdateData" + required: + - data + type: object + AiGatewayModelInput: + description: Manually managed model definition supplied when creating a provider or catalog entry. + properties: + model_id_canonical: + description: Provider-independent model identifier. + example: gpt-5.2-codex + maxLength: 256 + minLength: 1 + type: string + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + maxLength: 256 + minLength: 1 + type: string + supported_operations: + description: Operations supported by the model. + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + required: + - model_id_canonical + - model_id_wire + type: object + AiGatewayModelLimits: + description: Token limits reported by the enrichment source. + properties: + context_window_tokens: + description: Total model context window in tokens. + example: 400000 + format: int64 + minimum: 0 + type: integer + max_input_tokens: + description: Maximum input tokens when reported separately. + format: int64 + minimum: 0 + type: integer + max_output_tokens: + description: Maximum output tokens. + example: 128000 + format: int64 + minimum: 0 + type: integer + type: object + AiGatewayModelMetadata: + description: Optional, typed enrichment for a model catalog entry. Missing properties remain unknown. + properties: + capabilities: + $ref: "#/components/schemas/AiGatewayModelCapabilities" + description: + description: Human-readable model description. + type: string + display_name: + description: Human-readable model name. + type: string + family: + description: Model family identifier. + type: string + kind: + $ref: "#/components/schemas/AiGatewayModelMetadataKind" + knowledge_cutoff: + description: Knowledge cutoff reported by the source. + type: string + last_updated: + description: Date the source record was last updated. + pattern: '^\d{4}-\d{2}(-\d{2})?$' + type: string + lifecycle: + $ref: "#/components/schemas/AiGatewayModelMetadataLifecycle" + limits: + $ref: "#/components/schemas/AiGatewayModelLimits" + modalities: + $ref: "#/components/schemas/AiGatewayModelModalities" + open_weights: + description: Whether model weights are openly available. + type: boolean + reasoning: + $ref: "#/components/schemas/AiGatewayModelReasoning" + reference_pricing: + description: Provider-specific reference prices from the enrichment source. Omitted for shared canonical-model fallback matches. These do not determine gateway charges. + items: + $ref: "#/components/schemas/AiGatewayModelReferencePrice" + type: array + release_date: + description: Model release date. + pattern: '^\d{4}-\d{2}(-\d{2})?$' + type: string + source: + $ref: "#/components/schemas/AiGatewayModelMetadataSource" + status: + $ref: "#/components/schemas/AiGatewayModelMetadataStatus" + required: + - source + - status + - capabilities + - modalities + - limits + type: object + AiGatewayModelMetadataKind: + description: Primary model kind. Decision models return a choice or score instead of generated text. + enum: + - language + - embedding + - image + - audio + - decision + - reranking + type: string + x-enum-varnames: + - LANGUAGE + - EMBEDDING + - IMAGE + - AUDIO + - DECISION + - RERANKING + AiGatewayModelMetadataLifecycle: + description: Model lifecycle state. + enum: + - active + - alpha + - beta + - deprecated + type: string + x-enum-varnames: + - ACTIVE + - ALPHA + - BETA + - DEPRECATED + AiGatewayModelMetadataSource: + description: Provenance for model metadata enrichment. + properties: + matched_by: + $ref: "#/components/schemas/AiGatewayModelMetadataSourceMatchedBy" + model_id: + description: Model identifier in the metadata source provider catalog. + example: gpt-5.2-codex + type: string + name: + description: Metadata source name. + example: models.dev + type: string + observed_at: + description: Last successful observation of this valid source record. Retained invalid entries keep their previous timestamp. + format: date-time + type: string + provider: + description: Provider namespace in the metadata source, or canonical for a shared model record. + example: openai + type: string + revision: + description: SHA-256 content revision of the source snapshot that supplied this record. + type: string + required: + - name + - provider + - model_id + - matched_by + type: object + AiGatewayModelMetadataSourceMatchedBy: + description: Identifier strategy used to match the gateway catalog entry. Date-suffix and shared canonical-model fallback matches produce partial metadata. + enum: + - override + - wire_id + - canonical_id + - wire_id_date_suffix + - canonical_model + example: wire_id + type: string + x-enum-varnames: + - OVERRIDE + - WIRE_ID + - CANONICAL_ID + - WIRE_ID_DATE_SUFFIX + - CANONICAL_MODEL + AiGatewayModelMetadataStatus: + description: Completeness of the matched source record. Partial also identifies metadata from a base model for a dated snapshot or from a shared canonical-model fallback. + enum: + - available + - partial + example: available + type: string + x-enum-varnames: + - AVAILABLE + - PARTIAL + AiGatewayModelModalities: + description: Supported model input and output modalities. + properties: + input: + items: + description: Input modality. + example: text + type: string + type: array + output: + items: + description: Output modality. + example: text + type: string + type: array + type: object + AiGatewayModelPricingAttributes: + description: Attributes of a model pricing resource. + properties: + effective_source: + $ref: "#/components/schemas/AiGatewayModelPricingEffectiveSource" + pricing_config: + $ref: "#/components/schemas/AiGatewayModelPricingConfig" + description: Pricing configuration for the model. + type: object + AiGatewayModelPricingCatalogRequestConfig: + additionalProperties: false + description: Catalog pricing configuration with optional manual rate overrides. + properties: + overrides: + $ref: "#/components/schemas/AiGatewayModelPricingRates" + description: Manual pricing overrides. + source: + $ref: "#/components/schemas/AiGatewayModelPricingCatalogRequestSource" + version: + $ref: "#/components/schemas/AiGatewayModelPricingVersion" + required: + - version + - source + type: object + AiGatewayModelPricingCatalogRequestSource: + additionalProperties: false + description: Source for a catalog pricing configuration. + properties: + provider_id: + description: Pricing catalog provider identifier. + example: openai + minLength: 1 + type: string + type: + $ref: "#/components/schemas/AiGatewayModelPricingCatalogRequestSourceType" + required: + - type + - provider_id + type: object + AiGatewayModelPricingCatalogRequestSourceType: + description: Catalog pricing source type. + enum: + - catalog + example: catalog + type: string + x-enum-varnames: + - CATALOG + AiGatewayModelPricingConfig: + description: Pricing configuration for a model. + properties: + overrides: + $ref: "#/components/schemas/AiGatewayModelPricingRates" + description: Manual pricing overrides. + rates: + $ref: "#/components/schemas/AiGatewayModelPricingRates" + description: Effective pricing rates. + source: + $ref: "#/components/schemas/AiGatewayModelPricingSource" + description: Source of the pricing data. + version: + $ref: "#/components/schemas/AiGatewayModelPricingVersion" + required: + - version + - source + type: object + AiGatewayModelPricingCustomRequestConfig: + additionalProperties: false + description: Custom pricing configuration. All four rates are required. + properties: + rates: + $ref: "#/components/schemas/AiGatewayModelPricingRequiredRates" + source: + $ref: "#/components/schemas/AiGatewayModelPricingCustomRequestSource" + version: + $ref: "#/components/schemas/AiGatewayModelPricingVersion" + required: + - version + - source + - rates + type: object + AiGatewayModelPricingCustomRequestSource: + additionalProperties: false + description: Source for a custom pricing configuration. + properties: + type: + $ref: "#/components/schemas/AiGatewayModelPricingCustomRequestSourceType" + required: + - type + type: object + AiGatewayModelPricingCustomRequestSourceType: + default: custom + description: Custom pricing source type. + enum: + - custom + example: custom + type: string + x-enum-varnames: + - CUSTOM + AiGatewayModelPricingEffectiveSource: + description: Effective source of the model pricing data. + enum: + - catalog_auto + - model_override + - unknown + type: string + x-enum-varnames: + - CATALOG_AUTO + - MODEL_OVERRIDE + - UNKNOWN + AiGatewayModelPricingRates: + additionalProperties: false + description: Pricing rates for a model. + minProperties: 1 + properties: + cache_read_cost_per_mtok: + description: Cost per million tokens for cache reads. + format: double + minimum: 0 + type: number + cache_write_cost_per_mtok: + description: Cost per million tokens for cache writes. + format: double + minimum: 0 + type: number + non_cached_input_cost_per_mtok: + description: Cost per million tokens for non-cached input. + format: double + minimum: 0 + type: number + output_cost_per_mtok: + description: Cost per million tokens for output. + format: double + minimum: 0 + type: number + type: object + AiGatewayModelPricingRequest: + description: Request body for setting model pricing. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelPricingRequestData" + required: + - data + type: object + AiGatewayModelPricingRequestAttributes: + description: Attributes for a model pricing request. + properties: + pricing_config: + $ref: "#/components/schemas/AiGatewayModelPricingRequestConfig" + description: Pricing configuration for the model. + required: + - pricing_config + type: object + AiGatewayModelPricingRequestConfig: + description: Pricing configuration accepted when setting model pricing. + oneOf: + - $ref: "#/components/schemas/AiGatewayModelPricingCustomRequestConfig" + - $ref: "#/components/schemas/AiGatewayModelPricingCatalogRequestConfig" + AiGatewayModelPricingRequestData: + description: Data for a model pricing request. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelPricingRequestAttributes" + id: + description: Resource identifier. + example: gpt-4o + type: string + type: + $ref: "#/components/schemas/AiGatewayModelPricingType" + required: + - type + - id + - attributes + type: object + AiGatewayModelPricingRequiredRates: + additionalProperties: false + description: Complete set of rates required for custom pricing. + properties: + cache_read_cost_per_mtok: + description: Cost per million tokens for cache reads. + example: 0.0 + format: double + minimum: 0 + type: number + cache_write_cost_per_mtok: + description: Cost per million tokens for cache writes. + example: 0.0 + format: double + minimum: 0 + type: number + non_cached_input_cost_per_mtok: + description: Cost per million tokens for non-cached input. + example: 0.0 + format: double + minimum: 0 + type: number + output_cost_per_mtok: + description: Cost per million tokens for output. + example: 0.0 + format: double + minimum: 0 + type: number + required: + - non_cached_input_cost_per_mtok + - cache_write_cost_per_mtok + - cache_read_cost_per_mtok + - output_cost_per_mtok + type: object + AiGatewayModelPricingResponse: + description: Response containing model pricing information. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelPricingResponseData" + required: + - data + type: object + AiGatewayModelPricingResponseData: + description: Data for a model pricing response. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelPricingAttributes" + id: + description: Resource identifier. + example: gpt-4o + type: string + type: + $ref: "#/components/schemas/AiGatewayModelPricingType" + required: + - type + - id + - attributes + type: object + AiGatewayModelPricingSource: + description: Source information for a model's pricing. + properties: + provider_id: + description: Pricing catalog provider identifier. + example: openai + type: string + type: + $ref: "#/components/schemas/AiGatewayModelPricingSourceType" + required: + - type + type: object + AiGatewayModelPricingSourceType: + description: Source type for the pricing configuration. + enum: + - catalog + - custom + example: custom + type: string + x-enum-varnames: + - CATALOG + - CUSTOM + AiGatewayModelPricingType: + description: Model pricing resource type. + enum: + - model-pricing + example: model-pricing + type: string + x-enum-varnames: + - MODEL_PRICING + AiGatewayModelPricingVersion: + description: Pricing configuration version. The only supported version is `1`. + example: 1 + format: int64 + maximum: 1 + minimum: 1 + type: integer + AiGatewayModelReasoning: + description: Supported reasoning controls. Absence means controls are unknown or unavailable. + properties: + controls: + items: + $ref: "#/components/schemas/AiGatewayModelReasoningControl" + type: array + required: + - controls + type: object + AiGatewayModelReasoningControl: + description: One supported mechanism for configuring model reasoning. + properties: + effort_levels: + description: Supported effort values in provider order for an effort control. + items: + description: Provider reasoning effort value. + example: high + nullable: true + type: string + type: array + max_budget_tokens: + description: Maximum reasoning-token budget. + format: int64 + minimum: 0 + type: integer + min_budget_tokens: + description: Minimum reasoning-token budget. + format: int64 + minimum: -1 + type: integer + type: + $ref: "#/components/schemas/AiGatewayModelReasoningControlType" + required: + - type + type: object + AiGatewayModelReasoningControlType: + description: Reasoning-control mechanism. + enum: + - toggle + - effort + - budget_tokens + example: effort + type: string + x-enum-varnames: + - TOGGLE + - EFFORT + - BUDGET_TOKENS + AiGatewayModelReferencePrice: + description: Informational source pricing, not gateway billing configuration. Prices can differ by provider, mode, and input length. + properties: + amount: + description: Exact decimal amount per unit, zero or greater, represented as a string to preserve precision. Supports fixed decimal and exponent notation. + example: "2.5" + pattern: '^\d+(\.\d+)?([eE][+-]?\d+)?$' + type: string + component: + description: Token category priced, such as input, output, cache_read, or cache_write. + example: input + type: string + context_max_tokens: + description: Largest input length covered by this price. Omitted when there is no upper bound. + example: 272000 + format: int64 + minimum: 1 + type: integer + context_min_tokens: + description: Input length above which this price applies. Zero identifies the base tier. + example: 0 + format: int64 + minimum: 0 + type: integer + currency: + description: Currency of the price. The only supported value is USD. + example: USD + type: string + mode: + description: Source mode name. Standard is the base mode; other values, such as fast, are source-defined. + example: standard + type: string + service_tier: + description: Provider service tier explicitly associated with this mode by the source. Omitted when unknown. + example: priority + type: string + unit: + description: Unit of the quoted amount. The only supported value is million_tokens. + example: million_tokens + type: string + required: + - component + - currency + - unit + - amount + - mode + - context_min_tokens + type: object + AiGatewayModelSource: + description: How a model catalog entry is managed. + enum: + - discovered + - manual + example: discovered + type: string + x-enum-varnames: + - DISCOVERED + - MANUAL + AiGatewayModelUpdateAttributes: + description: Attributes used to update a model catalog entry. + properties: + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + maxLength: 256 + type: string + supported_operations: + description: Operations supported by the model. + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + type: object + AiGatewayModelUpdateData: + description: Data used to update a model catalog entry. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelUpdateAttributes" + id: + description: Resource identifier. + example: "101" + type: string + type: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryType" + required: + - type + - id + - attributes + type: object + AiGatewayModelUpdateRequest: + description: Request to update a model catalog entry. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelUpdateData" + required: + - data + type: object + AiGatewayModelsBulkCreateAttributes: + description: Attributes used to create several model catalog entries. + properties: + models: + items: + $ref: "#/components/schemas/AiGatewayModelCreateAttributes" + description: Model catalog entry attributes. + minItems: 1 + type: array + required: + - models + type: object + AiGatewayModelsBulkCreateData: + description: Data used to create several model catalog entries. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelsBulkCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryType" + required: + - type + - attributes + type: object + AiGatewayModelsBulkCreateRequest: + description: Request to create several model catalog entries. + properties: + data: + $ref: "#/components/schemas/AiGatewayModelsBulkCreateData" + required: + - data + type: object + AiGatewayModelsByCanonicalAttributes: + description: Provider entries grouped under one canonical model ID. + properties: + model_id_canonical: + description: Provider-independent model identifier. + example: gpt-5.2-codex + type: string + providers: + items: + $ref: "#/components/schemas/AiGatewayProviderModelEntry" + description: Provider-specific model entry. + type: array + required: + - model_id_canonical + - providers + type: object + AiGatewayModelsByCanonicalListResponse: + description: Response containing model catalog entries grouped by canonical ID. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayModelsByCanonicalResource" + description: Canonical model grouping. + type: array + required: + - data + type: object + AiGatewayModelsByCanonicalResource: + description: Canonical model grouping resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayModelsByCanonicalAttributes" + id: + description: Resource identifier. + example: gpt-5.2-codex + type: string + type: + $ref: "#/components/schemas/AiGatewayModelsByCanonicalType" + required: + - type + - id + - attributes + type: object + AiGatewayModelsByCanonicalType: + description: Canonical model grouping resource type. + enum: + - models-by-canonical + example: models-by-canonical + type: string + x-enum-varnames: + - MODELS_BY_CANONICAL + AiGatewayNullableMaxReasoningLevel: + description: Maximum reasoning level permitted by a model group. + enum: + - none + - minimal + - low + - medium + - high + - xhigh + - max + example: high + nullable: true + type: string + x-enum-varnames: + - NONE + - MINIMAL + - LOW + - MEDIUM + - HIGH + - XHIGH + - MAX + AiGatewayNullableRoutingRuleTierOrdering: + default: configured + description: >- + How a tier orders its targets. Omitted or null defaults to configured, which preserves target order. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. + enum: + - configured + - weighted_affinity + example: configured + nullable: true + type: string + x-enum-varnames: + - CONFIGURED + - WEIGHTED_AFFINITY + AiGatewayPolicyAttributes: + description: Routing policy configuration. + properties: + priority: + description: Routing priority. + example: 1 + format: int64 + type: integer + tiers: + items: + $ref: "#/components/schemas/AiGatewayPolicyTier" + description: Resolved routing policy tier. + type: array + required: + - priority + - tiers + type: object + AiGatewayPolicyListResponse: + description: Response containing routing policy documents. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayPolicyResource" + description: Routing policy resource. + type: array + required: + - data + type: object + AiGatewayPolicyRequest: + description: Request to create or replace a routing policy document. + properties: + data: + $ref: "#/components/schemas/AiGatewayPolicyRequestData" + required: + - data + type: object + AiGatewayPolicyRequestAttributes: + description: Attributes used to create or replace a routing policy document. + properties: + inbound: + description: Inbound request pattern. + example: coding-agent + maxLength: 256 + minLength: 1 + type: string + priority: + description: Routing priority. + example: 1 + format: int64 + type: integer + tiers: + items: + $ref: "#/components/schemas/AiGatewayPolicyTierRequest" + description: Routing policy tier. + minItems: 1 + type: array + required: + - inbound + - tiers + type: object + AiGatewayPolicyRequestData: + description: Data used to create or replace a routing policy document. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayPolicyRequestAttributes" + type: + $ref: "#/components/schemas/AiGatewayPolicyType" + required: + - type + - attributes + type: object + AiGatewayPolicyResource: + description: AI Gateway routing policy resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayPolicyAttributes" + id: + description: Resource identifier. + example: coding-agent + type: string + type: + $ref: "#/components/schemas/AiGatewayPolicyType" + required: + - type + - id + - attributes + type: object + AiGatewayPolicyResponse: + description: Response containing one routing policy document. + properties: + data: + $ref: "#/components/schemas/AiGatewayPolicyResource" + required: + - data + type: object + AiGatewayPolicyTarget: + description: Resolved routing target in a policy response. + properties: + id: + description: Saved target row ID. On replacement, retain this ID only within its original route and at most once. A stale or foreign ID is rejected. + example: 901 + format: int64 + minimum: 1 + type: integer + model: + description: Model name or pattern. Omitted when retaining a saved target by ID or when its provider is hidden. + example: gpt-5.2-codex + type: string + priority: + description: Routing priority. + example: 1 + format: int64 + type: integer + provider: + description: Provider slug. Omitted for dynamic resolution or when its provider is hidden. + example: prod-us + nullable: true + type: string + required: + - id + - priority + type: object + AiGatewayPolicyTargetRequest: + description: Provider and model target in a routing policy request. + properties: + id: + description: Saved target row ID. On replacement, retain this ID only within its original route and at most once. A stale or foreign ID is rejected. + example: 901 + format: int64 + minimum: 1 + type: integer + model: + description: Model name or pattern. Omitted when retaining a saved target by ID or when its provider is hidden. + example: gpt-5.2-codex + maxLength: 256 + minLength: 1 + type: string + provider: + description: Provider slug. Omitted for dynamic resolution or when its provider is hidden. + example: prod-us + maxLength: 256 + type: string + type: object + AiGatewayPolicyTier: + description: Resolved routing policy tier. + properties: + targets: + items: + $ref: "#/components/schemas/AiGatewayPolicyTarget" + description: Resolved routing policy target. + type: array + required: + - targets + type: object + AiGatewayPolicyTierRequest: + description: Routing policy tier supplied in a request. + properties: + priority: + description: Routing priority. + example: 1 + format: int64 + type: integer + targets: + items: + $ref: "#/components/schemas/AiGatewayPolicyTargetRequest" + description: Routing policy target. + minItems: 1 + type: array + required: + - targets + type: object + AiGatewayPolicyType: + description: AI Gateway routing policy resource type. + enum: + - routing-documents + example: routing-documents + type: string + x-enum-varnames: + - ROUTING_DOCUMENTS + AiGatewayProviderAttributes: + description: AI Gateway provider configuration and metadata. + properties: + cost_multiplier: + description: Multiplier applied to provider costs. + example: 1.0 + format: double + type: number + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + integration_account_id: + description: Provider integration account identifier. + example: account-123 + type: string + integration_config: + $ref: "#/components/schemas/AiGatewayProviderIntegrationConfig" + known_provider: + $ref: "#/components/schemas/AiGatewayKnownProvider" + name: + description: Human-readable resource name. + example: production-us + type: string + slug: + description: Immutable routing identifier. + example: prod-us + type: string + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + required: + - name + - slug + - known_provider + - integration_account_id + - created_at + - updated_at + - cost_multiplier + type: object + AiGatewayProviderCreateAttributes: + description: Attributes used to create an AI Gateway provider. + properties: + cost_multiplier: + default: 1.0 + description: Multiplier applied to provider costs. Must be greater than 0 and at most 1000000. + example: 1.0 + exclusiveMinimum: true + format: double + maximum: 1000000 + minimum: 0 + type: number + initial_bindings: + description: Reserved for initial View/Edit permissions. Supplying this attribute, including an empty array or null, returns HTTP 503 before discovery or persistence. Omit it for normal creation. + items: + $ref: "#/components/schemas/AiGatewayProviderInitialBinding" + type: array + integration_account_id: + description: Provider integration account identifier. + example: account-123 + maxLength: 256 + type: string + integration_config: + $ref: "#/components/schemas/AiGatewayProviderIntegrationConfig" + known_provider: + $ref: "#/components/schemas/AiGatewayKnownProvider" + models: + description: Manually managed models to add alongside models discovered from the provider integration. + items: + $ref: "#/components/schemas/AiGatewayModelInput" + description: Manually managed provider model definition. + type: array + name: + description: Human-readable resource name. + example: production-us + maxLength: 256 + minLength: 1 + type: string + slug: + description: Immutable routing identifier. + example: prod-us + maxLength: 256 + minLength: 1 + pattern: "^[A-Za-z0-9_-]+$" + type: string + required: + - name + - slug + type: object + AiGatewayProviderCreateData: + description: Data used to create an AI Gateway provider. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayProviderCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayProviderType" + required: + - type + - attributes + type: object + AiGatewayProviderCreateRequest: + description: Request to create an AI Gateway provider. + properties: + data: + $ref: "#/components/schemas/AiGatewayProviderCreateData" + required: + - data + type: object + AiGatewayProviderInitialBinding: + description: Reserved initial provider access binding. Initial provider sharing is unavailable. + properties: + principals: + description: Access principals in type:id form. + example: + - "org:11111111-1111-1111-1111-111111111111" + items: + description: User, team, role, or organization principal. + example: "org:11111111-1111-1111-1111-111111111111" + type: string + minItems: 1 + type: array + relation: + $ref: "#/components/schemas/AiGatewayProviderInitialBindingRelation" + required: + - relation + - principals + type: object + AiGatewayProviderInitialBindingRelation: + description: Provider access relation. Editor also grants View. + enum: [viewer, editor] + example: viewer + type: string + x-enum-varnames: [VIEWER, EDITOR] + AiGatewayProviderIntegrationConfig: + description: Provider-specific integration configuration. + properties: + bedrock_region: + description: AWS region used for Bedrock model discovery, routing, and request signing. + example: us-east-1 + maxLength: 64 + type: string + foundry_project: + description: Azure AI Foundry project name, used to call the project's agents. + example: my-project + maxLength: 256 + type: string + foundry_resource_id: + description: ARM resource ID of the Azure AI Foundry resource, such as `/subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts/`. Required for `azure_foundry` providers. + example: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry + maxLength: 512 + type: string + location: + description: GCP location used for Gemini model discovery and credential resolution. + example: us-central1 + maxLength: 256 + type: string + project_id: + description: GCP project ID used for Gemini model discovery and credential resolution. + example: my-gcp-project + maxLength: 256 + type: string + supported_operations: + description: Custom provider default for discovered and new manual models. Omit to use Chat Completions. An empty list is invalid. + items: + $ref: "#/components/schemas/AiGatewayCustomProviderSupportedOperation" + minItems: 1 + type: array + type: object + AiGatewayProviderListResponse: + description: Response containing AI Gateway providers. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayProviderResource" + description: AI Gateway provider resource. + type: array + required: + - data + type: object + AiGatewayProviderModelEntry: + description: Provider-specific entry for a canonical model. + properties: + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + enabled: + description: Whether the resource is enabled. + example: true + type: boolean + id: + description: Resource identifier. + example: "101" + type: string + metadata: + $ref: "#/components/schemas/AiGatewayModelMetadata" + model_id_wire: + description: Model identifier sent to the provider. + example: gpt-5.2-codex-20260801 + type: string + provider_id: + description: Provider identifier. + example: 42 + format: int64 + type: integer + source: + $ref: "#/components/schemas/AiGatewayModelSource" + supported_operations: + description: Operations supported by the model. + example: + - OPENAI_CHAT_COMPLETIONS + items: + $ref: "#/components/schemas/AiGatewaySupportedOperation" + type: array + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + required: + - id + - provider_id + - model_id_wire + - supported_operations + - enabled + - source + - created_at + - updated_at + type: object + AiGatewayProviderModelsRelationship: + description: Model catalog entries associated with a provider. + properties: + data: + $ref: "#/components/schemas/AiGatewayProviderModelsRelationshipData" + required: + - data + type: object + AiGatewayProviderModelsRelationshipData: + items: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryIdentifier" + description: Model catalog entry identifier. + type: array + AiGatewayProviderRelationships: + description: Provider relationships. + properties: + models: + $ref: "#/components/schemas/AiGatewayProviderModelsRelationship" + required: + - models + type: object + AiGatewayProviderResource: + description: AI Gateway provider resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayProviderAttributes" + id: + description: Resource identifier. + example: "42" + type: string + relationships: + $ref: "#/components/schemas/AiGatewayProviderRelationships" + type: + $ref: "#/components/schemas/AiGatewayProviderType" + required: + - type + - id + - attributes + type: object + AiGatewayProviderResponse: + description: Response containing one AI Gateway provider. + properties: + data: + $ref: "#/components/schemas/AiGatewayProviderResource" + included: + description: Model catalog entries created with the provider. + items: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryResource" + description: Model catalog entry resource. + type: array + required: + - data + type: object + AiGatewayProviderType: + description: AI Gateway provider resource type. + enum: + - providers + example: providers + type: string + x-enum-varnames: + - PROVIDERS + AiGatewayProviderUpdateAttributes: + description: Attributes used to update an AI Gateway provider. + properties: + cost_multiplier: + description: Multiplier applied to provider costs. Must be greater than 0 and at most 1000000. + example: 1.0 + exclusiveMinimum: true + format: double + maximum: 1000000 + minimum: 0 + type: number + name: + description: Human-readable resource name. + example: production-us-v2 + maxLength: 256 + minLength: 1 + type: string + type: object + AiGatewayProviderUpdateData: + description: Data used to update an AI Gateway provider. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayProviderUpdateAttributes" + id: + description: Resource identifier. + example: "42" + type: string + type: + $ref: "#/components/schemas/AiGatewayProviderType" + required: + - type + - id + - attributes + type: object + AiGatewayProviderUpdateRequest: + description: Request to update an AI Gateway provider. + properties: + data: + $ref: "#/components/schemas/AiGatewayProviderUpdateData" + required: + - data + type: object + AiGatewayRateLimitAttributes: + description: Attributes of an AI Gateway rate limit. + properties: + created_at: + description: Creation timestamp. + example: "2026-09-01T00:00:00Z" + format: date-time + type: string + created_by: + description: Email of the user who created this rate limit. + example: user@example.com + type: string + enabled: + description: Whether this rate limit is active. + example: true + type: boolean + input_tokens_per_minute: + description: Maximum input tokens per rolling minute shared by all matching traffic. Null when this rule does not limit input tokens. + example: 500000 + format: int64 + maximum: 100000000000 + minimum: 1 + nullable: true + type: integer + mode: + $ref: "#/components/schemas/AiGatewayRateLimitMode" + monitor_id: + description: Datadog monitor that alerts on this rule. Null until one is provisioned. + example: 12345678 + format: int64 + nullable: true + type: integer + name: + description: Rate limit name. + example: Default rate limit + type: string + output_tokens_per_minute: + description: Maximum output tokens per rolling minute shared by all matching traffic. Null when this rule does not limit output tokens. + example: 200000 + format: int64 + maximum: 100000000000 + minimum: 1 + nullable: true + type: integer + requests_per_minute: + description: Maximum requests per rolling minute shared by all matching traffic. Null when this rule does not limit requests. + example: 1000 + format: int64 + maximum: 10000000 + minimum: 1 + nullable: true + type: integer + revision: + description: Increases on every change to the definition. + example: 1 + format: int64 + type: integer + scope_restricted: + description: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. + example: false + type: boolean + tags: + additionalProperties: + type: string + description: Optional scope tags, such as provider, model, ml_app, or custom dimensions. A request matches when it has all of these tags. + example: + provider: openai + type: object + team_id: + description: Optional Team UUID. Count only requests attributed to this Datadog Team. + example: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb + format: uuid + nullable: true + type: string + updated_at: + description: Last modification timestamp. + example: "2026-09-15T14:30:00Z" + format: date-time + type: string + updated_by: + description: Email of the user who last modified this rate limit. + example: user@example.com + type: string + user_id: + description: Optional user UUID. Count only this user's requests. + example: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + format: uuid + nullable: true + type: string + required: + - scope_restricted + - name + - tags + - mode + - enabled + - revision + - created_by + - updated_by + - created_at + - updated_at + type: object + AiGatewayRateLimitCreateAttributes: + description: Attributes used to create an AI Gateway rate limit. + properties: + input_tokens_per_minute: + description: Maximum input tokens per rolling minute. + format: int64 + maximum: 100000000000 + minimum: 1 + nullable: true + type: integer + mode: + $ref: "#/components/schemas/AiGatewayRateLimitMode" + name: + description: Rate limit name. Must not be empty. + example: Default rate limit + type: string + output_tokens_per_minute: + description: Maximum output tokens per rolling minute. + format: int64 + maximum: 100000000000 + minimum: 1 + nullable: true + type: integer + requests_per_minute: + description: Maximum requests per rolling minute. At least one of `requests_per_minute`, `input_tokens_per_minute`, and `output_tokens_per_minute` is required. + example: 600 + format: int64 + maximum: 10000000 + minimum: 1 + nullable: true + type: integer + tags: + additionalProperties: + type: string + description: Optional scope tags, such as `provider`, `model`, `ml_app`, or custom dimensions. A request matches when it has all of these tags. The reserved metadata keys `name`, `budget_name`, and `span_filter` are rejected. + type: object + team_id: + description: Optional UUID. Count only requests attributed to this Datadog Team. + example: 00000000-0000-4000-8000-000000000002 + format: uuid + type: string + user_id: + description: Optional UUID. Count only this user's requests. + example: 00000000-0000-4000-8000-000000000001 + format: uuid + type: string + required: + - name + type: object + AiGatewayRateLimitCreateData: + description: Data used to create an AI Gateway rate limit. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRateLimitCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayRateLimitType" + required: + - type + - attributes + type: object + AiGatewayRateLimitCreateRequest: + description: Request to create an AI Gateway rate limit. + properties: + data: + $ref: "#/components/schemas/AiGatewayRateLimitCreateData" + required: + - data + type: object + AiGatewayRateLimitListResponse: + description: Response containing AI Gateway rate limits. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayRateLimitResource" + description: AI Gateway rate limit resource. + type: array + required: + - data + type: object + AiGatewayRateLimitMode: + description: Action taken when request rate exceeds the limit. + enum: + - ALERT + - ENFORCE + example: ALERT + type: string + x-enum-varnames: + - ALERT + - ENFORCE + AiGatewayRateLimitResource: + description: AI Gateway rate limit resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRateLimitAttributes" + id: + description: Rate limit UUID. + example: 33333333-3333-3333-3333-333333333333 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayRateLimitType" + required: + - type + - id + - attributes + type: object + AiGatewayRateLimitResponse: + description: Response containing one AI Gateway rate limit. + properties: + data: + $ref: "#/components/schemas/AiGatewayRateLimitResource" + required: + - data + type: object + AiGatewayRateLimitType: + description: AI Gateway rate limit resource type. + enum: + - rate-limits + example: rate-limits + type: string + x-enum-varnames: + - RATE_LIMITS + AiGatewayRateLimitUpdateAttributes: + description: Attributes used to update an AI Gateway rate limit. Only sent fields are changed. + properties: + enabled: + description: Whether this rate limit is active. + type: boolean + input_tokens_per_minute: + description: Set to 0 to remove the request limit. Null is ignored. At least one limit must remain. + format: int64 + maximum: 100000000000 + minimum: 0 + nullable: true + type: integer + mode: + $ref: "#/components/schemas/AiGatewayRateLimitMode" + name: + description: Rate limit name. + type: string + output_tokens_per_minute: + description: Set to 0 to remove the request limit. Null is ignored. At least one limit must remain. + format: int64 + maximum: 100000000000 + minimum: 0 + nullable: true + type: integer + requests_per_minute: + description: Set to 0 to remove the request limit. Null is ignored. At least one limit must remain. + format: int64 + maximum: 10000000 + minimum: 0 + nullable: true + type: integer + tags: + additionalProperties: + type: string + description: Replaces all scope tags. An empty object clears them. Null is ignored. + nullable: true + type: object + team_id: + description: Replaces the Team scope. An empty string clears it. Null is ignored. + nullable: true + type: string + user_id: + description: Replaces the user scope. An empty string clears it. Null is ignored. + nullable: true + type: string + type: object + AiGatewayRateLimitUpdateData: + description: Data used to update an AI Gateway rate limit. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRateLimitUpdateAttributes" + id: + description: Rate limit UUID. Must match the path parameter. + example: 11111111-1111-1111-1111-111111111111 + format: uuid + type: string + type: + $ref: "#/components/schemas/AiGatewayRateLimitType" + required: + - id + - type + - attributes + type: object + AiGatewayRateLimitUpdateRequest: + description: Request to update an AI Gateway rate limit. + properties: + data: + $ref: "#/components/schemas/AiGatewayRateLimitUpdateData" + required: + - data + type: object + AiGatewayRateLimitUsageAttributes: + description: Live consumption of one AI Gateway rate limit. + properties: + input_tokens: + description: Input tokens counted in the rolling one-minute window. + example: 45000 + format: int64 + type: integer + limited_requests: + description: Requests this rate limit rejected in the last 15 minutes. Applies when mode is ENFORCE. + example: 3 + format: int64 + type: integer + output_tokens: + description: Output tokens counted in the rolling one-minute window. + example: 12000 + format: int64 + type: integer + requests: + description: Requests counted in the rolling one-minute window. + example: 120 + format: int64 + type: integer + would_limit_requests: + description: Requests this rate limit would have rejected in the last 15 minutes. Applies when mode is ALERT. + example: 0 + format: int64 + type: integer + required: + - requests + - input_tokens + - output_tokens + - limited_requests + - would_limit_requests + type: object + AiGatewayRateLimitUsageListResponse: + description: Response containing live usage for the organization's AI Gateway rate limits. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayRateLimitUsageResource" + description: Live usage for one AI Gateway rate limit. + type: array + required: + - data + type: object + AiGatewayRateLimitUsageResource: + description: Live usage for one AI Gateway rate limit, or for the untracked or total traffic. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRateLimitUsageAttributes" + id: + description: Rate limit UUID, `untracked` for traffic no enforced rate limit covers, or `total` for all gateway traffic. + example: 33333333-3333-3333-3333-333333333333 + type: string + type: + $ref: "#/components/schemas/AiGatewayRateLimitUsageType" + required: + - type + - id + - attributes + type: object + AiGatewayRateLimitUsageType: + description: AI Gateway rate limit usage resource type. + enum: + - rate-limit-usage + example: rate-limit-usage + type: string + x-enum-varnames: + - RATE_LIMIT_USAGE + AiGatewayRestrictedDetailsMeta: + description: Visibility information for identifying instance details. + properties: + restricted_details: + description: Whether identifying rows were withheld from the returned page. Pagination uses the underlying rows. + example: false + type: boolean + required: + - restricted_details + type: object + AiGatewayRoutingReasoningLevel: + description: >- + Optional reasoning effort preference for this model destination. Must be supported by the selected model and provider. For provider "*", every eligible provider must support the level. An explicit value overrides the request's reasoning setting, subject to model-group policy. Omitted or null preserves request and provider behavior; none is an explicit level, not the default. Omitted or null clears an override on full replacement. Routing-rule references cannot set this field; each referenced model destination owns its override. If an override cannot be applied at runtime, the gateway keeps the destination and restores the caller's original reasoning settings, or preserves the provider default when omitted. It rechecks all applicable route and model-group policies against those settings before sending. Model-group max_reasoning_level enforces hard limits; the override is not an additional cap. Normal fallback applies if governance denies the resulting request or the destination cannot + otherwise serve it. Metrics and span tags record the override outcome and incompatibility reason. When response headers have not already been committed, `X-Ai-Gateway-Reasoning-Override` reports applied or not_applied for the returned attempt, and `X-Ai-Gateway-Reasoning-Override-Reason` reports the reason when not applied. + enum: + - none + - minimal + - low + - medium + - high + - xhigh + - max + example: medium + nullable: true + type: string + x-enum-varnames: + - NONE + - MINIMAL + - LOW + - MEDIUM + - HIGH + - XHIGH + - MAX + AiGatewayRoutingRuleAttributes: + description: Routing rule configuration and metadata. + properties: + created_at: + description: Time when the resource was created. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + route_id: + description: Stable numeric route identifier used by scoped policies. + example: 123 + format: int64 + type: integer + tiers: + items: + $ref: "#/components/schemas/AiGatewayRoutingRuleTier" + description: Routing fallback tier. + minItems: 1 + type: array + updated_at: + description: Time when the resource was last updated. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + required: + - tiers + - created_at + - updated_at + type: object + AiGatewayRoutingRuleCreateAttributes: + description: Attributes used to create an AI Gateway routing rule. + properties: + slug: + description: Organization-unique resource slug. + example: coding + maxLength: 128 + minLength: 1 + type: string + tiers: + items: + $ref: "#/components/schemas/AiGatewayRoutingRuleTierRequest" + description: Routing fallback tier. + minItems: 1 + type: array + required: + - slug + - tiers + type: object + AiGatewayRoutingRuleCreateData: + description: Data used to create an AI Gateway routing rule. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRoutingRuleCreateAttributes" + type: + $ref: "#/components/schemas/AiGatewayRoutingRuleType" + required: + - type + - attributes + type: object + AiGatewayRoutingRuleCreateRequest: + description: Request to create an AI Gateway routing rule. + properties: + data: + $ref: "#/components/schemas/AiGatewayRoutingRuleCreateData" + required: + - data + type: object + AiGatewayRoutingRuleListResponse: + description: Response containing AI Gateway routing rules. + properties: + data: + items: + $ref: "#/components/schemas/AiGatewayRoutingRuleResource" + description: AI Gateway routing rule resource. + type: array + required: + - data + type: object + AiGatewayRoutingRuleReplaceAttributes: + description: Attributes used to replace an AI Gateway routing rule. + properties: + tiers: + items: + $ref: "#/components/schemas/AiGatewayRoutingRuleTierRequest" + description: Routing fallback tier. + minItems: 1 + type: array + required: + - tiers + type: object + AiGatewayRoutingRuleReplaceData: + description: Data used to replace an AI Gateway routing rule. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRoutingRuleReplaceAttributes" + id: + description: Resource identifier. + example: coding + type: string + type: + $ref: "#/components/schemas/AiGatewayRoutingRuleType" + required: + - type + - id + - attributes + type: object + AiGatewayRoutingRuleReplaceRequest: + description: Request to replace an AI Gateway routing rule. + properties: + data: + $ref: "#/components/schemas/AiGatewayRoutingRuleReplaceData" + required: + - data + type: object + AiGatewayRoutingRuleResource: + description: AI Gateway routing rule resource. + properties: + attributes: + $ref: "#/components/schemas/AiGatewayRoutingRuleAttributes" + id: + description: Resource identifier. + example: coding + type: string + type: + $ref: "#/components/schemas/AiGatewayRoutingRuleType" + required: + - type + - id + - attributes + type: object + AiGatewayRoutingRuleResponse: + description: Response containing one AI Gateway routing rule. + properties: + data: + $ref: "#/components/schemas/AiGatewayRoutingRuleResource" + required: + - data + type: object + AiGatewayRoutingRuleTarget: + description: Model target or reference to another routing rule. + properties: + id: + description: Saved target row ID. On replacement, retain this ID only within its original route and at most once. A stale or foreign ID is rejected. + example: 901 + format: int64 + minimum: 1 + type: integer + model: + description: Model name or pattern. Omitted when the caller cannot view its provider. + example: gpt-5.2-codex + type: string + model_id: + description: Opaque model catalog ID for a concrete model target. New selections require provider View; saved selections can be retained without metadata. + example: 101 + format: int64 + minimum: 1 + type: integer + provider: + description: Provider slug. Omitted for dynamic resolution and when the caller cannot view its provider. + example: prod-us + type: string + reasoning_level: + $ref: "#/components/schemas/AiGatewayRoutingReasoningLevel" + slug: + description: Organization-unique resource slug. + example: coding-fallback + type: string + type: + $ref: "#/components/schemas/AiGatewayRoutingRuleTargetType" + weight: + description: Effective relative weight. Returned only for targets in weighted_affinity tiers. + example: 70 + format: int64 + maximum: 10000 + minimum: 1 + type: integer + required: + - type + type: object + AiGatewayRoutingRuleTargetRequest: + description: Model target or reference to another routing rule used to create or replace a rule. + properties: + id: + description: Saved target row ID. On replacement, retain this ID only within its original route and at most once. A stale or foreign ID is rejected. + example: 901 + format: int64 + minimum: 1 + type: integer + model: + description: Model name. Omit when retaining a saved target by ID or selecting a concrete target by model_id. + example: gpt-5.2-codex + type: string + model_id: + description: Opaque model catalog ID for a concrete model target. New selections require provider View; saved selections can be retained without metadata. + example: 101 + format: int64 + minimum: 1 + type: integer + provider: + description: Provider slug. weighted_affinity requires an explicit provider and does not allow "*". + example: prod-us + type: string + reasoning_level: + $ref: "#/components/schemas/AiGatewayRoutingReasoningLevel" + slug: + description: Organization-unique routing rule slug. Allowed only in configured tiers. + example: coding-fallback + type: string + type: + $ref: "#/components/schemas/AiGatewayRoutingRuleTargetType" + weight: + description: >- + Relative weight in a weighted_affinity tier. Omitted or null defaults to 1. Weights need not total 100. Must be omitted or null in configured tiers. + example: 70 + format: int64 + maximum: 10000 + minimum: 1 + nullable: true + type: integer + required: + - type + type: object + AiGatewayRoutingRuleTargetType: + description: Type of routing target. + enum: + - model + - routing-rule + example: model + type: string + x-enum-varnames: + - MODEL + - ROUTING_RULE + AiGatewayRoutingRuleTier: + description: Routing fallback tier containing targets and their effective ordering. + properties: + ordering: + $ref: "#/components/schemas/AiGatewayRoutingRuleTierOrdering" + ordering_issue: + $ref: "#/components/schemas/AiGatewayRoutingRuleTierOrderingIssue" + targets: + items: + $ref: "#/components/schemas/AiGatewayRoutingRuleTarget" + description: Routing target. + minItems: 1 + type: array + required: + - ordering + - targets + type: object + AiGatewayRoutingRuleTierOrdering: + description: How a tier orders its targets. + enum: + - configured + - weighted_affinity + example: configured + type: string + x-enum-varnames: + - CONFIGURED + - WEIGHTED_AFFINITY + AiGatewayRoutingRuleTierOrderingIssue: + description: >- + Stored tier ordering is inconsistent. mixed means targets have different supported orderings, and unknown means a target has an unsupported ordering. The tier is reported as configured without weights. Replace the rule to repair it. Omitted for consistent tiers. A forced deletion cannot rewrite a surviving tier with an unknown issue. + enum: + - mixed + - unknown + example: mixed + readOnly: true + type: string + x-enum-varnames: + - MIXED + - UNKNOWN + AiGatewayRoutingRuleTierRequest: + description: Routing fallback tier used to create or replace a rule. + properties: + ordering: + $ref: "#/components/schemas/AiGatewayNullableRoutingRuleTierOrdering" + targets: + items: + $ref: "#/components/schemas/AiGatewayRoutingRuleTargetRequest" + description: Routing target. + minItems: 1 + type: array + required: + - targets + type: object + AiGatewayRoutingRuleType: + description: AI Gateway routing rule resource type. + enum: + - routing-rules + example: routing-rules + type: string + x-enum-varnames: + - ROUTING_RULES + AiGatewaySupportedOperation: + description: Operation supported by an AI Gateway model. + enum: + - ANTHROPIC_MESSAGES + - ANTHROPIC_COUNT_TOKENS + - OPENAI_CHAT_COMPLETIONS + - OPENAI_RESPONSES + - OPENAI_WEB_SEARCH + - OPENAI_EMBEDDINGS + - GEMINI_GENERATE_CONTENT + - GEMINI_RAW_PREDICTIONS + example: OPENAI_CHAT_COMPLETIONS + type: string + x-enum-varnames: + - ANTHROPIC_MESSAGES + - ANTHROPIC_COUNT_TOKENS + - OPENAI_CHAT_COMPLETIONS + - OPENAI_RESPONSES + - OPENAI_WEB_SEARCH + - OPENAI_EMBEDDINGS + - GEMINI_GENERATE_CONTENT + - GEMINI_RAW_PREDICTIONS + AiGatewayZDRMode: + description: Zero data retention requirement for the organization's requests. + enum: + - "off" + - required + example: "off" + type: string + x-enum-varnames: + - "OFF" + - REQUIRED AiMemoryViolationResultDataType: description: AI memory violation result resource type. enum: [ai_memory_violation_result] @@ -154558,6 +158955,569 @@ paths: operator: OR permissions: - bits_investigations_read + /api/v2/budgets: + get: + description: List spend budgets for the organization, including active-window spend and effective capacity. + operationId: ListAiGatewayBudgets + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + capacity_microcents: 100000000 + created_at: "2026-08-24T12:00:00Z" + created_by: admin@example.com + current_period_capacity_microcents: 100000000 + current_spend_microcents: 25000000 + enabled: true + enforcement: BLOCK + monitor_id: 12345678 + name: Coding agents + tags: {} + updated_at: "2026-08-24T12:00:00Z" + warning_threshold: 0.9 + window_end: "2026-11-01T00:00:00Z" + window_policy: MONTHLY + window_start: "2026-10-01T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111 + type: budgets + schema: + $ref: "#/components/schemas/AiGatewayBudgetListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway budgets + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Create a spend budget. Scope tags may include provider, model, and custom dimensions. + Reserved metadata keys are rejected. + operationId: CreateAiGatewayBudget + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayBudgetCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + capacity_microcents: 100000000 + created_at: "2026-08-24T12:00:00Z" + created_by: admin@example.com + enabled: true + enforcement: BLOCK + monitor_id: 12345678 + name: Coding agents + tags: {} + updated_at: "2026-08-24T12:00:00Z" + warning_threshold: 0.9 + window_policy: MONTHLY + id: 11111111-1111-1111-1111-111111111111 + type: budgets + schema: + $ref: "#/components/schemas/AiGatewayBudgetResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Create an AI Gateway budget + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}: + delete: + description: Archive a spend budget by ID while retaining its accounting history. + operationId: DeleteAiGatewayBudget + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + responses: + "204": + description: No Content + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Archive an AI Gateway budget + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a spend budget by ID, including its capacity, scope, reset window, warning threshold, and enforcement mode. + operationId: GetAiGatewayBudget + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + capacity_microcents: 100000000 + created_at: "2026-08-24T12:00:00Z" + created_by: admin@example.com + enabled: true + enforcement: BLOCK + monitor_id: 12345678 + name: Coding agents + tags: {} + updated_at: "2026-08-24T12:00:00Z" + warning_threshold: 0.9 + window_policy: MONTHLY + id: 11111111-1111-1111-1111-111111111111 + type: budgets + schema: + $ref: "#/components/schemas/AiGatewayBudgetResponse" + description: OK + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway budget + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: |- + Update a budget's mutable definition. Capacity changes apply to future accounting periods + unless `apply_to_current_period` is true. + operationId: UpdateAiGatewayBudget + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayBudgetUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + capacity_microcents: 120000000 + created_at: "2026-08-24T12:00:00Z" + created_by: admin@example.com + enabled: true + enforcement: BLOCK + monitor_id: 12345678 + name: Coding agents + tags: {} + updated_at: "2026-08-27T12:00:00Z" + warning_threshold: 0.8 + window_policy: MONTHLY + id: 11111111-1111-1111-1111-111111111111 + type: budgets + schema: + $ref: "#/components/schemas/AiGatewayBudgetResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Update an AI Gateway budget + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}/current-period: + get: + description: Get the active accounting window, enforced capacity, and current spend. + operationId: GetAiGatewayBudgetCurrentPeriod + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + budget_id: 11111111-1111-1111-1111-111111111111 + current_spend_microcents: 25000000 + default_capacity_microcents: 100000000 + effective_capacity_microcents: 120000000 + monitor_id: 12345678 + window_end: "2026-08-28T00:00:00Z" + window_start: "2026-08-27T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111 + type: budget-periods + schema: + $ref: "#/components/schemas/AiGatewayBudgetPeriodResponse" + description: OK + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway budget's current period + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}/instances: + get: + description: List instance counters for an accounting window. Legacy fixed-scope budgets return one pooled row with an empty instance_key. Omit window to use the current window. Use split_dim to keep only counters that match every given dimension value. + operationId: ListAiGatewayBudgetInstances + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceWindow" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceSplitDim" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceSort" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceLimit" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceOffset" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + budget_id: 11111111-1111-1111-1111-111111111111 + effective_capacity_microcents: 100000000 + instance_key: "" + modified_at: "2026-10-05T12:00:00Z" + spend_microcents: 25000000 + split_dims: {} + window_start: "2026-10-01T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z| + type: budget-instances + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway budget instances + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}/instances/capacity: + post: + description: Override active-period capacity for one instance of a template budget, identified by its instance_key. Other instances and the budget's default capacity are unchanged. The override is retained in the budget adjustment audit history. Returns 404 when the instance has no counter in the active period. Not supported for legacy fixed-scope budgets. + operationId: OverrideAiGatewayBudgetInstanceCapacity + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceCapacityOverrideRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + budget_id: 11111111-1111-1111-1111-111111111111 + effective_capacity_microcents: 250000000 + instance_key: "v1|7:user_id=36:22222222-2222-2222-2222-222222222222" + modified_at: "2026-10-05T12:00:00Z" + spend_microcents: 50000000 + split_dims: + user_id: 22222222-2222-2222-2222-222222222222 + window_start: "2026-10-01T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z|v1|7:user_id=36:22222222-2222-2222-2222-222222222222 + type: budget-instances + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Override a budget instance's capacity + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}/instances/dimensions: + get: + description: Search the values that a template budget's split dimensions take across its instance counters in an accounting window. Each dimension returns its top values by spend, with counter counts. Use query or value to narrow results and limit to cap them. The truncated field reports whether more values matched. Each dimension's values are counted under the other dimensions' split_dim filters, so a dimension's own filter does not hide its alternatives. Legacy fixed-scope budgets return an empty list. + operationId: ListAiGatewayBudgetInstanceDimensions + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceWindow" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceSplitDim" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceDimension" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceDimensionQuery" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceDimensionValues" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceDimensionLimit" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + budget_id: 11111111-1111-1111-1111-111111111111 + dim: tag:env + truncated: false + values: + - instance_count: 2 + spend_microcents: 50000000 + value: prod + - instance_count: 1 + spend_microcents: 25000000 + value: dev + window_start: "2026-10-01T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z|tag:env + type: budget-instance-dimensions + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceDimensionListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway budget instance dimension values + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}/instances/reset: + post: + description: Reset active-period spend for one instance of a template budget, identified by its instance_key. The reset is retained in the budget adjustment audit history. Returns 404 when the instance has no counter in the active period. Not supported for legacy fixed-scope budgets. + operationId: ResetAiGatewayBudgetInstanceSpend + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResetRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + budget_id: 11111111-1111-1111-1111-111111111111 + effective_capacity_microcents: 100000000 + instance_key: "v1|7:user_id=36:22222222-2222-2222-2222-222222222222" + modified_at: "2026-10-05T12:00:00Z" + spend_microcents: 0 + split_dims: + user_id: 22222222-2222-2222-2222-222222222222 + window_start: "2026-10-01T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z|v1|7:user_id=36:22222222-2222-2222-2222-222222222222 + type: budget-instances + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstanceResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Reset a budget instance's spend + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/budgets/{id}/instances/summary: + get: + description: Aggregate counters for an accounting window, including total spend and the numbers of instances at or above the warning threshold and capacity. Use split_dim to aggregate only counters that match every given dimension value. + operationId: GetAiGatewayBudgetInstancesSummary + parameters: + - $ref: "#/components/parameters/AiGatewayBudgetID" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceWindow" + - $ref: "#/components/parameters/AiGatewayBudgetInstanceSplitDim" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + budget_id: 11111111-1111-1111-1111-111111111111 + exceeded_capacity_count: 0 + instance_count: 3 + over_warning_threshold_count: 1 + total_spend_microcents: 75000000 + window_start: "2026-10-01T00:00:00Z" + id: 11111111-1111-1111-1111-111111111111 + type: budget-instances-summary + schema: + $ref: "#/components/schemas/AiGatewayBudgetInstancesSummaryResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway budget instance summary + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases: get: description: >- @@ -167899,6 +172859,213 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/data-capture/configuration: + get: + description: Get the organization default mode, scoped capture overrides, and configuration revision. + operationId: GetAiGatewayDataCaptureConfiguration + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + configuration_revision: capture-revision-1 + default_mode: metadata_only + overrides: + - created_at: "2026-10-15T12:00:00Z" + id: 11111111-1111-4111-8111-111111111111 + mode: metadata_only + name: Research + revision: 1 + scope: + tags: + env: prod + updated_at: "2026-10-15T12:00:00Z" + id: organization + type: data-capture-configurations + schema: + $ref: "#/components/schemas/AiGatewayCaptureConfigurationResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get the AI Gateway data capture configuration + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: "**Note**: This endpoint is in Preview and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." + /api/v2/data-capture/overrides: + post: + description: Create a scoped override with a client-generated UUID and the current `configuration_revision`. If the override can enable full capture for more traffic, set `confirm_full_capture` to `true`. Returns HTTP 409 when `configuration_revision` is stale, the UUID already exists, or the organization has 100 overrides. Missing `configuration_revision` or required full-capture confirmation returns HTTP 400. Retrying an accepted create with the same UUID returns HTTP 409. To undo a create, read the current configuration revision and delete the override using its returned override revision. + operationId: CreateAiGatewayDataCaptureOverride + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayCaptureCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + mode: metadata_only + name: Research + revision: 1 + scope: + tags: + env: prod + id: 11111111-1111-4111-8111-111111111111 + type: data-capture-overrides + schema: + $ref: "#/components/schemas/AiGatewayCaptureOverrideResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Create an AI Gateway data capture override + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: "**Note**: This endpoint is in Preview and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." + /api/v2/data-capture/overrides/{id}: + delete: + description: Delete an override using its `revision` and the current `configuration_revision`. If deleting the override can enable full capture for affected traffic, set `confirm_full_capture` to `true`. Returns HTTP 409 when `configuration_revision` or the override `revision` is stale, including a concurrent change during deletion. Missing revisions or required full-capture confirmation returns HTTP 400. + operationId: DeleteAiGatewayDataCaptureOverride + parameters: + - description: Data capture override ID. + in: path + name: id + required: true + schema: + description: Capture override UUID. + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayCaptureDeleteRequest" + required: true + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete an AI Gateway data capture override + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: "**Note**: This endpoint is in Preview and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." + put: + description: Replace an override using its `revision` and the current `configuration_revision`. Changes to capture overrides don't affect routing rules. Returns HTTP 409 when `configuration_revision` or the override `revision` is stale, including a concurrent change during replacement. Missing revisions or required full-capture confirmation returns HTTP 400. + operationId: UpdateAiGatewayDataCaptureOverride + parameters: + - description: Data capture override ID. + in: path + name: id + required: true + schema: + description: Capture override UUID. + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayCaptureUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + mode: metadata_only + name: Research + revision: 1 + scope: + tags: + env: prod + id: 11111111-1111-4111-8111-111111111111 + type: data-capture-overrides + schema: + $ref: "#/components/schemas/AiGatewayCaptureOverrideResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Replace an AI Gateway data capture override + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: "**Note**: This endpoint is in Preview and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." /api/v2/data-observability/monitors/runs/{run_id}/status: get: description: Retrieves the current status of a data observability monitor run. Poll this endpoint after triggering a run to determine when evaluation is complete. @@ -181661,6 +186828,86 @@ paths: operator: OR permissions: - user_access_read + /api/v2/governance: + get: + description: Get the organization-wide AI Gateway governance settings, which are the default data capture mode and whether requests must reach providers covered by a zero data retention agreement. + operationId: GetAiGatewayGovernance + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + data_capture_mode: metadata_only + id: organization + type: governance + schema: + $ref: "#/components/schemas/AiGatewayGovernanceResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get AI Gateway governance controls + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Replace the organization-wide AI Gateway governance settings, which are the default data capture mode and whether requests must reach providers covered by a zero data retention agreement. + operationId: UpdateAiGatewayGovernance + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayGovernanceReplaceRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + data_capture_mode: full_capture + id: organization + type: governance + schema: + $ref: "#/components/schemas/AiGatewayGovernanceResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Replace AI Gateway governance controls + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/governance/config: get: description: |- @@ -207239,6 +212486,287 @@ paths: "x-permission": operator: OPEN permissions: [] + /api/v2/model-groups: + get: + description: List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission; named policies also require view access. + operationId: ListAiGatewayModelGroups + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + allow_fast_mode: true + created_at: "2026-08-24T12:00:00Z" + max_reasoning_level: + models: + - created_at: "2026-08-24T12:00:00Z" + enabled: true + id: "101" + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: discovered + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + name: Coding models + providers: [] + routing_rules: + - slug: coding-route + updated_at: "2026-08-24T12:00:00Z" + id: "7" + type: model-groups + schema: + $ref: "#/components/schemas/AiGatewayModelGroupListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway model groups + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create an AI Gateway model group from a name and any combination of model catalog entries and routing rules, with optional fast-mode and reasoning limits and initial access bindings. + operationId: CreateAiGatewayModelGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayModelGroupCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + allow_fast_mode: true + created_at: "2026-08-24T12:00:00Z" + max_reasoning_level: + models: + - created_at: "2026-08-24T12:00:00Z" + enabled: true + id: "101" + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: discovered + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + name: Coding models + providers: [] + routing_rules: + - slug: coding-route + updated_at: "2026-08-24T12:00:00Z" + id: "7" + type: model-groups + schema: + $ref: "#/components/schemas/AiGatewayModelGroupResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Create an AI Gateway model group + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-groups/{id}: + delete: + description: Delete a named model group. The organization-wide policy cannot be deleted. Requires configuration write permission and edit access to the group. + operationId: DeleteAiGatewayModelGroup + parameters: + - $ref: "#/components/parameters/AiGatewayModelGroupID" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete an AI Gateway model group + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a named policy or the explicit organization-wide policy by id "default". Requires configuration read permission; named policies also require view access. Provider selections cover current and future models and are returned separately from individual model selections. + operationId: GetAiGatewayModelGroup + parameters: + - $ref: "#/components/parameters/AiGatewayModelGroupID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + allow_fast_mode: true + created_at: "2026-08-24T12:00:00Z" + max_reasoning_level: + models: + - created_at: "2026-08-24T12:00:00Z" + enabled: true + id: "101" + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: discovered + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + name: Coding models + providers: [] + routing_rules: + - slug: coding-route + updated_at: "2026-08-24T12:00:00Z" + id: "7" + type: model-groups + schema: + $ref: "#/components/schemas/AiGatewayModelGroupResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway model group + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a model group. For id "default", save membership and request options atomically with expected_revision. Empty selections grant no organization-wide access. Applicable authorized named policies override organization-wide request options; a rejected named-policy request cannot fall back to organization-wide options. The organization-wide audience is fixed and grants resource use only. Requires configuration write permission; named policies also require edit access. + operationId: UpdateAiGatewayModelGroup + parameters: + - $ref: "#/components/parameters/AiGatewayModelGroupID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayModelGroupUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + allow_fast_mode: true + created_at: "2026-08-24T12:00:00Z" + max_reasoning_level: + models: + - created_at: "2026-08-24T12:00:00Z" + enabled: true + id: "101" + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: discovered + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + name: Coding models + providers: [] + routing_rules: + - slug: coding-route + updated_at: "2026-08-24T12:00:00Z" + id: "7" + type: model-groups + schema: + $ref: "#/components/schemas/AiGatewayModelGroupResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Update an AI Gateway model group + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/model-lab-api/artifacts/content: get: description: Download the raw content of a Model Lab artifact file. @@ -208184,6 +213712,53 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/models: + get: + description: >- + List all model catalog entries grouped by canonical model ID. Requires `ai_gateway_config_read` and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404. + operationId: ListAiGatewayModelsByCanonical + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + model_id_canonical: gpt-5.2-codex + providers: + - created_at: "2026-08-24T12:00:00Z" + enabled: true + id: "101" + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: discovered + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + id: gpt-5.2-codex + type: models-by-canonical + schema: + $ref: "#/components/schemas/AiGatewayModelsByCanonicalListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway models by canonical ID + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/monitor/notification_rule: get: description: Returns a list of all monitor notification rules. @@ -216364,6 +221939,174 @@ paths: permissions: - user_app_keys - org_app_keys_write + /api/v2/policies: + get: + description: List all routing policy documents for the organization. Pass user_id to filter by user scope. + operationId: ListAiGatewayPolicies + parameters: + - $ref: "#/components/parameters/AiGatewayPolicyUserID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + priority: 1 + tiers: + - targets: + - model: gpt-5.2-codex + priority: 1 + provider: prod-us + id: coding-agent + type: routing-documents + schema: + $ref: "#/components/schemas/AiGatewayPolicyListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway routing policies + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create or replace the routing policy document for an inbound pattern. Pass user_id to scope the policy to a user. + operationId: UpsertAiGatewayPolicy + parameters: + - $ref: "#/components/parameters/AiGatewayPolicyUserID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayPolicyRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + priority: 1 + tiers: + - targets: + - model: gpt-5.2-codex + priority: 1 + provider: prod-us + id: coding-agent + type: routing-documents + schema: + $ref: "#/components/schemas/AiGatewayPolicyResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Create or replace an AI Gateway routing policy + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/policies/{inbound}: + delete: + description: Delete the routing policy document for a specific inbound pattern. + operationId: DeleteAiGatewayPolicy + parameters: + - $ref: "#/components/parameters/AiGatewayPolicyInbound" + - $ref: "#/components/parameters/AiGatewayPolicyUserID" + responses: + "204": + description: No Content + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete an AI Gateway routing policy + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the routing policy document for a specific inbound pattern. + operationId: GetAiGatewayPolicy + parameters: + - $ref: "#/components/parameters/AiGatewayPolicyInbound" + - $ref: "#/components/parameters/AiGatewayPolicyUserID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + priority: 1 + tiers: + - targets: + - model: gpt-5.2-codex + priority: 1 + provider: prod-us + id: coding-agent + type: routing-documents + schema: + $ref: "#/components/schemas/AiGatewayPolicyResponse" + description: OK + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway routing policy + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/posture_management/findings: get: description: |- @@ -218826,6 +224569,726 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/provider-models: + get: + description: List live models available to a provider integration account that supports model discovery. + operationId: ListAiGatewayProviderModels + parameters: + - $ref: "#/components/parameters/AiGatewayIntegrationType" + - $ref: "#/components/parameters/AiGatewayIntegrationAccountID" + - $ref: "#/components/parameters/AiGatewayProviderProjectID" + - $ref: "#/components/parameters/AiGatewayProviderLocation" + - $ref: "#/components/parameters/AiGatewayProviderBedrockRegion" + - $ref: "#/components/parameters/AiGatewayProviderFoundryResourceID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + display_name: GPT-5.2 Codex + model_id_wire: gpt-5.2-codex-20260801 + supported_operations: + - OPENAI_CHAT_COMPLETIONS + id: gpt-5.2-codex + type: provider-models + schema: + $ref: "#/components/schemas/AiGatewayDiscoveredModelListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List models available from a provider integration + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers: + get: + description: >- + List the model providers connected to the organization. Credentials stay in each provider's integration account and are never returned. Requires `ai_gateway_config_read` and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404. + operationId: ListAiGatewayProviders + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cost_multiplier: 1.0 + created_at: "2026-08-24T12:00:00Z" + integration_account_id: account-123 + known_provider: openai + name: prod-us + slug: prod-us + updated_at: "2026-08-24T12:00:00Z" + id: "42" + type: providers + schema: + $ref: "#/components/schemas/AiGatewayProviderListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway providers + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Creating a provider requires `ai_gateway_config_write`. No provider View check applies before creation. + Create a provider and its initial model catalog. All discovered models are enabled; optional models are + added as manually managed entries. The slug is the immutable routing identifier. + Provider and initial catalog rows are saved in one transaction. Initial sharing is unavailable: + supplying initial_bindings returns 503 with stage initial_permissions and outcome not_saved. + A failed database commit can return 503 with stage database_commit and outcome unknown; check the + provider list before retrying. Creation without initial_bindings keeps normal unrestricted defaults. + operationId: CreateAiGatewayProvider + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayProviderCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + cost_multiplier: 1.0 + created_at: "2026-08-24T12:00:00Z" + integration_account_id: account-123 + known_provider: openai + name: prod-us + slug: prod-us + updated_at: "2026-08-24T12:00:00Z" + id: "42" + type: providers + schema: + $ref: "#/components/schemas/AiGatewayProviderResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Create an AI Gateway provider + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers/{id}: + delete: + description: >- + Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. This also applies when force=true. Existing cascades remain and can affect policies the caller cannot edit. Delete a provider by ID. Providers used by routing rules return provider_in_use with HTTP 409 and the affected rules in error metadata. Retry with force=true to remove provider targets and delete rules left without targets. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted. + operationId: DeleteAiGatewayProvider + parameters: + - $ref: "#/components/parameters/AiGatewayProviderID" + - $ref: "#/components/parameters/AiGatewayProviderForceDelete" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete an AI Gateway provider + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: >- + Get a provider by ID, including its routing slug, integration account, and cost multiplier. Credentials stay in the integration account and are never returned. Requires `ai_gateway_config_read` and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404. + operationId: GetAiGatewayProvider + parameters: + - $ref: "#/components/parameters/AiGatewayProviderID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cost_multiplier: 1.0 + created_at: "2026-08-24T12:00:00Z" + integration_account_id: account-123 + known_provider: openai + name: prod-us + slug: prod-us + updated_at: "2026-08-24T12:00:00Z" + id: "42" + type: providers + schema: + $ref: "#/components/schemas/AiGatewayProviderResponse" + description: OK + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway provider + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: >- + Update a provider's display name or cost multiplier. Provider type, integration settings, and slug are immutable. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + operationId: UpdateAiGatewayProvider + parameters: + - $ref: "#/components/parameters/AiGatewayProviderID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayProviderUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cost_multiplier: 1.0 + created_at: "2026-08-24T12:00:00Z" + integration_account_id: account-123 + known_provider: openai + name: prod-us + slug: prod-us + updated_at: "2026-08-24T12:00:00Z" + id: "42" + type: providers + schema: + $ref: "#/components/schemas/AiGatewayProviderResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Update an AI Gateway provider + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers/{provider_id}/models: + get: + description: >- + List all model catalog entries for a provider. Requires `ai_gateway_config_read` and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404. + operationId: ListAiGatewayModels + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-08-24T12:00:00Z" + enabled: true + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: discovered + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + id: "101" + type: model-catalog-entries + schema: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List models for an AI Gateway provider + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + Add a manually managed model catalog entry to a provider. Manually managed entries are not modified by + automatic catalog synchronization. + operationId: CreateAiGatewayModel + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayModelCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-08-24T12:00:00Z" + enabled: true + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: manual + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + id: "101" + type: model-catalog-entries + schema: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Add a model to an AI Gateway provider + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers/{provider_id}/models/bulk: + post: + description: |- + Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + Add multiple manually managed model catalog entries to a provider in a single request. Manually managed + entries are not modified by automatic catalog synchronization. + operationId: BulkCreateAiGatewayModels + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayModelsBulkCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-08-24T12:00:00Z" + enabled: true + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: manual + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + id: "101" + type: model-catalog-entries + schema: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryListResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Add multiple models to an AI Gateway provider + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers/{provider_id}/models/{canonical}: + delete: + description: |- + Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + Delete a manually managed model catalog entry by its canonical model ID. Discovered entries are read-only. + operationId: DeleteAiGatewayModel + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalID" + responses: + "204": + description: No Content + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete a model from an AI Gateway provider + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: >- + Update a manually managed model catalog entry. Discovered entries are read-only. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + operationId: UpdateAiGatewayModel + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayModelUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-08-24T12:00:00Z" + enabled: true + model_id_canonical: gpt-5.2-codex + model_id_wire: gpt-5.2-codex-20260801 + provider_id: 42 + source: manual + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + id: "101" + type: model-catalog-entries + schema: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Update a model for an AI Gateway provider + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers/{provider_id}/models/{canonical}/pricing: + delete: + description: >- + Clear a custom provider model's pricing override. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + operationId: DeleteAiGatewayModelPricing + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalID" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete a model pricing override + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: >- + Get a custom provider model's pricing override and effective pricing source. Requires `ai_gateway_config_read` and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404. + operationId: GetAiGatewayModelPricing + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + effective_source: model_override + pricing_config: + rates: + cache_read_cost_per_mtok: 0.02 + cache_write_cost_per_mtok: 0.25 + non_cached_input_cost_per_mtok: 0.2 + output_cost_per_mtok: 1.0 + source: + type: custom + version: 1 + id: 7/custom-model + type: model-pricing + schema: + $ref: "#/components/schemas/AiGatewayModelPricingResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get a model pricing override + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: >- + Set a custom provider model's pricing override. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + operationId: UpdateAiGatewayModelPricing + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalID" + requestBody: + content: + application/json: + examples: + catalog: + summary: Use catalog pricing with an override + value: + data: + attributes: + pricing_config: + overrides: + output_cost_per_mtok: 9.5 + source: + provider_id: openai + type: catalog + version: 1 + id: 7/gpt-4o + type: model-pricing + custom: + summary: Set custom pricing + value: + data: + attributes: + pricing_config: + rates: + cache_read_cost_per_mtok: 0.02 + cache_write_cost_per_mtok: 0.25 + non_cached_input_cost_per_mtok: 0.2 + output_cost_per_mtok: 1.0 + source: + type: custom + version: 1 + id: 7/custom-model + type: model-pricing + schema: + $ref: "#/components/schemas/AiGatewayModelPricingRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + effective_source: model_override + pricing_config: + rates: + cache_read_cost_per_mtok: 0.02 + cache_write_cost_per_mtok: 0.25 + non_cached_input_cost_per_mtok: 0.2 + output_cost_per_mtok: 1.0 + source: + type: custom + version: 1 + id: 7/custom-model + type: model-pricing + schema: + $ref: "#/components/schemas/AiGatewayModelPricingResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Set a model pricing override + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/pruned_trace/{trace_id}: get: description: |- @@ -219118,6 +225581,309 @@ paths: operator: OR permissions: - timeseries_query + /api/v2/rate-limits: + get: + description: List the organization's AI Gateway rate limits. + operationId: ListAiGatewayRateLimits + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-09-01T00:00:00Z" + created_by: user@example.com + enabled: true + input_tokens_per_minute: 500000 + mode: ALERT + name: Default rate limit + output_tokens_per_minute: 200000 + requests_per_minute: 1000 + revision: 1 + tags: + provider: openai + updated_at: "2026-09-15T14:30:00Z" + updated_by: user@example.com + id: 33333333-3333-3333-3333-333333333333 + type: rate-limits + schema: + $ref: "#/components/schemas/AiGatewayRateLimitListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: List AI Gateway rate limits + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a rate limit. All requests matching its scope share one allowance, and every matching rate limit applies. Returns 409 when another active rate limit has the same user, Team, and tags, or when the organization already has the maximum number of rate limits. + operationId: CreateAiGatewayRateLimit + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayRateLimitCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-09-01T00:00:00Z" + created_by: user@example.com + enabled: true + input_tokens_per_minute: 500000 + mode: ALERT + name: Default rate limit + output_tokens_per_minute: 200000 + requests_per_minute: 1000 + revision: 1 + tags: + provider: openai + updated_at: "2026-09-01T00:00:00Z" + updated_by: user@example.com + id: 33333333-3333-3333-3333-333333333333 + type: rate-limits + schema: + $ref: "#/components/schemas/AiGatewayRateLimitResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Create an AI Gateway rate limit + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/rate-limits/usage: + get: + description: Get live usage for the organization's rate limits. Returns requests and tokens counted in the rolling one-minute window and requests limited in the last 15 minutes for each enabled rate limit, plus `untracked` (traffic no enforced rate limit covers) and `total` (all gateway traffic). + operationId: GetAiGatewayRateLimitUsage + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + input_tokens: 45000 + limited_requests: 3 + output_tokens: 12000 + requests: 120 + would_limit_requests: 0 + id: 33333333-3333-3333-3333-333333333333 + type: rate-limit-usage + - attributes: + input_tokens: 160000 + limited_requests: 3 + output_tokens: 41000 + requests: 450 + would_limit_requests: 0 + id: total + type: rate-limit-usage + - attributes: + input_tokens: 115000 + limited_requests: 0 + output_tokens: 29000 + requests: 330 + would_limit_requests: 0 + id: untracked + type: rate-limit-usage + schema: + $ref: "#/components/schemas/AiGatewayRateLimitUsageListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get AI Gateway rate limit usage + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/rate-limits/{id}: + delete: + description: Archive a rate limit by ID. An archived rate limit no longer appears in lists or lookups, and its alert monitor is deleted. + operationId: DeleteAiGatewayRateLimit + parameters: + - $ref: "#/components/parameters/AiGatewayRateLimitID" + responses: + "204": + description: No Content + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Archive an AI Gateway rate limit + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a rate limit by ID, including its scope, per-minute request and token limits, and whether it is enabled. + operationId: GetAiGatewayRateLimit + parameters: + - $ref: "#/components/parameters/AiGatewayRateLimitID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-09-01T00:00:00Z" + created_by: user@example.com + enabled: true + input_tokens_per_minute: 500000 + mode: ALERT + name: Default rate limit + output_tokens_per_minute: 200000 + requests_per_minute: 1000 + revision: 1 + tags: + provider: openai + updated_at: "2026-09-15T14:30:00Z" + updated_by: user@example.com + id: 33333333-3333-3333-3333-333333333333 + type: rate-limits + schema: + $ref: "#/components/schemas/AiGatewayRateLimitResponse" + description: OK + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_read + summary: Get an AI Gateway rate limit + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a rate limit. Only the attributes sent are changed. Scope stays editable, and changes never reset current usage. Returns 409 when the rule was changed concurrently or the new scope duplicates another rule. + operationId: UpdateAiGatewayRateLimit + parameters: + - $ref: "#/components/parameters/AiGatewayRateLimitID" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayRateLimitUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-09-01T00:00:00Z" + created_by: user@example.com + enabled: true + input_tokens_per_minute: 500000 + mode: ALERT + name: Default rate limit + output_tokens_per_minute: 200000 + requests_per_minute: 1000 + revision: 2 + tags: + provider: openai + updated_at: "2026-09-15T14:30:00Z" + updated_by: user@example.com + id: 33333333-3333-3333-3333-333333333333 + type: rate-limits + schema: + $ref: "#/components/schemas/AiGatewayRateLimitResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Update an AI Gateway rate limit + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/reference-tables/queries/batch-rows: post: description: >- @@ -222868,7 +229634,309 @@ paths: appKeyAuth: [] - AuthZ: - user_access_manage - summary: Revoke permission + summary: Revoke permission + tags: + - Roles + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - user_access_manage + get: + description: Returns a list of all permissions for a single role. + operationId: ListRolePermissions + parameters: + - $ref: "#/components/parameters/RoleID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + name: logs_read_data + id: 00000000-0000-0000-0000-000000000005 + type: permissions + schema: + $ref: "#/components/schemas/PermissionsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: List permissions for a role + tags: + - Roles + x-codegen-request-body-name: body + post: + description: Adds a permission to a role. + operationId: AddPermissionToRole + parameters: + - $ref: "#/components/parameters/RoleID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + id: 6f66600e-dd12-11e8-9e55-7f30fbb45e73 + type: permissions + schema: + $ref: "#/components/schemas/RelationshipToPermission" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + name: logs_read_data + id: 00000000-0000-0000-0000-000000000006 + type: permissions + schema: + $ref: "#/components/schemas/PermissionsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Grant permission to a role + tags: + - Roles + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - user_access_manage + /api/v2/roles/{role_id}/users: + delete: + description: Removes a user from a role. + operationId: RemoveUserFromRole + parameters: + - $ref: "#/components/parameters/RoleID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + id: 00000000-0000-0000-2345-000000000000 + type: users + schema: + $ref: "#/components/schemas/RelationshipToUser" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + email: test@example.com + name: Example Name + id: 00000000-0000-0000-0000-000000000010 + type: users + schema: + $ref: "#/components/schemas/UsersResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Remove a user from a role + tags: + - Roles + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - user_access_manage + get: + description: Gets all users of a role. + operationId: ListRoleUsers + parameters: + - $ref: "#/components/parameters/RoleID" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/PageNumber" + - description: |- + User attribute to order results by. Sort order is **ascending** by default. + Sort order is **descending** if the field is prefixed by a negative sign, + for example `sort=-name`. Options: `name`, `email`, `status`. + in: query + name: sort + required: false + schema: + default: name + type: string + - description: Filter all users by the given string. Defaults to no filtering. + in: query + name: filter + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + email: test@example.com + name: Example Name + id: 00000000-0000-0000-0000-000000000008 + type: users + schema: + $ref: "#/components/schemas/UsersResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: Get all users of a role + tags: + - Roles + post: + description: Adds a user to a role. + operationId: AddUserToRole + parameters: + - $ref: "#/components/parameters/RoleID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + id: 00000000-0000-0000-2345-000000000000 + type: users + schema: + $ref: "#/components/schemas/RelationshipToUser" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + email: test@example.com + name: Example Name + id: 00000000-0000-0000-0000-000000000009 + type: users + schema: + $ref: "#/components/schemas/UsersResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Add a user to a role tags: - Roles x-codegen-request-body-name: body @@ -222876,66 +229944,41 @@ paths: operator: OR permissions: - user_access_manage - get: - description: Returns a list of all permissions for a single role. - operationId: ListRolePermissions + /api/v2/routing-rules: + delete: + description: >- + Delete a routing rule. Referenced rules require force=true. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted. + operationId: DeleteAiGatewayRoutingRule parameters: - - $ref: "#/components/parameters/RoleID" + - $ref: "#/components/parameters/AiGatewayRoutingRuleSlug" + - $ref: "#/components/parameters/AiGatewayRoutingRuleForceDelete" responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - name: logs_read_data - id: 00000000-0000-0000-0000-000000000005 - type: permissions - schema: - $ref: "#/components/schemas/PermissionsResponse" - description: OK - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Authentication error + "204": + description: No Content "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not found + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - user_access_read - summary: List permissions for a role + - ai_gateway_config_write + summary: Delete an AI Gateway routing rule tags: - - Roles - x-codegen-request-body-name: body - post: - description: Adds a permission to a role. - operationId: AddPermissionToRole - parameters: - - $ref: "#/components/parameters/RoleID" - requestBody: - content: - application/json: - examples: - default: - value: - data: - id: 6f66600e-dd12-11e8-9e55-7f30fbb45e73 - type: permissions - schema: - $ref: "#/components/schemas/RelationshipToPermission" - required: true + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: List all routing rules for the organization. + operationId: ListAiGatewayRoutingRules responses: "200": content: @@ -222945,135 +229988,141 @@ paths: value: data: - attributes: - name: logs_read_data - id: 00000000-0000-0000-0000-000000000006 - type: permissions + created_at: "2026-08-24T12:00:00Z" + route_id: 123 + tiers: + - ordering: configured + targets: + - model: gpt-5.2-codex + provider: prod-us + type: model + updated_at: "2026-08-24T12:00:00Z" + id: coding + type: routing-rules schema: - $ref: "#/components/schemas/PermissionsResponse" + $ref: "#/components/schemas/AiGatewayRoutingRuleListResponse" description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Authentication error - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - user_access_manage - summary: Grant permission to a role + - ai_gateway_config_read + summary: List AI Gateway routing rules tags: - - Roles - x-codegen-request-body-name: body - "x-permission": + - AI Gateway + x-permission: operator: OR permissions: - - user_access_manage - /api/v2/roles/{role_id}/users: - delete: - description: Removes a user from a role. - operationId: RemoveUserFromRole - parameters: - - $ref: "#/components/parameters/RoleID" + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: >- + Create an organization-owned routing rule. Data capture overrides are managed independently. Each tier has an ordering, which defaults to configured. A weighted_affinity tier distributes first-choice assignments by relative target weights (1 to 10000, default 1) and accepts only distinct model targets with an explicit provider. Weights need not total 100. Configured tiers must omit weights or set them to null. + operationId: CreateAiGatewayRoutingRule requestBody: content: application/json: examples: - default: + weighted_affinity: value: data: - id: 00000000-0000-0000-2345-000000000000 - type: users + attributes: + slug: coding + tiers: + - ordering: weighted_affinity + targets: + - model: gpt-5.2-codex + provider: prod-us + type: model + weight: 70 + - model: gpt-4o-mini + provider: prod-us + type: model + type: routing-rules schema: - $ref: "#/components/schemas/RelationshipToUser" + $ref: "#/components/schemas/AiGatewayRoutingRuleCreateRequest" required: true responses: - "200": + "201": content: application/json: examples: default: value: data: - - attributes: - email: test@example.com - name: Example Name - id: 00000000-0000-0000-0000-000000000010 - type: users - schema: - $ref: "#/components/schemas/UsersResponse" - description: OK + attributes: + created_at: "2026-08-24T12:00:00Z" + route_id: 123 + tiers: + - ordering: configured + targets: + - model: gpt-5.2-codex + provider: prod-us + type: model + updated_at: "2026-08-24T12:00:00Z" + id: coding + type: routing-rules + weighted_affinity: + value: + data: + attributes: + created_at: "2026-08-24T12:00:00Z" + route_id: 123 + tiers: + - ordering: weighted_affinity + targets: + - model: gpt-5.2-codex + provider: prod-us + type: model + weight: 70 + - model: gpt-4o-mini + provider: prod-us + type: model + weight: 1 + updated_at: "2026-08-24T12:00:00Z" + id: coding + type: routing-rules + schema: + $ref: "#/components/schemas/AiGatewayRoutingRuleResponse" + description: Created "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Authentication error - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not found + $ref: "#/components/responses/BadRequestResponse" + "409": + $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - user_access_manage - summary: Remove a user from a role + - ai_gateway_config_write + summary: Create an AI Gateway routing rule tags: - - Roles + - AI Gateway x-codegen-request-body-name: body - "x-permission": + x-permission: operator: OR permissions: - - user_access_manage - get: - description: Gets all users of a role. - operationId: ListRoleUsers + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: >- + Replace a routing rule's tiers. The slug is immutable; data capture is managed independently. This is a full replacement: omitted or null ordering resets the tier to configured, and omitted or null weights in a weighted_affinity tier reset to 1. Omitted or null reasoning_level clears a model destination's reasoning override. Replacing a rule repairs tiers reported with an ordering_issue. + operationId: UpdateAiGatewayRoutingRule parameters: - - $ref: "#/components/parameters/RoleID" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageNumber" - - description: |- - User attribute to order results by. Sort order is **ascending** by default. - Sort order is **descending** if the field is prefixed by a negative sign, - for example `sort=-name`. Options: `name`, `email`, `status`. - in: query - name: sort - required: false - schema: - default: name - type: string - - description: Filter all users by the given string. Defaults to no filtering. - in: query - name: filter - required: false - schema: - type: string + - $ref: "#/components/parameters/AiGatewayRoutingRuleSlug" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayRoutingRuleReplaceRequest" + required: true responses: "200": content: @@ -223082,53 +230131,51 @@ paths: default: value: data: - - attributes: - email: test@example.com - name: Example Name - id: 00000000-0000-0000-0000-000000000008 - type: users + attributes: + created_at: "2026-08-24T12:00:00Z" + route_id: 123 + tiers: + - ordering: configured + targets: + - model: gpt-5.2-codex + provider: prod-us + type: model + updated_at: "2026-08-24T12:00:00Z" + id: coding + type: routing-rules schema: - $ref: "#/components/schemas/UsersResponse" + $ref: "#/components/schemas/AiGatewayRoutingRuleResponse" description: OK - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Authentication error + "400": + $ref: "#/components/responses/BadRequestResponse" "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not found + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - user_access_read - summary: Get all users of a role + - ai_gateway_config_write + summary: Replace an AI Gateway routing rule tags: - - Roles - post: - description: Adds a user to a role. - operationId: AddUserToRole + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/routing-rules/get: + get: + description: Get a routing rule by its organization-unique slug. + operationId: GetAiGatewayRoutingRule parameters: - - $ref: "#/components/parameters/RoleID" - requestBody: - content: - application/json: - examples: - default: - value: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - schema: - $ref: "#/components/schemas/RelationshipToUser" - required: true + - $ref: "#/components/parameters/AiGatewayRoutingRuleSlug" responses: "200": content: @@ -223137,47 +230184,40 @@ paths: default: value: data: - - attributes: - email: test@example.com - name: Example Name - id: 00000000-0000-0000-0000-000000000009 - type: users + attributes: + created_at: "2026-08-24T12:00:00Z" + route_id: 123 + tiers: + - ordering: configured + targets: + - model: gpt-5.2-codex + provider: prod-us + type: model + updated_at: "2026-08-24T12:00:00Z" + id: coding + type: routing-rules schema: - $ref: "#/components/schemas/UsersResponse" + $ref: "#/components/schemas/AiGatewayRoutingRuleResponse" description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Authentication error "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not found + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - user_access_manage - summary: Add a user to a role + - ai_gateway_config_read + summary: Get an AI Gateway routing rule tags: - - Roles - x-codegen-request-body-name: body - "x-permission": + - AI Gateway + x-permission: operator: OR permissions: - - user_access_manage + - ai_gateway_config_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/rum/analytics/aggregate: post: description: |- @@ -260299,6 +267339,18 @@ servers: default: api description: The subdomain where the API is deployed. tags: + - description: |- + AI Gateway routes your applications' LLM requests to the model providers you connect, and + applies your organization's routing, access, spending, rate limit, and data capture rules. + + These endpoints allow you to configure: + + - Providers: the model providers your organization connects, and the models and pricing each offers. + - Routing rules: the named routes your applications call, and the models that serve each one. + - Access: inbound routing policies and model groups that decide who can use which models. + - Budgets and rate limits: spending caps and request limits, and their current usage. + - Data capture and governance: what request data is recorded, and organization-wide controls. + name: AI Gateway - description: Evaluate LLM interactions for security threats such as prompt injection and jailbreak attempts. name: AI Guard - description: |- diff --git a/examples/v2/ai-gateway/BulkCreateAiGatewayModels.java b/examples/v2/ai-gateway/BulkCreateAiGatewayModels.java new file mode 100644 index 00000000000..edc500f732a --- /dev/null +++ b/examples/v2/ai-gateway/BulkCreateAiGatewayModels.java @@ -0,0 +1,51 @@ +// Add multiple models to an AI Gateway provider returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryListResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryType; +import com.datadog.api.client.v2.model.AiGatewayModelCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelsBulkCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelsBulkCreateData; +import com.datadog.api.client.v2.model.AiGatewayModelsBulkCreateRequest; +import com.datadog.api.client.v2.model.AiGatewaySupportedOperation; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.bulkCreateAiGatewayModels", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelsBulkCreateRequest body = + new AiGatewayModelsBulkCreateRequest() + .data( + new AiGatewayModelsBulkCreateData() + .attributes( + new AiGatewayModelsBulkCreateAttributes() + .models( + Collections.singletonList( + new AiGatewayModelCreateAttributes() + .modelIdCanonical("gpt-5.2-codex") + .modelIdWire("gpt-5.2-codex-20260801") + .supportedOperations( + Collections.singletonList( + AiGatewaySupportedOperation + .OPENAI_CHAT_COMPLETIONS))))) + .type(AiGatewayModelCatalogEntryType.MODEL_CATALOG_ENTRIES)); + + try { + AiGatewayModelCatalogEntryListResponse result = + apiInstance.bulkCreateAiGatewayModels(42L, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#bulkCreateAiGatewayModels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayBudget.java b/examples/v2/ai-gateway/CreateAiGatewayBudget.java new file mode 100644 index 00000000000..14544de0172 --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayBudget.java @@ -0,0 +1,58 @@ +// Create an AI Gateway budget returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayBudgetCreateData; +import com.datadog.api.client.v2.model.AiGatewayBudgetCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayBudgetEnforcement; +import com.datadog.api.client.v2.model.AiGatewayBudgetResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetSelectorEntry; +import com.datadog.api.client.v2.model.AiGatewayBudgetType; +import com.datadog.api.client.v2.model.AiGatewayBudgetWindowPolicy; +import java.util.Collections; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayBudget", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayBudgetCreateRequest body = + new AiGatewayBudgetCreateRequest() + .data( + new AiGatewayBudgetCreateData() + .attributes( + new AiGatewayBudgetCreateAttributes() + .capacityMicrocents(100000000L) + .enforcement(AiGatewayBudgetEnforcement.BLOCK) + .name("Coding agents") + .selector( + Collections.singletonList( + new AiGatewayBudgetSelectorEntry() + .dim("user_id") + .perValue(true) + .values( + Collections.singletonList( + "11111111-1111-1111-1111-111111111111")))) + .tags(Map.ofEntries(Map.entry("model", "gpt-5.2-codex"))) + .trackExisting(false) + .warningThreshold(0.9) + .windowPolicy(AiGatewayBudgetWindowPolicy.MONTHLY)) + .type(AiGatewayBudgetType.BUDGETS)); + + try { + AiGatewayBudgetResponse result = apiInstance.createAiGatewayBudget(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayBudget"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayDataCaptureOverride.java b/examples/v2/ai-gateway/CreateAiGatewayDataCaptureOverride.java new file mode 100644 index 00000000000..2a480e38505 --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayDataCaptureOverride.java @@ -0,0 +1,60 @@ +// Create an AI Gateway data capture override returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequestData; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequestDataAttributes; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequestDataAttributesMode; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequestDataAttributesOperation; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequestDataType; +import com.datadog.api.client.v2.model.AiGatewayCaptureOverrideResponse; +import com.datadog.api.client.v2.model.AiGatewayCaptureScope; +import com.datadog.api.client.v2.model.AiGatewayMetadataCaptureItem; +import java.util.Arrays; +import java.util.Map; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayDataCaptureOverride", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayCaptureCreateRequest body = + new AiGatewayCaptureCreateRequest() + .data( + new AiGatewayCaptureCreateRequestData() + .attributes( + new AiGatewayCaptureCreateRequestDataAttributes() + .configurationRevision("capture-revision-1") + .metadataCapture( + Arrays.asList( + AiGatewayMetadataCaptureItem.TOOL_USAGE, + AiGatewayMetadataCaptureItem.TOOL_OUTPUT_SIZE, + AiGatewayMetadataCaptureItem.TOOL_NAMES)) + .mode(AiGatewayCaptureCreateRequestDataAttributesMode.METADATA_ONLY) + .name("Research") + .operation(AiGatewayCaptureCreateRequestDataAttributesOperation.CREATE) + .revision(1L) + .scope( + new AiGatewayCaptureScope() + .tags(Map.ofEntries(Map.entry("env", "prod"))))) + .id(UUID.fromString("11111111-1111-4111-8111-111111111111")) + .type(AiGatewayCaptureCreateRequestDataType.DATA_CAPTURE_OVERRIDES)); + + try { + AiGatewayCaptureOverrideResponse result = + apiInstance.createAiGatewayDataCaptureOverride(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayDataCaptureOverride"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayModel.java b/examples/v2/ai-gateway/CreateAiGatewayModel.java new file mode 100644 index 00000000000..6ec12672417 --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayModel.java @@ -0,0 +1,45 @@ +// Add a model to an AI Gateway provider returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryType; +import com.datadog.api.client.v2.model.AiGatewayModelCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelCreateData; +import com.datadog.api.client.v2.model.AiGatewayModelCreateRequest; +import com.datadog.api.client.v2.model.AiGatewaySupportedOperation; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayModel", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelCreateRequest body = + new AiGatewayModelCreateRequest() + .data( + new AiGatewayModelCreateData() + .attributes( + new AiGatewayModelCreateAttributes() + .modelIdCanonical("gpt-5.2-codex") + .modelIdWire("gpt-5.2-codex-20260801") + .supportedOperations( + Collections.singletonList( + AiGatewaySupportedOperation.OPENAI_CHAT_COMPLETIONS))) + .type(AiGatewayModelCatalogEntryType.MODEL_CATALOG_ENTRIES)); + + try { + AiGatewayModelCatalogEntryResponse result = apiInstance.createAiGatewayModel(42L, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayModelGroup.java b/examples/v2/ai-gateway/CreateAiGatewayModelGroup.java new file mode 100644 index 00000000000..33f70becfb7 --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayModelGroup.java @@ -0,0 +1,54 @@ +// Create an AI Gateway model group returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayMaxReasoningLevel; +import com.datadog.api.client.v2.model.AiGatewayModelGroupBinding; +import com.datadog.api.client.v2.model.AiGatewayModelGroupBindingRelation; +import com.datadog.api.client.v2.model.AiGatewayModelGroupCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelGroupCreateData; +import com.datadog.api.client.v2.model.AiGatewayModelGroupCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayModelGroupResponse; +import com.datadog.api.client.v2.model.AiGatewayModelGroupType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayModelGroup", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelGroupCreateRequest body = + new AiGatewayModelGroupCreateRequest() + .data( + new AiGatewayModelGroupCreateData() + .attributes( + new AiGatewayModelGroupCreateAttributes() + .allowFastMode(true) + .bindings( + Collections.singletonList( + new AiGatewayModelGroupBinding() + .principals( + Collections.singletonList( + "user:55555555-5555-5555-5555-555555555555")) + .relation(AiGatewayModelGroupBindingRelation.RUNNER))) + .maxReasoningLevel(AiGatewayMaxReasoningLevel.HIGH) + .modelIds(Collections.singletonList(101L)) + .name("Coding models") + .routingRuleSlugs(Collections.singletonList("coding-route"))) + .type(AiGatewayModelGroupType.MODEL_GROUPS)); + + try { + AiGatewayModelGroupResponse result = apiInstance.createAiGatewayModelGroup(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayModelGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayProvider.java b/examples/v2/ai-gateway/CreateAiGatewayProvider.java new file mode 100644 index 00000000000..42c3ec4e4a7 --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayProvider.java @@ -0,0 +1,79 @@ +// Create an AI Gateway provider returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayCustomProviderSupportedOperation; +import com.datadog.api.client.v2.model.AiGatewayKnownProvider; +import com.datadog.api.client.v2.model.AiGatewayModelInput; +import com.datadog.api.client.v2.model.AiGatewayProviderCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayProviderCreateData; +import com.datadog.api.client.v2.model.AiGatewayProviderCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayProviderInitialBinding; +import com.datadog.api.client.v2.model.AiGatewayProviderInitialBindingRelation; +import com.datadog.api.client.v2.model.AiGatewayProviderIntegrationConfig; +import com.datadog.api.client.v2.model.AiGatewayProviderResponse; +import com.datadog.api.client.v2.model.AiGatewayProviderType; +import com.datadog.api.client.v2.model.AiGatewaySupportedOperation; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayProvider", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayProviderCreateRequest body = + new AiGatewayProviderCreateRequest() + .data( + new AiGatewayProviderCreateData() + .attributes( + new AiGatewayProviderCreateAttributes() + .costMultiplier(1.0) + .initialBindings( + Collections.singletonList( + new AiGatewayProviderInitialBinding() + .principals( + Collections.singletonList( + "org:11111111-1111-1111-1111-111111111111")) + .relation(AiGatewayProviderInitialBindingRelation.VIEWER))) + .integrationAccountId("account-123") + .integrationConfig( + new AiGatewayProviderIntegrationConfig() + .bedrockRegion("us-east-1") + .foundryProject("my-project") + .foundryResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry") + .location("us-central1") + .projectId("my-gcp-project") + .supportedOperations( + Collections.singletonList( + AiGatewayCustomProviderSupportedOperation + .OPENAI_CHAT_COMPLETIONS))) + .knownProvider(AiGatewayKnownProvider.OPENAI) + .models( + Collections.singletonList( + new AiGatewayModelInput() + .modelIdCanonical("gpt-5.2-codex") + .modelIdWire("gpt-5.2-codex-20260801") + .supportedOperations( + Collections.singletonList( + AiGatewaySupportedOperation + .OPENAI_CHAT_COMPLETIONS)))) + .name("production-us") + .slug("prod-us")) + .type(AiGatewayProviderType.PROVIDERS)); + + try { + AiGatewayProviderResponse result = apiInstance.createAiGatewayProvider(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayRateLimit.java b/examples/v2/ai-gateway/CreateAiGatewayRateLimit.java new file mode 100644 index 00000000000..aab0b0c0a21 --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayRateLimit.java @@ -0,0 +1,47 @@ +// Create an AI Gateway rate limit returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRateLimitCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayRateLimitCreateData; +import com.datadog.api.client.v2.model.AiGatewayRateLimitCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayRateLimitMode; +import com.datadog.api.client.v2.model.AiGatewayRateLimitResponse; +import com.datadog.api.client.v2.model.AiGatewayRateLimitType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayRateLimit", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayRateLimitCreateRequest body = + new AiGatewayRateLimitCreateRequest() + .data( + new AiGatewayRateLimitCreateData() + .attributes( + new AiGatewayRateLimitCreateAttributes() + .inputTokensPerMinute(null) + .mode(AiGatewayRateLimitMode.ALERT) + .name("Default rate limit") + .outputTokensPerMinute(null) + .requestsPerMinute(600L) + .teamId(UUID.fromString("00000000-0000-4000-8000-000000000002")) + .userId(UUID.fromString("00000000-0000-4000-8000-000000000001"))) + .type(AiGatewayRateLimitType.RATE_LIMITS)); + + try { + AiGatewayRateLimitResponse result = apiInstance.createAiGatewayRateLimit(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayRateLimit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.java b/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.java new file mode 100644 index 00000000000..e758bd9f0ea --- /dev/null +++ b/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.java @@ -0,0 +1,62 @@ +// Create an AI Gateway routing rule returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayNullableRoutingRuleTierOrdering; +import com.datadog.api.client.v2.model.AiGatewayRoutingReasoningLevel; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleCreateAttributes; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleCreateData; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleResponse; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleTargetRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleTargetType; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleTierRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createAiGatewayRoutingRule", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayRoutingRuleCreateRequest body = + new AiGatewayRoutingRuleCreateRequest() + .data( + new AiGatewayRoutingRuleCreateData() + .attributes( + new AiGatewayRoutingRuleCreateAttributes() + .slug("coding") + .tiers( + Collections.singletonList( + new AiGatewayRoutingRuleTierRequest() + .ordering( + AiGatewayNullableRoutingRuleTierOrdering.CONFIGURED) + .targets( + Collections.singletonList( + new AiGatewayRoutingRuleTargetRequest() + .id(901L) + .model("gpt-5.2-codex") + .modelId(101L) + .provider("prod-us") + .reasoningLevel( + AiGatewayRoutingReasoningLevel.MEDIUM) + .slug("coding-fallback") + .type(AiGatewayRoutingRuleTargetType.MODEL) + .weight(70L)))))) + .type(AiGatewayRoutingRuleType.ROUTING_RULES)); + + try { + AiGatewayRoutingRuleResponse result = apiInstance.createAiGatewayRoutingRule(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#createAiGatewayRoutingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayBudget.java b/examples/v2/ai-gateway/DeleteAiGatewayBudget.java new file mode 100644 index 00000000000..b2eb59eb687 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayBudget.java @@ -0,0 +1,25 @@ +// Archive an AI Gateway budget returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayBudget", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayBudget(UUID.fromString("11111111-1111-1111-1111-111111111111")); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayBudget"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayDataCaptureOverride.java b/examples/v2/ai-gateway/DeleteAiGatewayDataCaptureOverride.java new file mode 100644 index 00000000000..7ae690f8ff9 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayDataCaptureOverride.java @@ -0,0 +1,51 @@ +// Delete an AI Gateway data capture override returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequest; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequestData; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequestDataAttributes; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequestDataAttributesMode; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequestDataAttributesOperation; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequestDataType; +import com.datadog.api.client.v2.model.AiGatewayCaptureScope; +import java.util.Map; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayDataCaptureOverride", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayCaptureDeleteRequest body = + new AiGatewayCaptureDeleteRequest() + .data( + new AiGatewayCaptureDeleteRequestData() + .attributes( + new AiGatewayCaptureDeleteRequestDataAttributes() + .configurationRevision("capture-revision-1") + .mode(AiGatewayCaptureDeleteRequestDataAttributesMode.METADATA_ONLY) + .name("Research") + .operation(AiGatewayCaptureDeleteRequestDataAttributesOperation.CREATE) + .revision(1L) + .scope( + new AiGatewayCaptureScope() + .tags(Map.ofEntries(Map.entry("env", "prod"))))) + .id(UUID.fromString("11111111-1111-4111-8111-111111111111")) + .type(AiGatewayCaptureDeleteRequestDataType.DATA_CAPTURE_OVERRIDES)); + + try { + apiInstance.deleteAiGatewayDataCaptureOverride( + UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayDataCaptureOverride"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayModel.java b/examples/v2/ai-gateway/DeleteAiGatewayModel.java new file mode 100644 index 00000000000..fd14faaadd3 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayModel.java @@ -0,0 +1,24 @@ +// Delete a model from an AI Gateway provider returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayModel", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayModel(42L, "gpt-5.2-codex"); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayModelGroup.java b/examples/v2/ai-gateway/DeleteAiGatewayModelGroup.java new file mode 100644 index 00000000000..99e4fde6ae4 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayModelGroup.java @@ -0,0 +1,24 @@ +// Delete an AI Gateway model group returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayModelGroup", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayModelGroup("7"); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayModelGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayModelPricing.java b/examples/v2/ai-gateway/DeleteAiGatewayModelPricing.java new file mode 100644 index 00000000000..cd9c122e8f1 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayModelPricing.java @@ -0,0 +1,24 @@ +// Delete a model pricing override returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayModelPricing", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayModelPricing(42L, "gpt-5.2-codex"); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayModelPricing"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayPolicy.java b/examples/v2/ai-gateway/DeleteAiGatewayPolicy.java new file mode 100644 index 00000000000..629a4535568 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayPolicy.java @@ -0,0 +1,24 @@ +// Delete an AI Gateway routing policy returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayPolicy", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayPolicy("coding-agent"); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayProvider.java b/examples/v2/ai-gateway/DeleteAiGatewayProvider.java new file mode 100644 index 00000000000..439c067536f --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayProvider.java @@ -0,0 +1,24 @@ +// Delete an AI Gateway provider returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayProvider", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayProvider(42L); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayRateLimit.java b/examples/v2/ai-gateway/DeleteAiGatewayRateLimit.java new file mode 100644 index 00000000000..9d942ac0833 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayRateLimit.java @@ -0,0 +1,25 @@ +// Archive an AI Gateway rate limit returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayRateLimit", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayRateLimit(UUID.fromString("33333333-3333-3333-3333-333333333333")); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayRateLimit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/DeleteAiGatewayRoutingRule.java b/examples/v2/ai-gateway/DeleteAiGatewayRoutingRule.java new file mode 100644 index 00000000000..25bc9a03069 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAiGatewayRoutingRule.java @@ -0,0 +1,24 @@ +// Delete an AI Gateway routing rule returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAiGatewayRoutingRule", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAiGatewayRoutingRule("coding"); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAiGatewayRoutingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayBudget.java b/examples/v2/ai-gateway/GetAiGatewayBudget.java new file mode 100644 index 00000000000..a0f2066b53b --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayBudget.java @@ -0,0 +1,28 @@ +// Get an AI Gateway budget returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayBudget", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayBudgetResponse result = + apiInstance.getAiGatewayBudget(UUID.fromString("11111111-1111-1111-1111-111111111111")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayBudget"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayBudgetCurrentPeriod.java b/examples/v2/ai-gateway/GetAiGatewayBudgetCurrentPeriod.java new file mode 100644 index 00000000000..e4bdc4c5096 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayBudgetCurrentPeriod.java @@ -0,0 +1,29 @@ +// Get an AI Gateway budget's current period returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetPeriodResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayBudgetCurrentPeriod", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayBudgetPeriodResponse result = + apiInstance.getAiGatewayBudgetCurrentPeriod( + UUID.fromString("11111111-1111-1111-1111-111111111111")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayBudgetCurrentPeriod"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayBudgetInstancesSummary.java b/examples/v2/ai-gateway/GetAiGatewayBudgetInstancesSummary.java new file mode 100644 index 00000000000..dd3afcb889b --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayBudgetInstancesSummary.java @@ -0,0 +1,29 @@ +// Get an AI Gateway budget instance summary returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstancesSummaryResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayBudgetInstancesSummary", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayBudgetInstancesSummaryResponse result = + apiInstance.getAiGatewayBudgetInstancesSummary( + UUID.fromString("11111111-1111-1111-1111-111111111111")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayBudgetInstancesSummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayDataCaptureConfiguration.java b/examples/v2/ai-gateway/GetAiGatewayDataCaptureConfiguration.java new file mode 100644 index 00000000000..95dd34b2ff4 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayDataCaptureConfiguration.java @@ -0,0 +1,28 @@ +// Get the AI Gateway data capture configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayCaptureConfigurationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayDataCaptureConfiguration", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayCaptureConfigurationResponse result = + apiInstance.getAiGatewayDataCaptureConfiguration(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling AiGatewayApi#getAiGatewayDataCaptureConfiguration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayGovernance.java b/examples/v2/ai-gateway/GetAiGatewayGovernance.java new file mode 100644 index 00000000000..82f0843e45b --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayGovernance.java @@ -0,0 +1,26 @@ +// Get AI Gateway governance controls returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayGovernanceResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayGovernance", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayGovernanceResponse result = apiInstance.getAiGatewayGovernance(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayGovernance"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayModelGroup.java b/examples/v2/ai-gateway/GetAiGatewayModelGroup.java new file mode 100644 index 00000000000..ae57f4d8466 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayModelGroup.java @@ -0,0 +1,26 @@ +// Get an AI Gateway model group returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelGroupResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayModelGroup", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayModelGroupResponse result = apiInstance.getAiGatewayModelGroup("7"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayModelGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayModelPricing.java b/examples/v2/ai-gateway/GetAiGatewayModelPricing.java new file mode 100644 index 00000000000..116d3e8ac24 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayModelPricing.java @@ -0,0 +1,27 @@ +// Get a model pricing override returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelPricingResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayModelPricing", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayModelPricingResponse result = + apiInstance.getAiGatewayModelPricing(42L, "gpt-5.2-codex"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayModelPricing"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayPolicy.java b/examples/v2/ai-gateway/GetAiGatewayPolicy.java new file mode 100644 index 00000000000..e3ca75f89c1 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayPolicy.java @@ -0,0 +1,26 @@ +// Get an AI Gateway routing policy returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayPolicyResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayPolicy", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayPolicyResponse result = apiInstance.getAiGatewayPolicy("coding-agent"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayProvider.java b/examples/v2/ai-gateway/GetAiGatewayProvider.java new file mode 100644 index 00000000000..f86b6ea89f2 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayProvider.java @@ -0,0 +1,26 @@ +// Get an AI Gateway provider returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayProviderResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayProvider", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayProviderResponse result = apiInstance.getAiGatewayProvider(42L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayRateLimit.java b/examples/v2/ai-gateway/GetAiGatewayRateLimit.java new file mode 100644 index 00000000000..971ab55ab3e --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayRateLimit.java @@ -0,0 +1,29 @@ +// Get an AI Gateway rate limit returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRateLimitResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayRateLimit", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayRateLimitResponse result = + apiInstance.getAiGatewayRateLimit( + UUID.fromString("33333333-3333-3333-3333-333333333333")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayRateLimit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayRateLimitUsage.java b/examples/v2/ai-gateway/GetAiGatewayRateLimitUsage.java new file mode 100644 index 00000000000..5917b1b91ac --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayRateLimitUsage.java @@ -0,0 +1,26 @@ +// Get AI Gateway rate limit usage returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRateLimitUsageListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayRateLimitUsage", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayRateLimitUsageListResponse result = apiInstance.getAiGatewayRateLimitUsage(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayRateLimitUsage"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/GetAiGatewayRoutingRule.java b/examples/v2/ai-gateway/GetAiGatewayRoutingRule.java new file mode 100644 index 00000000000..bad2b828938 --- /dev/null +++ b/examples/v2/ai-gateway/GetAiGatewayRoutingRule.java @@ -0,0 +1,26 @@ +// Get an AI Gateway routing rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getAiGatewayRoutingRule", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayRoutingRuleResponse result = apiInstance.getAiGatewayRoutingRule("coding"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#getAiGatewayRoutingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayBudgetInstanceDimensions.java b/examples/v2/ai-gateway/ListAiGatewayBudgetInstanceDimensions.java new file mode 100644 index 00000000000..7249d54233a --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayBudgetInstanceDimensions.java @@ -0,0 +1,30 @@ +// List AI Gateway budget instance dimension values returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceDimensionListResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayBudgetInstanceDimensions", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayBudgetInstanceDimensionListResponse result = + apiInstance.listAiGatewayBudgetInstanceDimensions( + UUID.fromString("11111111-1111-1111-1111-111111111111")); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling AiGatewayApi#listAiGatewayBudgetInstanceDimensions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayBudgetInstances.java b/examples/v2/ai-gateway/ListAiGatewayBudgetInstances.java new file mode 100644 index 00000000000..139ab0915a1 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayBudgetInstances.java @@ -0,0 +1,29 @@ +// List AI Gateway budget instances returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceListResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayBudgetInstances", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayBudgetInstanceListResponse result = + apiInstance.listAiGatewayBudgetInstances( + UUID.fromString("11111111-1111-1111-1111-111111111111")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayBudgetInstances"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayBudgets.java b/examples/v2/ai-gateway/ListAiGatewayBudgets.java new file mode 100644 index 00000000000..5e6a061d140 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayBudgets.java @@ -0,0 +1,26 @@ +// List AI Gateway budgets returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayBudgets", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayBudgetListResponse result = apiInstance.listAiGatewayBudgets(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayBudgets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayModelGroups.java b/examples/v2/ai-gateway/ListAiGatewayModelGroups.java new file mode 100644 index 00000000000..3ae88c9b508 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayModelGroups.java @@ -0,0 +1,26 @@ +// List AI Gateway model groups returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelGroupListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayModelGroups", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayModelGroupListResponse result = apiInstance.listAiGatewayModelGroups(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayModelGroups"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayModels.java b/examples/v2/ai-gateway/ListAiGatewayModels.java new file mode 100644 index 00000000000..de9a6f748a5 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayModels.java @@ -0,0 +1,26 @@ +// List models for an AI Gateway provider returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayModels", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayModelCatalogEntryListResponse result = apiInstance.listAiGatewayModels(42L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayModels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayModelsByCanonical.java b/examples/v2/ai-gateway/ListAiGatewayModelsByCanonical.java new file mode 100644 index 00000000000..ac23907660f --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayModelsByCanonical.java @@ -0,0 +1,26 @@ +// List AI Gateway models by canonical ID returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelsByCanonicalListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayModelsByCanonical", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayModelsByCanonicalListResponse result = apiInstance.listAiGatewayModelsByCanonical(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayModelsByCanonical"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayPolicies.java b/examples/v2/ai-gateway/ListAiGatewayPolicies.java new file mode 100644 index 00000000000..c24c34584d4 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayPolicies.java @@ -0,0 +1,26 @@ +// List AI Gateway routing policies returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayPolicyListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayPolicies", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayPolicyListResponse result = apiInstance.listAiGatewayPolicies(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayPolicies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayProviderModels.java b/examples/v2/ai-gateway/ListAiGatewayProviderModels.java new file mode 100644 index 00000000000..cfb6fa35b26 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayProviderModels.java @@ -0,0 +1,27 @@ +// List models available from a provider integration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayDiscoveredModelListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayProviderModels", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayDiscoveredModelListResponse result = + apiInstance.listAiGatewayProviderModels("openai", "account-123"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayProviderModels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayProviders.java b/examples/v2/ai-gateway/ListAiGatewayProviders.java new file mode 100644 index 00000000000..ed7f5f8f49e --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayProviders.java @@ -0,0 +1,26 @@ +// List AI Gateway providers returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayProviderListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayProviders", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayProviderListResponse result = apiInstance.listAiGatewayProviders(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayProviders"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayRateLimits.java b/examples/v2/ai-gateway/ListAiGatewayRateLimits.java new file mode 100644 index 00000000000..e1e89f9f8df --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayRateLimits.java @@ -0,0 +1,26 @@ +// List AI Gateway rate limits returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRateLimitListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayRateLimits", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayRateLimitListResponse result = apiInstance.listAiGatewayRateLimits(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayRateLimits"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ListAiGatewayRoutingRules.java b/examples/v2/ai-gateway/ListAiGatewayRoutingRules.java new file mode 100644 index 00000000000..490b79f5be0 --- /dev/null +++ b/examples/v2/ai-gateway/ListAiGatewayRoutingRules.java @@ -0,0 +1,26 @@ +// List AI Gateway routing rules returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listAiGatewayRoutingRules", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + AiGatewayRoutingRuleListResponse result = apiInstance.listAiGatewayRoutingRules(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#listAiGatewayRoutingRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/OverrideAiGatewayBudgetInstanceCapacity.java b/examples/v2/ai-gateway/OverrideAiGatewayBudgetInstanceCapacity.java new file mode 100644 index 00000000000..422eeb34848 --- /dev/null +++ b/examples/v2/ai-gateway/OverrideAiGatewayBudgetInstanceCapacity.java @@ -0,0 +1,45 @@ +// Override a budget instance's capacity returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceCapacityOverrideAttributes; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceCapacityOverrideData; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceCapacityOverrideRequest; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.overrideAiGatewayBudgetInstanceCapacity", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayBudgetInstanceCapacityOverrideRequest body = + new AiGatewayBudgetInstanceCapacityOverrideRequest() + .data( + new AiGatewayBudgetInstanceCapacityOverrideData() + .attributes( + new AiGatewayBudgetInstanceCapacityOverrideAttributes() + .capacityMicrocents(250000000L) + .instanceKey("v1|7:user_id=36:22222222-2222-2222-2222-222222222222") + .reason("Temporary increase for a launch week")) + .type(AiGatewayBudgetInstanceType.BUDGET_INSTANCES)); + + try { + AiGatewayBudgetInstanceResponse result = + apiInstance.overrideAiGatewayBudgetInstanceCapacity( + UUID.fromString("11111111-1111-1111-1111-111111111111"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling AiGatewayApi#overrideAiGatewayBudgetInstanceCapacity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/ResetAiGatewayBudgetInstanceSpend.java b/examples/v2/ai-gateway/ResetAiGatewayBudgetInstanceSpend.java new file mode 100644 index 00000000000..f4efdc85606 --- /dev/null +++ b/examples/v2/ai-gateway/ResetAiGatewayBudgetInstanceSpend.java @@ -0,0 +1,43 @@ +// Reset a budget instance's spend returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResetAttributes; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResetData; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResetRequest; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.resetAiGatewayBudgetInstanceSpend", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayBudgetInstanceResetRequest body = + new AiGatewayBudgetInstanceResetRequest() + .data( + new AiGatewayBudgetInstanceResetData() + .attributes( + new AiGatewayBudgetInstanceResetAttributes() + .instanceKey("v1|7:user_id=36:22222222-2222-2222-2222-222222222222") + .reason("Credit approved after incorrect usage attribution")) + .type(AiGatewayBudgetInstanceType.BUDGET_INSTANCES)); + + try { + AiGatewayBudgetInstanceResponse result = + apiInstance.resetAiGatewayBudgetInstanceSpend( + UUID.fromString("11111111-1111-1111-1111-111111111111"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#resetAiGatewayBudgetInstanceSpend"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayBudget.java b/examples/v2/ai-gateway/UpdateAiGatewayBudget.java new file mode 100644 index 00000000000..1290267d3a4 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayBudget.java @@ -0,0 +1,51 @@ +// Update an AI Gateway budget returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayBudgetEnforcement; +import com.datadog.api.client.v2.model.AiGatewayBudgetResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetType; +import com.datadog.api.client.v2.model.AiGatewayBudgetUpdateAttributes; +import com.datadog.api.client.v2.model.AiGatewayBudgetUpdateData; +import com.datadog.api.client.v2.model.AiGatewayBudgetUpdateRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayBudget", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayBudgetUpdateRequest body = + new AiGatewayBudgetUpdateRequest() + .data( + new AiGatewayBudgetUpdateData() + .attributes( + new AiGatewayBudgetUpdateAttributes() + .applyToCurrentPeriod(false) + .capacityMicrocents(120000000L) + .enabled(true) + .enforcement(AiGatewayBudgetEnforcement.BLOCK) + .name("Coding agents") + .reason("Temporary capacity increase approved for an incident") + .trackExisting(false) + .warningThreshold(0.8)) + .id(UUID.fromString("11111111-1111-1111-1111-111111111111")) + .type(AiGatewayBudgetType.BUDGETS)); + + try { + AiGatewayBudgetResponse result = + apiInstance.updateAiGatewayBudget( + UUID.fromString("11111111-1111-1111-1111-111111111111"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayBudget"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayDataCaptureOverride.java b/examples/v2/ai-gateway/UpdateAiGatewayDataCaptureOverride.java new file mode 100644 index 00000000000..5c1c8ca7dd7 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayDataCaptureOverride.java @@ -0,0 +1,61 @@ +// Replace an AI Gateway data capture override returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayCaptureOverrideResponse; +import com.datadog.api.client.v2.model.AiGatewayCaptureScope; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequestData; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequestDataAttributes; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequestDataAttributesMode; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequestDataAttributesOperation; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequestDataType; +import com.datadog.api.client.v2.model.AiGatewayMetadataCaptureItem; +import java.util.Arrays; +import java.util.Map; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayDataCaptureOverride", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayCaptureUpdateRequest body = + new AiGatewayCaptureUpdateRequest() + .data( + new AiGatewayCaptureUpdateRequestData() + .attributes( + new AiGatewayCaptureUpdateRequestDataAttributes() + .configurationRevision("capture-revision-1") + .metadataCapture( + Arrays.asList( + AiGatewayMetadataCaptureItem.TOOL_USAGE, + AiGatewayMetadataCaptureItem.TOOL_OUTPUT_SIZE, + AiGatewayMetadataCaptureItem.TOOL_NAMES)) + .mode(AiGatewayCaptureUpdateRequestDataAttributesMode.METADATA_ONLY) + .name("Research") + .operation(AiGatewayCaptureUpdateRequestDataAttributesOperation.CREATE) + .revision(1L) + .scope( + new AiGatewayCaptureScope() + .tags(Map.ofEntries(Map.entry("env", "prod"))))) + .id(UUID.fromString("11111111-1111-4111-8111-111111111111")) + .type(AiGatewayCaptureUpdateRequestDataType.DATA_CAPTURE_OVERRIDES)); + + try { + AiGatewayCaptureOverrideResponse result = + apiInstance.updateAiGatewayDataCaptureOverride( + UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayDataCaptureOverride"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayGovernance.java b/examples/v2/ai-gateway/UpdateAiGatewayGovernance.java new file mode 100644 index 00000000000..02df083db2c --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayGovernance.java @@ -0,0 +1,50 @@ +// Replace AI Gateway governance controls returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayDataCaptureMode; +import com.datadog.api.client.v2.model.AiGatewayGovernanceReplaceAttributes; +import com.datadog.api.client.v2.model.AiGatewayGovernanceReplaceData; +import com.datadog.api.client.v2.model.AiGatewayGovernanceReplaceRequest; +import com.datadog.api.client.v2.model.AiGatewayGovernanceResponse; +import com.datadog.api.client.v2.model.AiGatewayGovernanceType; +import com.datadog.api.client.v2.model.AiGatewayMetadataCaptureItem; +import com.datadog.api.client.v2.model.AiGatewayZDRMode; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayGovernance", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayGovernanceReplaceRequest body = + new AiGatewayGovernanceReplaceRequest() + .data( + new AiGatewayGovernanceReplaceData() + .attributes( + new AiGatewayGovernanceReplaceAttributes() + .dataCaptureMode(AiGatewayDataCaptureMode.METADATA_ONLY) + .metadataCapture( + Arrays.asList( + AiGatewayMetadataCaptureItem.TOOL_USAGE, + AiGatewayMetadataCaptureItem.TOOL_OUTPUT_SIZE, + AiGatewayMetadataCaptureItem.TOOL_NAMES)) + .zdrMode(AiGatewayZDRMode.OFF)) + .id("organization") + .type(AiGatewayGovernanceType.GOVERNANCE)); + + try { + AiGatewayGovernanceResponse result = apiInstance.updateAiGatewayGovernance(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayGovernance"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayModel.java b/examples/v2/ai-gateway/UpdateAiGatewayModel.java new file mode 100644 index 00000000000..2555f3a9641 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayModel.java @@ -0,0 +1,46 @@ +// Update a model for an AI Gateway provider returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryType; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateData; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewaySupportedOperation; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayModel", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelUpdateRequest body = + new AiGatewayModelUpdateRequest() + .data( + new AiGatewayModelUpdateData() + .attributes( + new AiGatewayModelUpdateAttributes() + .modelIdWire("gpt-5.2-codex-20260801") + .supportedOperations( + Collections.singletonList( + AiGatewaySupportedOperation.OPENAI_CHAT_COMPLETIONS))) + .id("101") + .type(AiGatewayModelCatalogEntryType.MODEL_CATALOG_ENTRIES)); + + try { + AiGatewayModelCatalogEntryResponse result = + apiInstance.updateAiGatewayModel(42L, "gpt-5.2-codex", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayModel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayModelGroup.java b/examples/v2/ai-gateway/UpdateAiGatewayModelGroup.java new file mode 100644 index 00000000000..1671153f5de --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayModelGroup.java @@ -0,0 +1,46 @@ +// Update an AI Gateway model group returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelGroupResponse; +import com.datadog.api.client.v2.model.AiGatewayModelGroupType; +import com.datadog.api.client.v2.model.AiGatewayModelGroupUpdateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelGroupUpdateData; +import com.datadog.api.client.v2.model.AiGatewayModelGroupUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayNullableMaxReasoningLevel; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayModelGroup", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelGroupUpdateRequest body = + new AiGatewayModelGroupUpdateRequest() + .data( + new AiGatewayModelGroupUpdateData() + .attributes( + new AiGatewayModelGroupUpdateAttributes() + .allowFastMode(true) + .maxReasoningLevel(AiGatewayNullableMaxReasoningLevel.HIGH) + .modelIds(Collections.singletonList(101L)) + .name("Coding models") + .routingRuleSlugs(Collections.singletonList("coding-route"))) + .id("7") + .type(AiGatewayModelGroupType.MODEL_GROUPS)); + + try { + AiGatewayModelGroupResponse result = apiInstance.updateAiGatewayModelGroup("7", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayModelGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayModelPricing.java b/examples/v2/ai-gateway/UpdateAiGatewayModelPricing.java new file mode 100644 index 00000000000..0065dfca5a5 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayModelPricing.java @@ -0,0 +1,55 @@ +// Set a model pricing override returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelPricingCustomRequestConfig; +import com.datadog.api.client.v2.model.AiGatewayModelPricingCustomRequestSource; +import com.datadog.api.client.v2.model.AiGatewayModelPricingCustomRequestSourceType; +import com.datadog.api.client.v2.model.AiGatewayModelPricingRequest; +import com.datadog.api.client.v2.model.AiGatewayModelPricingRequestAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelPricingRequestConfig; +import com.datadog.api.client.v2.model.AiGatewayModelPricingRequestData; +import com.datadog.api.client.v2.model.AiGatewayModelPricingRequiredRates; +import com.datadog.api.client.v2.model.AiGatewayModelPricingResponse; +import com.datadog.api.client.v2.model.AiGatewayModelPricingType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayModelPricing", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelPricingRequest body = + new AiGatewayModelPricingRequest() + .data( + new AiGatewayModelPricingRequestData() + .attributes( + new AiGatewayModelPricingRequestAttributes() + .pricingConfig( + new AiGatewayModelPricingRequestConfig( + new AiGatewayModelPricingCustomRequestConfig() + .rates(new AiGatewayModelPricingRequiredRates()) + .source( + new AiGatewayModelPricingCustomRequestSource() + .type( + AiGatewayModelPricingCustomRequestSourceType + .CUSTOM)) + .version(1L)))) + .id("gpt-4o") + .type(AiGatewayModelPricingType.MODEL_PRICING)); + + try { + AiGatewayModelPricingResponse result = + apiInstance.updateAiGatewayModelPricing(42L, "gpt-5.2-codex", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayModelPricing"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayProvider.java b/examples/v2/ai-gateway/UpdateAiGatewayProvider.java new file mode 100644 index 00000000000..72a0bb62e22 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayProvider.java @@ -0,0 +1,41 @@ +// Update an AI Gateway provider returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayProviderResponse; +import com.datadog.api.client.v2.model.AiGatewayProviderType; +import com.datadog.api.client.v2.model.AiGatewayProviderUpdateAttributes; +import com.datadog.api.client.v2.model.AiGatewayProviderUpdateData; +import com.datadog.api.client.v2.model.AiGatewayProviderUpdateRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayProvider", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayProviderUpdateRequest body = + new AiGatewayProviderUpdateRequest() + .data( + new AiGatewayProviderUpdateData() + .attributes( + new AiGatewayProviderUpdateAttributes() + .costMultiplier(1.0) + .name("production-us-v2")) + .id("42") + .type(AiGatewayProviderType.PROVIDERS)); + + try { + AiGatewayProviderResponse result = apiInstance.updateAiGatewayProvider(42L, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayRateLimit.java b/examples/v2/ai-gateway/UpdateAiGatewayRateLimit.java new file mode 100644 index 00000000000..db72d5f6d66 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayRateLimit.java @@ -0,0 +1,50 @@ +// Update an AI Gateway rate limit returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayRateLimitMode; +import com.datadog.api.client.v2.model.AiGatewayRateLimitResponse; +import com.datadog.api.client.v2.model.AiGatewayRateLimitType; +import com.datadog.api.client.v2.model.AiGatewayRateLimitUpdateAttributes; +import com.datadog.api.client.v2.model.AiGatewayRateLimitUpdateData; +import com.datadog.api.client.v2.model.AiGatewayRateLimitUpdateRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayRateLimit", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayRateLimitUpdateRequest body = + new AiGatewayRateLimitUpdateRequest() + .data( + new AiGatewayRateLimitUpdateData() + .attributes( + new AiGatewayRateLimitUpdateAttributes() + .inputTokensPerMinute(null) + .mode(AiGatewayRateLimitMode.ALERT) + .outputTokensPerMinute(null) + .requestsPerMinute(null) + .tags(null) + .teamId(null) + .userId(null)) + .id(UUID.fromString("11111111-1111-1111-1111-111111111111")) + .type(AiGatewayRateLimitType.RATE_LIMITS)); + + try { + AiGatewayRateLimitResponse result = + apiInstance.updateAiGatewayRateLimit( + UUID.fromString("33333333-3333-3333-3333-333333333333"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayRateLimit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAiGatewayRoutingRule.java b/examples/v2/ai-gateway/UpdateAiGatewayRoutingRule.java new file mode 100644 index 00000000000..e77c85d4681 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAiGatewayRoutingRule.java @@ -0,0 +1,62 @@ +// Replace an AI Gateway routing rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayNullableRoutingRuleTierOrdering; +import com.datadog.api.client.v2.model.AiGatewayRoutingReasoningLevel; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleReplaceAttributes; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleReplaceData; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleReplaceRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleResponse; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleTargetRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleTargetType; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleTierRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAiGatewayRoutingRule", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayRoutingRuleReplaceRequest body = + new AiGatewayRoutingRuleReplaceRequest() + .data( + new AiGatewayRoutingRuleReplaceData() + .attributes( + new AiGatewayRoutingRuleReplaceAttributes() + .tiers( + Collections.singletonList( + new AiGatewayRoutingRuleTierRequest() + .ordering( + AiGatewayNullableRoutingRuleTierOrdering.CONFIGURED) + .targets( + Collections.singletonList( + new AiGatewayRoutingRuleTargetRequest() + .id(901L) + .model("gpt-5.2-codex") + .modelId(101L) + .provider("prod-us") + .reasoningLevel( + AiGatewayRoutingReasoningLevel.MEDIUM) + .slug("coding-fallback") + .type(AiGatewayRoutingRuleTargetType.MODEL) + .weight(70L)))))) + .id("coding") + .type(AiGatewayRoutingRuleType.ROUTING_RULES)); + + try { + AiGatewayRoutingRuleResponse result = apiInstance.updateAiGatewayRoutingRule("coding", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAiGatewayRoutingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpsertAiGatewayPolicy.java b/examples/v2/ai-gateway/UpsertAiGatewayPolicy.java new file mode 100644 index 00000000000..88f45cebfb9 --- /dev/null +++ b/examples/v2/ai-gateway/UpsertAiGatewayPolicy.java @@ -0,0 +1,53 @@ +// Create or replace an AI Gateway routing policy returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayPolicyRequest; +import com.datadog.api.client.v2.model.AiGatewayPolicyRequestAttributes; +import com.datadog.api.client.v2.model.AiGatewayPolicyRequestData; +import com.datadog.api.client.v2.model.AiGatewayPolicyResponse; +import com.datadog.api.client.v2.model.AiGatewayPolicyTargetRequest; +import com.datadog.api.client.v2.model.AiGatewayPolicyTierRequest; +import com.datadog.api.client.v2.model.AiGatewayPolicyType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.upsertAiGatewayPolicy", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayPolicyRequest body = + new AiGatewayPolicyRequest() + .data( + new AiGatewayPolicyRequestData() + .attributes( + new AiGatewayPolicyRequestAttributes() + .inbound("coding-agent") + .priority(1L) + .tiers( + Collections.singletonList( + new AiGatewayPolicyTierRequest() + .priority(1L) + .targets( + Collections.singletonList( + new AiGatewayPolicyTargetRequest() + .id(901L) + .model("gpt-5.2-codex") + .provider("prod-us")))))) + .type(AiGatewayPolicyType.ROUTING_DOCUMENTS)); + + try { + AiGatewayPolicyResponse result = apiInstance.upsertAiGatewayPolicy(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#upsertAiGatewayPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 6e7ea9d7611..d7613ee3a45 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1158,6 +1158,58 @@ public class ApiClient { put("v2.getOpenAPI", false); put("v2.listAPIs", false); put("v2.updateOpenAPI", false); + put("v2.bulkCreateAiGatewayModels", false); + put("v2.createAiGatewayBudget", false); + put("v2.createAiGatewayDataCaptureOverride", false); + put("v2.createAiGatewayModel", false); + put("v2.createAiGatewayModelGroup", false); + put("v2.createAiGatewayProvider", false); + put("v2.createAiGatewayRateLimit", false); + put("v2.createAiGatewayRoutingRule", false); + put("v2.deleteAiGatewayBudget", false); + put("v2.deleteAiGatewayDataCaptureOverride", false); + put("v2.deleteAiGatewayModel", false); + put("v2.deleteAiGatewayModelGroup", false); + put("v2.deleteAiGatewayModelPricing", false); + put("v2.deleteAiGatewayPolicy", false); + put("v2.deleteAiGatewayProvider", false); + put("v2.deleteAiGatewayRateLimit", false); + put("v2.deleteAiGatewayRoutingRule", false); + put("v2.getAiGatewayBudget", false); + put("v2.getAiGatewayBudgetCurrentPeriod", false); + put("v2.getAiGatewayBudgetInstancesSummary", false); + put("v2.getAiGatewayDataCaptureConfiguration", false); + put("v2.getAiGatewayGovernance", false); + put("v2.getAiGatewayModelGroup", false); + put("v2.getAiGatewayModelPricing", false); + put("v2.getAiGatewayPolicy", false); + put("v2.getAiGatewayProvider", false); + put("v2.getAiGatewayRateLimit", false); + put("v2.getAiGatewayRateLimitUsage", false); + put("v2.getAiGatewayRoutingRule", false); + put("v2.listAiGatewayBudgetInstanceDimensions", false); + put("v2.listAiGatewayBudgetInstances", false); + put("v2.listAiGatewayBudgets", false); + put("v2.listAiGatewayModelGroups", false); + put("v2.listAiGatewayModels", false); + put("v2.listAiGatewayModelsByCanonical", false); + put("v2.listAiGatewayPolicies", false); + put("v2.listAiGatewayProviderModels", false); + put("v2.listAiGatewayProviders", false); + put("v2.listAiGatewayRateLimits", false); + put("v2.listAiGatewayRoutingRules", false); + put("v2.overrideAiGatewayBudgetInstanceCapacity", false); + put("v2.resetAiGatewayBudgetInstanceSpend", false); + put("v2.updateAiGatewayBudget", false); + put("v2.updateAiGatewayDataCaptureOverride", false); + put("v2.updateAiGatewayGovernance", false); + put("v2.updateAiGatewayModel", false); + put("v2.updateAiGatewayModelGroup", false); + put("v2.updateAiGatewayModelPricing", false); + put("v2.updateAiGatewayProvider", false); + put("v2.updateAiGatewayRateLimit", false); + put("v2.updateAiGatewayRoutingRule", false); + put("v2.upsertAiGatewayPolicy", false); put("v2.createChangeRequest", false); put("v2.createChangeRequestBranch", false); put("v2.deleteChangeRequestDecision", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java b/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java new file mode 100644 index 00000000000..c92dd3c689c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java @@ -0,0 +1,9344 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.AiGatewayBudgetCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceCapacityOverrideRequest; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceDimensionListResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceListResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResetRequest; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstanceSort; +import com.datadog.api.client.v2.model.AiGatewayBudgetInstancesSummaryResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetListResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetPeriodResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetResponse; +import com.datadog.api.client.v2.model.AiGatewayBudgetUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayCaptureConfigurationResponse; +import com.datadog.api.client.v2.model.AiGatewayCaptureCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayCaptureDeleteRequest; +import com.datadog.api.client.v2.model.AiGatewayCaptureOverrideResponse; +import com.datadog.api.client.v2.model.AiGatewayCaptureUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayDiscoveredModelListResponse; +import com.datadog.api.client.v2.model.AiGatewayGovernanceReplaceRequest; +import com.datadog.api.client.v2.model.AiGatewayGovernanceResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryListResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayModelGroupCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayModelGroupListResponse; +import com.datadog.api.client.v2.model.AiGatewayModelGroupResponse; +import com.datadog.api.client.v2.model.AiGatewayModelGroupUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayModelPricingRequest; +import com.datadog.api.client.v2.model.AiGatewayModelPricingResponse; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayModelsBulkCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayModelsByCanonicalListResponse; +import com.datadog.api.client.v2.model.AiGatewayPolicyListResponse; +import com.datadog.api.client.v2.model.AiGatewayPolicyRequest; +import com.datadog.api.client.v2.model.AiGatewayPolicyResponse; +import com.datadog.api.client.v2.model.AiGatewayProviderCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayProviderListResponse; +import com.datadog.api.client.v2.model.AiGatewayProviderResponse; +import com.datadog.api.client.v2.model.AiGatewayProviderUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayRateLimitCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayRateLimitListResponse; +import com.datadog.api.client.v2.model.AiGatewayRateLimitResponse; +import com.datadog.api.client.v2.model.AiGatewayRateLimitUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewayRateLimitUsageListResponse; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleCreateRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleListResponse; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleReplaceRequest; +import com.datadog.api.client.v2.model.AiGatewayRoutingRuleResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayApi { + private ApiClient apiClient; + + public AiGatewayApi() { + this(ApiClient.getDefaultApiClient()); + } + + public AiGatewayApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Add multiple models to an AI Gateway provider. + * + *

See {@link #bulkCreateAiGatewayModelsWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return AiGatewayModelCatalogEntryListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelCatalogEntryListResponse bulkCreateAiGatewayModels( + Long providerId, AiGatewayModelsBulkCreateRequest body) throws ApiException { + return bulkCreateAiGatewayModelsWithHttpInfo(providerId, body).getData(); + } + + /** + * Add multiple models to an AI Gateway provider. + * + *

See {@link #bulkCreateAiGatewayModelsWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayModelCatalogEntryListResponse> + */ + public CompletableFuture bulkCreateAiGatewayModelsAsync( + Long providerId, AiGatewayModelsBulkCreateRequest body) { + return bulkCreateAiGatewayModelsWithHttpInfoAsync(providerId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Requires ai_gateway_config_write and provider Edit. Models and pricing inherit + * provider access. Add multiple manually managed model catalog entries to a provider in a single + * request. Manually managed entries are not modified by automatic catalog synchronization. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayModelCatalogEntryListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse bulkCreateAiGatewayModelsWithHttpInfo( + Long providerId, AiGatewayModelsBulkCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "bulkCreateAiGatewayModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'providerId' when calling bulkCreateAiGatewayModels"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling bulkCreateAiGatewayModels"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/bulk" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.bulkCreateAiGatewayModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Add multiple models to an AI Gateway provider. + * + *

See {@link #bulkCreateAiGatewayModelsWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelCatalogEntryListResponse>> + */ + public CompletableFuture> + bulkCreateAiGatewayModelsWithHttpInfoAsync( + Long providerId, AiGatewayModelsBulkCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "bulkCreateAiGatewayModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " bulkCreateAiGatewayModels")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling bulkCreateAiGatewayModels")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/bulk" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.bulkCreateAiGatewayModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway budget. + * + *

See {@link #createAiGatewayBudgetWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayBudgetResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetResponse createAiGatewayBudget(AiGatewayBudgetCreateRequest body) + throws ApiException { + return createAiGatewayBudgetWithHttpInfo(body).getData(); + } + + /** + * Create an AI Gateway budget. + * + *

See {@link #createAiGatewayBudgetWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayBudgetResponse> + */ + public CompletableFuture createAiGatewayBudgetAsync( + AiGatewayBudgetCreateRequest body) { + return createAiGatewayBudgetWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a spend budget. Scope tags may include provider, model, and custom dimensions. Reserved + * metadata keys are rejected. + * + * @param body (required) + * @return ApiResponse<AiGatewayBudgetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createAiGatewayBudgetWithHttpInfo( + AiGatewayBudgetCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayBudget"); + } + // create path and map variables + String localVarPath = "/api/v2/budgets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway budget. + * + *

See {@link #createAiGatewayBudgetWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayBudgetResponse>> + */ + public CompletableFuture> + createAiGatewayBudgetWithHttpInfoAsync(AiGatewayBudgetCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayBudget")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/budgets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway data capture override. + * + *

See {@link #createAiGatewayDataCaptureOverrideWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayCaptureOverrideResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayCaptureOverrideResponse createAiGatewayDataCaptureOverride( + AiGatewayCaptureCreateRequest body) throws ApiException { + return createAiGatewayDataCaptureOverrideWithHttpInfo(body).getData(); + } + + /** + * Create an AI Gateway data capture override. + * + *

See {@link #createAiGatewayDataCaptureOverrideWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayCaptureOverrideResponse> + */ + public CompletableFuture + createAiGatewayDataCaptureOverrideAsync(AiGatewayCaptureCreateRequest body) { + return createAiGatewayDataCaptureOverrideWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a scoped override with a client-generated UUID and the current + * configuration_revision. If the override can enable full capture for more traffic, set + * confirm_full_capture to true. Returns HTTP 409 when + * configuration_revision is stale, the UUID already exists, or the organization has 100 + * overrides. Missing configuration_revision or required full-capture confirmation + * returns HTTP 400. Retrying an accepted create with the same UUID returns HTTP 409. To undo a + * create, read the current configuration revision and delete the override using its returned + * override revision. + * + * @param body (required) + * @return ApiResponse<AiGatewayCaptureOverrideResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse + createAiGatewayDataCaptureOverrideWithHttpInfo(AiGatewayCaptureCreateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayDataCaptureOverride"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createAiGatewayDataCaptureOverride"); + } + // create path and map variables + String localVarPath = "/api/v2/data-capture/overrides"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayDataCaptureOverride", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway data capture override. + * + *

See {@link #createAiGatewayDataCaptureOverrideWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayCaptureOverrideResponse>> + */ + public CompletableFuture> + createAiGatewayDataCaptureOverrideWithHttpInfoAsync(AiGatewayCaptureCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayDataCaptureOverride"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " createAiGatewayDataCaptureOverride")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/data-capture/overrides"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayDataCaptureOverride", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Add a model to an AI Gateway provider. + * + *

See {@link #createAiGatewayModelWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return AiGatewayModelCatalogEntryResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelCatalogEntryResponse createAiGatewayModel( + Long providerId, AiGatewayModelCreateRequest body) throws ApiException { + return createAiGatewayModelWithHttpInfo(providerId, body).getData(); + } + + /** + * Add a model to an AI Gateway provider. + * + *

See {@link #createAiGatewayModelWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayModelCatalogEntryResponse> + */ + public CompletableFuture createAiGatewayModelAsync( + Long providerId, AiGatewayModelCreateRequest body) { + return createAiGatewayModelWithHttpInfoAsync(providerId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Requires ai_gateway_config_write and provider Edit. Models and pricing inherit + * provider access. Add a manually managed model catalog entry to a provider. Manually managed + * entries are not modified by automatic catalog synchronization. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayModelCatalogEntryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse createAiGatewayModelWithHttpInfo( + Long providerId, AiGatewayModelCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayModel"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'providerId' when calling createAiGatewayModel"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayModel"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayModel", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Add a model to an AI Gateway provider. + * + *

See {@link #createAiGatewayModelWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelCatalogEntryResponse>> + */ + public CompletableFuture> + createAiGatewayModelWithHttpInfoAsync(Long providerId, AiGatewayModelCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayModel"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling createAiGatewayModel")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayModel")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayModel", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway model group. + * + *

See {@link #createAiGatewayModelGroupWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayModelGroupResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelGroupResponse createAiGatewayModelGroup( + AiGatewayModelGroupCreateRequest body) throws ApiException { + return createAiGatewayModelGroupWithHttpInfo(body).getData(); + } + + /** + * Create an AI Gateway model group. + * + *

See {@link #createAiGatewayModelGroupWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayModelGroupResponse> + */ + public CompletableFuture createAiGatewayModelGroupAsync( + AiGatewayModelGroupCreateRequest body) { + return createAiGatewayModelGroupWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an AI Gateway model group from a name and any combination of model catalog entries and + * routing rules, with optional fast-mode and reasoning limits and initial access bindings. + * + * @param body (required) + * @return ApiResponse<AiGatewayModelGroupResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createAiGatewayModelGroupWithHttpInfo( + AiGatewayModelGroupCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayModelGroup"); + } + // create path and map variables + String localVarPath = "/api/v2/model-groups"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway model group. + * + *

See {@link #createAiGatewayModelGroupWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelGroupResponse>> + */ + public CompletableFuture> + createAiGatewayModelGroupWithHttpInfoAsync(AiGatewayModelGroupCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayModelGroup")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/model-groups"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway provider. + * + *

See {@link #createAiGatewayProviderWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayProviderResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayProviderResponse createAiGatewayProvider(AiGatewayProviderCreateRequest body) + throws ApiException { + return createAiGatewayProviderWithHttpInfo(body).getData(); + } + + /** + * Create an AI Gateway provider. + * + *

See {@link #createAiGatewayProviderWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayProviderResponse> + */ + public CompletableFuture createAiGatewayProviderAsync( + AiGatewayProviderCreateRequest body) { + return createAiGatewayProviderWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Creating a provider requires ai_gateway_config_write. No provider View check + * applies before creation. Create a provider and its initial model catalog. All discovered models + * are enabled; optional models are added as manually managed entries. The slug is the immutable + * routing identifier. Provider and initial catalog rows are saved in one transaction. Initial + * sharing is unavailable: supplying initial_bindings returns 503 with stage initial_permissions + * and outcome not_saved. A failed database commit can return 503 with stage database_commit and + * outcome unknown; check the provider list before retrying. Creation without initial_bindings + * keeps normal unrestricted defaults. + * + * @param body (required) + * @return ApiResponse<AiGatewayProviderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createAiGatewayProviderWithHttpInfo( + AiGatewayProviderCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayProvider"); + } + // create path and map variables + String localVarPath = "/api/v2/providers"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway provider. + * + *

See {@link #createAiGatewayProviderWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayProviderResponse>> + */ + public CompletableFuture> + createAiGatewayProviderWithHttpInfoAsync(AiGatewayProviderCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayProvider")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/providers"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway rate limit. + * + *

See {@link #createAiGatewayRateLimitWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayRateLimitResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRateLimitResponse createAiGatewayRateLimit(AiGatewayRateLimitCreateRequest body) + throws ApiException { + return createAiGatewayRateLimitWithHttpInfo(body).getData(); + } + + /** + * Create an AI Gateway rate limit. + * + *

See {@link #createAiGatewayRateLimitWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayRateLimitResponse> + */ + public CompletableFuture createAiGatewayRateLimitAsync( + AiGatewayRateLimitCreateRequest body) { + return createAiGatewayRateLimitWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a rate limit. All requests matching its scope share one allowance, and every matching + * rate limit applies. Returns 409 when another active rate limit has the same user, Team, and + * tags, or when the organization already has the maximum number of rate limits. + * + * @param body (required) + * @return ApiResponse<AiGatewayRateLimitResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createAiGatewayRateLimitWithHttpInfo( + AiGatewayRateLimitCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayRateLimit"); + } + // create path and map variables + String localVarPath = "/api/v2/rate-limits"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway rate limit. + * + *

See {@link #createAiGatewayRateLimitWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayRateLimitResponse>> + */ + public CompletableFuture> + createAiGatewayRateLimitWithHttpInfoAsync(AiGatewayRateLimitCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayRateLimit")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/rate-limits"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway routing rule. + * + *

See {@link #createAiGatewayRoutingRuleWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayRoutingRuleResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRoutingRuleResponse createAiGatewayRoutingRule( + AiGatewayRoutingRuleCreateRequest body) throws ApiException { + return createAiGatewayRoutingRuleWithHttpInfo(body).getData(); + } + + /** + * Create an AI Gateway routing rule. + * + *

See {@link #createAiGatewayRoutingRuleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayRoutingRuleResponse> + */ + public CompletableFuture createAiGatewayRoutingRuleAsync( + AiGatewayRoutingRuleCreateRequest body) { + return createAiGatewayRoutingRuleWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an organization-owned routing rule. Data capture overrides are managed independently. + * Each tier has an ordering, which defaults to configured. A weighted_affinity tier distributes + * first-choice assignments by relative target weights (1 to 10000, default 1) and accepts only + * distinct model targets with an explicit provider. Weights need not total 100. Configured tiers + * must omit weights or set them to null. + * + * @param body (required) + * @return ApiResponse<AiGatewayRoutingRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createAiGatewayRoutingRuleWithHttpInfo( + AiGatewayRoutingRuleCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAiGatewayRoutingRule"); + } + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayRoutingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an AI Gateway routing rule. + * + *

See {@link #createAiGatewayRoutingRuleWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayRoutingRuleResponse>> + */ + public CompletableFuture> + createAiGatewayRoutingRuleWithHttpInfoAsync(AiGatewayRoutingRuleCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling createAiGatewayRoutingRule")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.createAiGatewayRoutingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Archive an AI Gateway budget. + * + *

See {@link #deleteAiGatewayBudgetWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayBudget(UUID id) throws ApiException { + deleteAiGatewayBudgetWithHttpInfo(id); + } + + /** + * Archive an AI Gateway budget. + * + *

See {@link #deleteAiGatewayBudgetWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayBudgetAsync(UUID id) { + return deleteAiGatewayBudgetWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Archive a spend budget by ID while retaining its accounting history. + * + * @param id Budget UUID. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayBudgetWithHttpInfo(UUID id) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayBudget"); + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Archive an AI Gateway budget. + * + *

See {@link #deleteAiGatewayBudgetWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayBudgetWithHttpInfoAsync(UUID id) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayBudget")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway data capture override. + * + *

See {@link #deleteAiGatewayDataCaptureOverrideWithHttpInfo}. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayDataCaptureOverride(UUID id, AiGatewayCaptureDeleteRequest body) + throws ApiException { + deleteAiGatewayDataCaptureOverrideWithHttpInfo(id, body); + } + + /** + * Delete an AI Gateway data capture override. + * + *

See {@link #deleteAiGatewayDataCaptureOverrideWithHttpInfoAsync}. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayDataCaptureOverrideAsync( + UUID id, AiGatewayCaptureDeleteRequest body) { + return deleteAiGatewayDataCaptureOverrideWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an override using its revision and the current configuration_revision + * . If deleting the override can enable full capture for affected traffic, set + * confirm_full_capture to true. Returns HTTP 409 when + * configuration_revision or the override revision is stale, including a + * concurrent change during deletion. Missing revisions or required full-capture confirmation + * returns HTTP 400. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayDataCaptureOverrideWithHttpInfo( + UUID id, AiGatewayCaptureDeleteRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayDataCaptureOverride"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling deleteAiGatewayDataCaptureOverride"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling deleteAiGatewayDataCaptureOverride"); + } + // create path and map variables + String localVarPath = + "/api/v2/data-capture/overrides/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayDataCaptureOverride", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway data capture override. + * + *

See {@link #deleteAiGatewayDataCaptureOverrideWithHttpInfo}. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayDataCaptureOverrideWithHttpInfoAsync( + UUID id, AiGatewayCaptureDeleteRequest body) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayDataCaptureOverride"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " deleteAiGatewayDataCaptureOverride")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " deleteAiGatewayDataCaptureOverride")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/data-capture/overrides/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayDataCaptureOverride", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a model from an AI Gateway provider. + * + *

See {@link #deleteAiGatewayModelWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayModel(Long providerId, String canonical) throws ApiException { + deleteAiGatewayModelWithHttpInfo(providerId, canonical); + } + + /** + * Delete a model from an AI Gateway provider. + * + *

See {@link #deleteAiGatewayModelWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayModelAsync(Long providerId, String canonical) { + return deleteAiGatewayModelWithHttpInfoAsync(providerId, canonical) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Requires ai_gateway_config_write and provider Edit. Models and pricing inherit + * provider access. Delete a manually managed model catalog entry by its canonical model ID. + * Discovered entries are read-only. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayModelWithHttpInfo(Long providerId, String canonical) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayModel"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'providerId' when calling deleteAiGatewayModel"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, "Missing the required parameter 'canonical' when calling deleteAiGatewayModel"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayModel", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a model from an AI Gateway provider. + * + *

See {@link #deleteAiGatewayModelWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayModelWithHttpInfoAsync( + Long providerId, String canonical) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayModel"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling deleteAiGatewayModel")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'canonical' when calling deleteAiGatewayModel")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayModel", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway model group. + * + *

See {@link #deleteAiGatewayModelGroupWithHttpInfo}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayModelGroup(String id) throws ApiException { + deleteAiGatewayModelGroupWithHttpInfo(id); + } + + /** + * Delete an AI Gateway model group. + * + *

See {@link #deleteAiGatewayModelGroupWithHttpInfoAsync}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayModelGroupAsync(String id) { + return deleteAiGatewayModelGroupWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a named model group. The organization-wide policy cannot be deleted. Requires + * configuration write permission and edit access to the group. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayModelGroupWithHttpInfo(String id) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayModelGroup"); + } + // create path and map variables + String localVarPath = + "/api/v2/model-groups/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway model group. + * + *

See {@link #deleteAiGatewayModelGroupWithHttpInfo}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayModelGroupWithHttpInfoAsync( + String id) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayModelGroup")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/model-groups/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a model pricing override. + * + *

See {@link #deleteAiGatewayModelPricingWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayModelPricing(Long providerId, String canonical) throws ApiException { + deleteAiGatewayModelPricingWithHttpInfo(providerId, canonical); + } + + /** + * Delete a model pricing override. + * + *

See {@link #deleteAiGatewayModelPricingWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayModelPricingAsync( + Long providerId, String canonical) { + return deleteAiGatewayModelPricingWithHttpInfoAsync(providerId, canonical) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Clear a custom provider model's pricing override. Requires ai_gateway_config_write + * and provider Edit. Models and pricing inherit provider access. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayModelPricingWithHttpInfo( + Long providerId, String canonical) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayModelPricing"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'providerId' when calling deleteAiGatewayModelPricing"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, + "Missing the required parameter 'canonical' when calling deleteAiGatewayModelPricing"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}/pricing" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayModelPricing", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a model pricing override. + * + *

See {@link #deleteAiGatewayModelPricingWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayModelPricingWithHttpInfoAsync( + Long providerId, String canonical) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayModelPricing"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " deleteAiGatewayModelPricing")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'canonical' when calling" + + " deleteAiGatewayModelPricing")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}/pricing" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayModelPricing", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** Manage optional parameters to deleteAiGatewayPolicy. */ + public static class DeleteAiGatewayPolicyOptionalParameters { + private UUID userId; + + /** + * Set userId. + * + * @param userId Filter or scope policies to a specific user. Omit for organization-wide + * policies. (optional) + * @return DeleteAiGatewayPolicyOptionalParameters + */ + public DeleteAiGatewayPolicyOptionalParameters userId(UUID userId) { + this.userId = userId; + return this; + } + } + + /** + * Delete an AI Gateway routing policy. + * + *

See {@link #deleteAiGatewayPolicyWithHttpInfo}. + * + * @param inbound Inbound routing pattern. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayPolicy(String inbound) throws ApiException { + deleteAiGatewayPolicyWithHttpInfo(inbound, new DeleteAiGatewayPolicyOptionalParameters()); + } + + /** + * Delete an AI Gateway routing policy. + * + *

See {@link #deleteAiGatewayPolicyWithHttpInfoAsync}. + * + * @param inbound Inbound routing pattern. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayPolicyAsync(String inbound) { + return deleteAiGatewayPolicyWithHttpInfoAsync( + inbound, new DeleteAiGatewayPolicyOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an AI Gateway routing policy. + * + *

See {@link #deleteAiGatewayPolicyWithHttpInfo}. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayPolicy( + String inbound, DeleteAiGatewayPolicyOptionalParameters parameters) throws ApiException { + deleteAiGatewayPolicyWithHttpInfo(inbound, parameters); + } + + /** + * Delete an AI Gateway routing policy. + * + *

See {@link #deleteAiGatewayPolicyWithHttpInfoAsync}. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayPolicyAsync( + String inbound, DeleteAiGatewayPolicyOptionalParameters parameters) { + return deleteAiGatewayPolicyWithHttpInfoAsync(inbound, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete the routing policy document for a specific inbound pattern. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayPolicyWithHttpInfo( + String inbound, DeleteAiGatewayPolicyOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayPolicy"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'inbound' is set + if (inbound == null) { + throw new ApiException( + 400, "Missing the required parameter 'inbound' when calling deleteAiGatewayPolicy"); + } + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = + "/api/v2/policies/{inbound}" + .replaceAll("\\{" + "inbound" + "\\}", apiClient.escapeString(inbound.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway routing policy. + * + *

See {@link #deleteAiGatewayPolicyWithHttpInfo}. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayPolicyWithHttpInfoAsync( + String inbound, DeleteAiGatewayPolicyOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayPolicy"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'inbound' is set + if (inbound == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'inbound' when calling deleteAiGatewayPolicy")); + return result; + } + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = + "/api/v2/policies/{inbound}" + .replaceAll("\\{" + "inbound" + "\\}", apiClient.escapeString(inbound.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** Manage optional parameters to deleteAiGatewayProvider. */ + public static class DeleteAiGatewayProviderOptionalParameters { + private Boolean force; + + /** + * Set force. + * + * @param force Apply the routing rule changes returned by provider_in_use. Defaults to false. + * (optional, default to false) + * @return DeleteAiGatewayProviderOptionalParameters + */ + public DeleteAiGatewayProviderOptionalParameters force(Boolean force) { + this.force = force; + return this; + } + } + + /** + * Delete an AI Gateway provider. + * + *

See {@link #deleteAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayProvider(Long id) throws ApiException { + deleteAiGatewayProviderWithHttpInfo(id, new DeleteAiGatewayProviderOptionalParameters()); + } + + /** + * Delete an AI Gateway provider. + * + *

See {@link #deleteAiGatewayProviderWithHttpInfoAsync}. + * + * @param id Provider ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayProviderAsync(Long id) { + return deleteAiGatewayProviderWithHttpInfoAsync( + id, new DeleteAiGatewayProviderOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an AI Gateway provider. + * + *

See {@link #deleteAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayProvider(Long id, DeleteAiGatewayProviderOptionalParameters parameters) + throws ApiException { + deleteAiGatewayProviderWithHttpInfo(id, parameters); + } + + /** + * Delete an AI Gateway provider. + * + *

See {@link #deleteAiGatewayProviderWithHttpInfoAsync}. + * + * @param id Provider ID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayProviderAsync( + Long id, DeleteAiGatewayProviderOptionalParameters parameters) { + return deleteAiGatewayProviderWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Requires ai_gateway_config_write and provider Edit. Models and pricing inherit + * provider access. This also applies when force=true. Existing cascades remain and can affect + * policies the caller cannot edit. Delete a provider by ID. Providers used by routing rules + * return provider_in_use with HTTP 409 and the affected rules in error metadata. Retry with + * force=true to remove provider targets and delete rules left without targets. Surviving tiers + * keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown + * ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is + * replaced or deleted. + * + * @param id Provider ID. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayProviderWithHttpInfo( + Long id, DeleteAiGatewayProviderOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayProvider"); + } + Boolean force = parameters.force; + // create path and map variables + String localVarPath = + "/api/v2/providers/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayProvider", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway provider. + * + *

See {@link #deleteAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayProviderWithHttpInfoAsync( + Long id, DeleteAiGatewayProviderOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayProvider")); + return result; + } + Boolean force = parameters.force; + // create path and map variables + String localVarPath = + "/api/v2/providers/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayProvider", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Archive an AI Gateway rate limit. + * + *

See {@link #deleteAiGatewayRateLimitWithHttpInfo}. + * + * @param id Rate limit UUID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayRateLimit(UUID id) throws ApiException { + deleteAiGatewayRateLimitWithHttpInfo(id); + } + + /** + * Archive an AI Gateway rate limit. + * + *

See {@link #deleteAiGatewayRateLimitWithHttpInfoAsync}. + * + * @param id Rate limit UUID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayRateLimitAsync(UUID id) { + return deleteAiGatewayRateLimitWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Archive a rate limit by ID. An archived rate limit no longer appears in lists or lookups, and + * its alert monitor is deleted. + * + * @param id Rate limit UUID. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayRateLimitWithHttpInfo(UUID id) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayRateLimit"); + } + // create path and map variables + String localVarPath = + "/api/v2/rate-limits/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Archive an AI Gateway rate limit. + * + *

See {@link #deleteAiGatewayRateLimitWithHttpInfo}. + * + * @param id Rate limit UUID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayRateLimitWithHttpInfoAsync(UUID id) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling deleteAiGatewayRateLimit")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rate-limits/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** Manage optional parameters to deleteAiGatewayRoutingRule. */ + public static class DeleteAiGatewayRoutingRuleOptionalParameters { + private Boolean force; + + /** + * Set force. + * + * @param force Delete referencing tiers and recursively delete parent rules left without tiers. + * (optional, default to false) + * @return DeleteAiGatewayRoutingRuleOptionalParameters + */ + public DeleteAiGatewayRoutingRuleOptionalParameters force(Boolean force) { + this.force = force; + return this; + } + } + + /** + * Delete an AI Gateway routing rule. + * + *

See {@link #deleteAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayRoutingRule(String slug) throws ApiException { + deleteAiGatewayRoutingRuleWithHttpInfo( + slug, new DeleteAiGatewayRoutingRuleOptionalParameters()); + } + + /** + * Delete an AI Gateway routing rule. + * + *

See {@link #deleteAiGatewayRoutingRuleWithHttpInfoAsync}. + * + * @param slug Organization-unique routing rule slug. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayRoutingRuleAsync(String slug) { + return deleteAiGatewayRoutingRuleWithHttpInfoAsync( + slug, new DeleteAiGatewayRoutingRuleOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an AI Gateway routing rule. + * + *

See {@link #deleteAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void deleteAiGatewayRoutingRule( + String slug, DeleteAiGatewayRoutingRuleOptionalParameters parameters) throws ApiException { + deleteAiGatewayRoutingRuleWithHttpInfo(slug, parameters); + } + + /** + * Delete an AI Gateway routing rule. + * + *

See {@link #deleteAiGatewayRoutingRuleWithHttpInfoAsync}. + * + * @param slug Organization-unique routing rule slug. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFuture deleteAiGatewayRoutingRuleAsync( + String slug, DeleteAiGatewayRoutingRuleOptionalParameters parameters) { + return deleteAiGatewayRoutingRuleWithHttpInfoAsync(slug, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a routing rule. Referenced rules require force=true. Surviving tiers keep their ordering + * and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue + * fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or + * deleted. + * + * @param slug Organization-unique routing rule slug. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse deleteAiGatewayRoutingRuleWithHttpInfo( + String slug, DeleteAiGatewayRoutingRuleOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'slug' is set + if (slug == null) { + throw new ApiException( + 400, "Missing the required parameter 'slug' when calling deleteAiGatewayRoutingRule"); + } + Boolean force = parameters.force; + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "slug", slug)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayRoutingRule", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an AI Gateway routing rule. + * + *

See {@link #deleteAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAiGatewayRoutingRuleWithHttpInfoAsync( + String slug, DeleteAiGatewayRoutingRuleOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "deleteAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'slug' is set + if (slug == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'slug' when calling deleteAiGatewayRoutingRule")); + return result; + } + Boolean force = parameters.force; + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "slug", slug)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAiGatewayRoutingRule", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get an AI Gateway budget. + * + *

See {@link #getAiGatewayBudgetWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return AiGatewayBudgetResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetResponse getAiGatewayBudget(UUID id) throws ApiException { + return getAiGatewayBudgetWithHttpInfo(id).getData(); + } + + /** + * Get an AI Gateway budget. + * + *

See {@link #getAiGatewayBudgetWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<AiGatewayBudgetResponse> + */ + public CompletableFuture getAiGatewayBudgetAsync(UUID id) { + return getAiGatewayBudgetWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a spend budget by ID, including its capacity, scope, reset window, warning threshold, and + * enforcement mode. + * + * @param id Budget UUID. (required) + * @return ApiResponse<AiGatewayBudgetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayBudgetWithHttpInfo(UUID id) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayBudget"); + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway budget. + * + *

See {@link #getAiGatewayBudgetWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<ApiResponse<AiGatewayBudgetResponse>> + */ + public CompletableFuture> + getAiGatewayBudgetWithHttpInfoAsync(UUID id) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayBudget")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway budget's current period. + * + *

See {@link #getAiGatewayBudgetCurrentPeriodWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return AiGatewayBudgetPeriodResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetPeriodResponse getAiGatewayBudgetCurrentPeriod(UUID id) + throws ApiException { + return getAiGatewayBudgetCurrentPeriodWithHttpInfo(id).getData(); + } + + /** + * Get an AI Gateway budget's current period. + * + *

See {@link #getAiGatewayBudgetCurrentPeriodWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<AiGatewayBudgetPeriodResponse> + */ + public CompletableFuture getAiGatewayBudgetCurrentPeriodAsync( + UUID id) { + return getAiGatewayBudgetCurrentPeriodWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the active accounting window, enforced capacity, and current spend. + * + * @param id Budget UUID. (required) + * @return ApiResponse<AiGatewayBudgetPeriodResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayBudgetCurrentPeriodWithHttpInfo( + UUID id) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayBudgetCurrentPeriod"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayBudgetCurrentPeriod"); + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/current-period" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayBudgetCurrentPeriod", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway budget's current period. + * + *

See {@link #getAiGatewayBudgetCurrentPeriodWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<ApiResponse<AiGatewayBudgetPeriodResponse>> + */ + public CompletableFuture> + getAiGatewayBudgetCurrentPeriodWithHttpInfoAsync(UUID id) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayBudgetCurrentPeriod"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling getAiGatewayBudgetCurrentPeriod")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/current-period" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayBudgetCurrentPeriod", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getAiGatewayBudgetInstancesSummary. */ + public static class GetAiGatewayBudgetInstancesSummaryOptionalParameters { + private OffsetDateTime window; + private List splitDim; + + /** + * Set window. + * + * @param window RFC3339 timestamp inside the desired accounting window. Omit to use the current + * window. (optional) + * @return GetAiGatewayBudgetInstancesSummaryOptionalParameters + */ + public GetAiGatewayBudgetInstancesSummaryOptionalParameters window(OffsetDateTime window) { + this.window = window; + return this; + } + + /** + * Set splitDim. + * + * @param splitDim Keep only instance counters whose split dimension equals a value, written as + * <dim>=<value>, such as + * split_dim=user_id=<uuid>&split_dim=tag:env=prod. Dimensions use the + * split_dims names user_id, team_id, model + * , provider, and tag:<key>. Repeat the parameter to + * filter on several dimensions; a counter must match all of them. Each dimension may appear + * once and must be a per-value dimension of the budget. (optional) + * @return GetAiGatewayBudgetInstancesSummaryOptionalParameters + */ + public GetAiGatewayBudgetInstancesSummaryOptionalParameters splitDim(List splitDim) { + this.splitDim = splitDim; + return this; + } + } + + /** + * Get an AI Gateway budget instance summary. + * + *

See {@link #getAiGatewayBudgetInstancesSummaryWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return AiGatewayBudgetInstancesSummaryResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstancesSummaryResponse getAiGatewayBudgetInstancesSummary(UUID id) + throws ApiException { + return getAiGatewayBudgetInstancesSummaryWithHttpInfo( + id, new GetAiGatewayBudgetInstancesSummaryOptionalParameters()) + .getData(); + } + + /** + * Get an AI Gateway budget instance summary. + * + *

See {@link #getAiGatewayBudgetInstancesSummaryWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<AiGatewayBudgetInstancesSummaryResponse> + */ + public CompletableFuture + getAiGatewayBudgetInstancesSummaryAsync(UUID id) { + return getAiGatewayBudgetInstancesSummaryWithHttpInfoAsync( + id, new GetAiGatewayBudgetInstancesSummaryOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an AI Gateway budget instance summary. + * + *

See {@link #getAiGatewayBudgetInstancesSummaryWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return AiGatewayBudgetInstancesSummaryResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstancesSummaryResponse getAiGatewayBudgetInstancesSummary( + UUID id, GetAiGatewayBudgetInstancesSummaryOptionalParameters parameters) + throws ApiException { + return getAiGatewayBudgetInstancesSummaryWithHttpInfo(id, parameters).getData(); + } + + /** + * Get an AI Gateway budget instance summary. + * + *

See {@link #getAiGatewayBudgetInstancesSummaryWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayBudgetInstancesSummaryResponse> + */ + public CompletableFuture + getAiGatewayBudgetInstancesSummaryAsync( + UUID id, GetAiGatewayBudgetInstancesSummaryOptionalParameters parameters) { + return getAiGatewayBudgetInstancesSummaryWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Aggregate counters for an accounting window, including total spend and the numbers of instances + * at or above the warning threshold and capacity. Use split_dim to aggregate only counters that + * match every given dimension value. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayBudgetInstancesSummaryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + getAiGatewayBudgetInstancesSummaryWithHttpInfo( + UUID id, GetAiGatewayBudgetInstancesSummaryOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayBudgetInstancesSummary"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling getAiGatewayBudgetInstancesSummary"); + } + OffsetDateTime window = parameters.window; + List splitDim = parameters.splitDim; + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/summary" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window", window)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "split_dim", splitDim)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayBudgetInstancesSummary", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway budget instance summary. + * + *

See {@link #getAiGatewayBudgetInstancesSummaryWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AiGatewayBudgetInstancesSummaryResponse>> + */ + public CompletableFuture> + getAiGatewayBudgetInstancesSummaryWithHttpInfoAsync( + UUID id, GetAiGatewayBudgetInstancesSummaryOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayBudgetInstancesSummary"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " getAiGatewayBudgetInstancesSummary")); + return result; + } + OffsetDateTime window = parameters.window; + List splitDim = parameters.splitDim; + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/summary" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window", window)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "split_dim", splitDim)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayBudgetInstancesSummary", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get the AI Gateway data capture configuration. + * + *

See {@link #getAiGatewayDataCaptureConfigurationWithHttpInfo}. + * + * @return AiGatewayCaptureConfigurationResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayCaptureConfigurationResponse getAiGatewayDataCaptureConfiguration() + throws ApiException { + return getAiGatewayDataCaptureConfigurationWithHttpInfo().getData(); + } + + /** + * Get the AI Gateway data capture configuration. + * + *

See {@link #getAiGatewayDataCaptureConfigurationWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayCaptureConfigurationResponse> + */ + public CompletableFuture + getAiGatewayDataCaptureConfigurationAsync() { + return getAiGatewayDataCaptureConfigurationWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the organization default mode, scoped capture overrides, and configuration revision. + * + * @return ApiResponse<AiGatewayCaptureConfigurationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse + getAiGatewayDataCaptureConfigurationWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayDataCaptureConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/data-capture/configuration"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayDataCaptureConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get the AI Gateway data capture configuration. + * + *

See {@link #getAiGatewayDataCaptureConfigurationWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayCaptureConfigurationResponse>> + */ + public CompletableFuture> + getAiGatewayDataCaptureConfigurationWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getAiGatewayDataCaptureConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/data-capture/configuration"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayDataCaptureConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get AI Gateway governance controls. + * + *

See {@link #getAiGatewayGovernanceWithHttpInfo}. + * + * @return AiGatewayGovernanceResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayGovernanceResponse getAiGatewayGovernance() throws ApiException { + return getAiGatewayGovernanceWithHttpInfo().getData(); + } + + /** + * Get AI Gateway governance controls. + * + *

See {@link #getAiGatewayGovernanceWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayGovernanceResponse> + */ + public CompletableFuture getAiGatewayGovernanceAsync() { + return getAiGatewayGovernanceWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the organization-wide AI Gateway governance settings, which are the default data capture + * mode and whether requests must reach providers covered by a zero data retention agreement. + * + * @return ApiResponse<AiGatewayGovernanceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayGovernanceWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayGovernance"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/governance"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayGovernance", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get AI Gateway governance controls. + * + *

See {@link #getAiGatewayGovernanceWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayGovernanceResponse>> + */ + public CompletableFuture> + getAiGatewayGovernanceWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getAiGatewayGovernance"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/governance"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayGovernance", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway model group. + * + *

See {@link #getAiGatewayModelGroupWithHttpInfo}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return AiGatewayModelGroupResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelGroupResponse getAiGatewayModelGroup(String id) throws ApiException { + return getAiGatewayModelGroupWithHttpInfo(id).getData(); + } + + /** + * Get an AI Gateway model group. + * + *

See {@link #getAiGatewayModelGroupWithHttpInfoAsync}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return CompletableFuture<AiGatewayModelGroupResponse> + */ + public CompletableFuture getAiGatewayModelGroupAsync(String id) { + return getAiGatewayModelGroupWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a named policy or the explicit organization-wide policy by id "default". Requires + * configuration read permission; named policies also require view access. Provider selections + * cover current and future models and are returned separately from individual model selections. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return ApiResponse<AiGatewayModelGroupResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayModelGroupWithHttpInfo(String id) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayModelGroup"); + } + // create path and map variables + String localVarPath = + "/api/v2/model-groups/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway model group. + * + *

See {@link #getAiGatewayModelGroupWithHttpInfo}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelGroupResponse>> + */ + public CompletableFuture> + getAiGatewayModelGroupWithHttpInfoAsync(String id) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayModelGroup")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/model-groups/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a model pricing override. + * + *

See {@link #getAiGatewayModelPricingWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return AiGatewayModelPricingResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelPricingResponse getAiGatewayModelPricing(Long providerId, String canonical) + throws ApiException { + return getAiGatewayModelPricingWithHttpInfo(providerId, canonical).getData(); + } + + /** + * Get a model pricing override. + * + *

See {@link #getAiGatewayModelPricingWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return CompletableFuture<AiGatewayModelPricingResponse> + */ + public CompletableFuture getAiGatewayModelPricingAsync( + Long providerId, String canonical) { + return getAiGatewayModelPricingWithHttpInfoAsync(providerId, canonical) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a custom provider model's pricing override and effective pricing source. Requires + * ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider + * access. Lists omit hidden entries; direct reads of hidden resources return 404. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return ApiResponse<AiGatewayModelPricingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayModelPricingWithHttpInfo( + Long providerId, String canonical) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayModelPricing"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'providerId' when calling getAiGatewayModelPricing"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, "Missing the required parameter 'canonical' when calling getAiGatewayModelPricing"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}/pricing" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayModelPricing", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a model pricing override. + * + *

See {@link #getAiGatewayModelPricingWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelPricingResponse>> + */ + public CompletableFuture> + getAiGatewayModelPricingWithHttpInfoAsync(Long providerId, String canonical) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayModelPricing"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling getAiGatewayModelPricing")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'canonical' when calling getAiGatewayModelPricing")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}/pricing" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayModelPricing", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getAiGatewayPolicy. */ + public static class GetAiGatewayPolicyOptionalParameters { + private UUID userId; + + /** + * Set userId. + * + * @param userId Filter or scope policies to a specific user. Omit for organization-wide + * policies. (optional) + * @return GetAiGatewayPolicyOptionalParameters + */ + public GetAiGatewayPolicyOptionalParameters userId(UUID userId) { + this.userId = userId; + return this; + } + } + + /** + * Get an AI Gateway routing policy. + * + *

See {@link #getAiGatewayPolicyWithHttpInfo}. + * + * @param inbound Inbound routing pattern. (required) + * @return AiGatewayPolicyResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayPolicyResponse getAiGatewayPolicy(String inbound) throws ApiException { + return getAiGatewayPolicyWithHttpInfo(inbound, new GetAiGatewayPolicyOptionalParameters()) + .getData(); + } + + /** + * Get an AI Gateway routing policy. + * + *

See {@link #getAiGatewayPolicyWithHttpInfoAsync}. + * + * @param inbound Inbound routing pattern. (required) + * @return CompletableFuture<AiGatewayPolicyResponse> + */ + public CompletableFuture getAiGatewayPolicyAsync(String inbound) { + return getAiGatewayPolicyWithHttpInfoAsync(inbound, new GetAiGatewayPolicyOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an AI Gateway routing policy. + * + *

See {@link #getAiGatewayPolicyWithHttpInfo}. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return AiGatewayPolicyResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayPolicyResponse getAiGatewayPolicy( + String inbound, GetAiGatewayPolicyOptionalParameters parameters) throws ApiException { + return getAiGatewayPolicyWithHttpInfo(inbound, parameters).getData(); + } + + /** + * Get an AI Gateway routing policy. + * + *

See {@link #getAiGatewayPolicyWithHttpInfoAsync}. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayPolicyResponse> + */ + public CompletableFuture getAiGatewayPolicyAsync( + String inbound, GetAiGatewayPolicyOptionalParameters parameters) { + return getAiGatewayPolicyWithHttpInfoAsync(inbound, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the routing policy document for a specific inbound pattern. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayPolicyResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayPolicyWithHttpInfo( + String inbound, GetAiGatewayPolicyOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayPolicy"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'inbound' is set + if (inbound == null) { + throw new ApiException( + 400, "Missing the required parameter 'inbound' when calling getAiGatewayPolicy"); + } + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = + "/api/v2/policies/{inbound}" + .replaceAll("\\{" + "inbound" + "\\}", apiClient.escapeString(inbound.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway routing policy. + * + *

See {@link #getAiGatewayPolicyWithHttpInfo}. + * + * @param inbound Inbound routing pattern. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AiGatewayPolicyResponse>> + */ + public CompletableFuture> + getAiGatewayPolicyWithHttpInfoAsync( + String inbound, GetAiGatewayPolicyOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayPolicy"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'inbound' is set + if (inbound == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'inbound' when calling getAiGatewayPolicy")); + return result; + } + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = + "/api/v2/policies/{inbound}" + .replaceAll("\\{" + "inbound" + "\\}", apiClient.escapeString(inbound.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway provider. + * + *

See {@link #getAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @return AiGatewayProviderResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayProviderResponse getAiGatewayProvider(Long id) throws ApiException { + return getAiGatewayProviderWithHttpInfo(id).getData(); + } + + /** + * Get an AI Gateway provider. + * + *

See {@link #getAiGatewayProviderWithHttpInfoAsync}. + * + * @param id Provider ID. (required) + * @return CompletableFuture<AiGatewayProviderResponse> + */ + public CompletableFuture getAiGatewayProviderAsync(Long id) { + return getAiGatewayProviderWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a provider by ID, including its routing slug, integration account, and cost multiplier. + * Credentials stay in the integration account and are never returned. Requires + * ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider + * access. Lists omit hidden entries; direct reads of hidden resources return 404. + * + * @param id Provider ID. (required) + * @return ApiResponse<AiGatewayProviderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayProviderWithHttpInfo(Long id) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayProvider"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway provider. + * + *

See {@link #getAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @return CompletableFuture<ApiResponse<AiGatewayProviderResponse>> + */ + public CompletableFuture> + getAiGatewayProviderWithHttpInfoAsync(Long id) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayProvider")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway rate limit. + * + *

See {@link #getAiGatewayRateLimitWithHttpInfo}. + * + * @param id Rate limit UUID. (required) + * @return AiGatewayRateLimitResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRateLimitResponse getAiGatewayRateLimit(UUID id) throws ApiException { + return getAiGatewayRateLimitWithHttpInfo(id).getData(); + } + + /** + * Get an AI Gateway rate limit. + * + *

See {@link #getAiGatewayRateLimitWithHttpInfoAsync}. + * + * @param id Rate limit UUID. (required) + * @return CompletableFuture<AiGatewayRateLimitResponse> + */ + public CompletableFuture getAiGatewayRateLimitAsync(UUID id) { + return getAiGatewayRateLimitWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a rate limit by ID, including its scope, per-minute request and token limits, and whether + * it is enabled. + * + * @param id Rate limit UUID. (required) + * @return ApiResponse<AiGatewayRateLimitResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayRateLimitWithHttpInfo(UUID id) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayRateLimit"); + } + // create path and map variables + String localVarPath = + "/api/v2/rate-limits/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway rate limit. + * + *

See {@link #getAiGatewayRateLimitWithHttpInfo}. + * + * @param id Rate limit UUID. (required) + * @return CompletableFuture<ApiResponse<AiGatewayRateLimitResponse>> + */ + public CompletableFuture> + getAiGatewayRateLimitWithHttpInfoAsync(UUID id) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling getAiGatewayRateLimit")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rate-limits/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get AI Gateway rate limit usage. + * + *

See {@link #getAiGatewayRateLimitUsageWithHttpInfo}. + * + * @return AiGatewayRateLimitUsageListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRateLimitUsageListResponse getAiGatewayRateLimitUsage() throws ApiException { + return getAiGatewayRateLimitUsageWithHttpInfo().getData(); + } + + /** + * Get AI Gateway rate limit usage. + * + *

See {@link #getAiGatewayRateLimitUsageWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayRateLimitUsageListResponse> + */ + public CompletableFuture getAiGatewayRateLimitUsageAsync() { + return getAiGatewayRateLimitUsageWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get live usage for the organization's rate limits. Returns requests and tokens counted in the + * rolling one-minute window and requests limited in the last 15 minutes for each enabled rate + * limit, plus untracked (traffic no enforced rate limit covers) and total + * (all gateway traffic). + * + * @return ApiResponse<AiGatewayRateLimitUsageListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayRateLimitUsageWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayRateLimitUsage"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/rate-limits/usage"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayRateLimitUsage", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get AI Gateway rate limit usage. + * + *

See {@link #getAiGatewayRateLimitUsageWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayRateLimitUsageListResponse>> + */ + public CompletableFuture> + getAiGatewayRateLimitUsageWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getAiGatewayRateLimitUsage"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/rate-limits/usage"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayRateLimitUsage", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway routing rule. + * + *

See {@link #getAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @return AiGatewayRoutingRuleResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRoutingRuleResponse getAiGatewayRoutingRule(String slug) throws ApiException { + return getAiGatewayRoutingRuleWithHttpInfo(slug).getData(); + } + + /** + * Get an AI Gateway routing rule. + * + *

See {@link #getAiGatewayRoutingRuleWithHttpInfoAsync}. + * + * @param slug Organization-unique routing rule slug. (required) + * @return CompletableFuture<AiGatewayRoutingRuleResponse> + */ + public CompletableFuture getAiGatewayRoutingRuleAsync(String slug) { + return getAiGatewayRoutingRuleWithHttpInfoAsync(slug) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a routing rule by its organization-unique slug. + * + * @param slug Organization-unique routing rule slug. (required) + * @return ApiResponse<AiGatewayRoutingRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAiGatewayRoutingRuleWithHttpInfo(String slug) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'slug' is set + if (slug == null) { + throw new ApiException( + 400, "Missing the required parameter 'slug' when calling getAiGatewayRoutingRule"); + } + // create path and map variables + String localVarPath = "/api/v2/routing-rules/get"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "slug", slug)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayRoutingRule", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AI Gateway routing rule. + * + *

See {@link #getAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @return CompletableFuture<ApiResponse<AiGatewayRoutingRuleResponse>> + */ + public CompletableFuture> + getAiGatewayRoutingRuleWithHttpInfoAsync(String slug) { + // Check if unstable operation is enabled + String operationId = "getAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'slug' is set + if (slug == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'slug' when calling getAiGatewayRoutingRule")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/routing-rules/get"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "slug", slug)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.getAiGatewayRoutingRule", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listAiGatewayBudgetInstanceDimensions. */ + public static class ListAiGatewayBudgetInstanceDimensionsOptionalParameters { + private OffsetDateTime window; + private List splitDim; + private List dim; + private String query; + private List value; + private Long limit; + + /** + * Set window. + * + * @param window RFC3339 timestamp inside the desired accounting window. Omit to use the current + * window. (optional) + * @return ListAiGatewayBudgetInstanceDimensionsOptionalParameters + */ + public ListAiGatewayBudgetInstanceDimensionsOptionalParameters window(OffsetDateTime window) { + this.window = window; + return this; + } + + /** + * Set splitDim. + * + * @param splitDim Keep only instance counters whose split dimension equals a value, written as + * <dim>=<value>, such as + * split_dim=user_id=<uuid>&split_dim=tag:env=prod. Dimensions use the + * split_dims names user_id, team_id, model + * , provider, and tag:<key>. Repeat the parameter to + * filter on several dimensions; a counter must match all of them. Each dimension may appear + * once and must be a per-value dimension of the budget. (optional) + * @return ListAiGatewayBudgetInstanceDimensionsOptionalParameters + */ + public ListAiGatewayBudgetInstanceDimensionsOptionalParameters splitDim(List splitDim) { + this.splitDim = splitDim; + return this; + } + + /** + * Set dim. + * + * @param dim Return only these split dimensions, such as dim=user_id. Repeat the + * parameter for several dimensions. Omit it to return every split dimension of the budget. + * (optional) + * @return ListAiGatewayBudgetInstanceDimensionsOptionalParameters + */ + public ListAiGatewayBudgetInstanceDimensionsOptionalParameters dim(List dim) { + this.dim = dim; + return this; + } + + /** + * Set query. + * + * @param query Keep only values that contain this text, case-insensitively. It matches raw + * values, so User and Team values match their UUIDs; search their names elsewhere and pass + * the IDs as value. (optional) + * @return ListAiGatewayBudgetInstanceDimensionsOptionalParameters + */ + public ListAiGatewayBudgetInstanceDimensionsOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set value. + * + * @param value Keep only these values. Repeat the parameter to check several candidates, such + * as User IDs found by name, and learn which of them have instance counters. (optional) + * @return ListAiGatewayBudgetInstanceDimensionsOptionalParameters + */ + public ListAiGatewayBudgetInstanceDimensionsOptionalParameters value(List value) { + this.value = value; + return this; + } + + /** + * Set limit. + * + * @param limit Maximum number of values to return per dimension. (optional, default to 50) + * @return ListAiGatewayBudgetInstanceDimensionsOptionalParameters + */ + public ListAiGatewayBudgetInstanceDimensionsOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + } + + /** + * List AI Gateway budget instance dimension values. + * + *

See {@link #listAiGatewayBudgetInstanceDimensionsWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return AiGatewayBudgetInstanceDimensionListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstanceDimensionListResponse listAiGatewayBudgetInstanceDimensions(UUID id) + throws ApiException { + return listAiGatewayBudgetInstanceDimensionsWithHttpInfo( + id, new ListAiGatewayBudgetInstanceDimensionsOptionalParameters()) + .getData(); + } + + /** + * List AI Gateway budget instance dimension values. + * + *

See {@link #listAiGatewayBudgetInstanceDimensionsWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<AiGatewayBudgetInstanceDimensionListResponse> + */ + public CompletableFuture + listAiGatewayBudgetInstanceDimensionsAsync(UUID id) { + return listAiGatewayBudgetInstanceDimensionsWithHttpInfoAsync( + id, new ListAiGatewayBudgetInstanceDimensionsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List AI Gateway budget instance dimension values. + * + *

See {@link #listAiGatewayBudgetInstanceDimensionsWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return AiGatewayBudgetInstanceDimensionListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstanceDimensionListResponse listAiGatewayBudgetInstanceDimensions( + UUID id, ListAiGatewayBudgetInstanceDimensionsOptionalParameters parameters) + throws ApiException { + return listAiGatewayBudgetInstanceDimensionsWithHttpInfo(id, parameters).getData(); + } + + /** + * List AI Gateway budget instance dimension values. + * + *

See {@link #listAiGatewayBudgetInstanceDimensionsWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayBudgetInstanceDimensionListResponse> + */ + public CompletableFuture + listAiGatewayBudgetInstanceDimensionsAsync( + UUID id, ListAiGatewayBudgetInstanceDimensionsOptionalParameters parameters) { + return listAiGatewayBudgetInstanceDimensionsWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search the values that a template budget's split dimensions take across its instance counters + * in an accounting window. Each dimension returns its top values by spend, with counter counts. + * Use query or value to narrow results and limit to cap them. The truncated field reports whether + * more values matched. Each dimension's values are counted under the other dimensions' split_dim + * filters, so a dimension's own filter does not hide its alternatives. Legacy fixed-scope budgets + * return an empty list. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayBudgetInstanceDimensionListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + listAiGatewayBudgetInstanceDimensionsWithHttpInfo( + UUID id, ListAiGatewayBudgetInstanceDimensionsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayBudgetInstanceDimensions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling listAiGatewayBudgetInstanceDimensions"); + } + OffsetDateTime window = parameters.window; + List splitDim = parameters.splitDim; + List dim = parameters.dim; + String query = parameters.query; + List value = parameters.value; + Long limit = parameters.limit; + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/dimensions" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window", window)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "split_dim", splitDim)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "dim", dim)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "value", value)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayBudgetInstanceDimensions", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway budget instance dimension values. + * + *

See {@link #listAiGatewayBudgetInstanceDimensionsWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return + * CompletableFuture<ApiResponse<AiGatewayBudgetInstanceDimensionListResponse>> + */ + public CompletableFuture> + listAiGatewayBudgetInstanceDimensionsWithHttpInfoAsync( + UUID id, ListAiGatewayBudgetInstanceDimensionsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listAiGatewayBudgetInstanceDimensions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " listAiGatewayBudgetInstanceDimensions")); + return result; + } + OffsetDateTime window = parameters.window; + List splitDim = parameters.splitDim; + List dim = parameters.dim; + String query = parameters.query; + List value = parameters.value; + Long limit = parameters.limit; + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/dimensions" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window", window)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "split_dim", splitDim)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "dim", dim)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "value", value)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayBudgetInstanceDimensions", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listAiGatewayBudgetInstances. */ + public static class ListAiGatewayBudgetInstancesOptionalParameters { + private OffsetDateTime window; + private List splitDim; + private AiGatewayBudgetInstanceSort sort; + private Long limit; + private Long offset; + + /** + * Set window. + * + * @param window RFC3339 timestamp inside the desired accounting window. Omit to use the current + * window. (optional) + * @return ListAiGatewayBudgetInstancesOptionalParameters + */ + public ListAiGatewayBudgetInstancesOptionalParameters window(OffsetDateTime window) { + this.window = window; + return this; + } + + /** + * Set splitDim. + * + * @param splitDim Keep only instance counters whose split dimension equals a value, written as + * <dim>=<value>, such as + * split_dim=user_id=<uuid>&split_dim=tag:env=prod. Dimensions use the + * split_dims names user_id, team_id, model + * , provider, and tag:<key>. Repeat the parameter to + * filter on several dimensions; a counter must match all of them. Each dimension may appear + * once and must be a per-value dimension of the budget. (optional) + * @return ListAiGatewayBudgetInstancesOptionalParameters + */ + public ListAiGatewayBudgetInstancesOptionalParameters splitDim(List splitDim) { + this.splitDim = splitDim; + return this; + } + + /** + * Set sort. + * + * @param sort Sort order for budget instance counters. (optional, default to "spend_desc") + * @return ListAiGatewayBudgetInstancesOptionalParameters + */ + public ListAiGatewayBudgetInstancesOptionalParameters sort(AiGatewayBudgetInstanceSort sort) { + this.sort = sort; + return this; + } + + /** + * Set limit. + * + * @param limit Maximum number of budget instance counters to return. (optional, default to 50) + * @return ListAiGatewayBudgetInstancesOptionalParameters + */ + public ListAiGatewayBudgetInstancesOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set offset. + * + * @param offset Number of budget instance counters to skip. (optional, default to 0) + * @return ListAiGatewayBudgetInstancesOptionalParameters + */ + public ListAiGatewayBudgetInstancesOptionalParameters offset(Long offset) { + this.offset = offset; + return this; + } + } + + /** + * List AI Gateway budget instances. + * + *

See {@link #listAiGatewayBudgetInstancesWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @return AiGatewayBudgetInstanceListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstanceListResponse listAiGatewayBudgetInstances(UUID id) + throws ApiException { + return listAiGatewayBudgetInstancesWithHttpInfo( + id, new ListAiGatewayBudgetInstancesOptionalParameters()) + .getData(); + } + + /** + * List AI Gateway budget instances. + * + *

See {@link #listAiGatewayBudgetInstancesWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @return CompletableFuture<AiGatewayBudgetInstanceListResponse> + */ + public CompletableFuture listAiGatewayBudgetInstancesAsync( + UUID id) { + return listAiGatewayBudgetInstancesWithHttpInfoAsync( + id, new ListAiGatewayBudgetInstancesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List AI Gateway budget instances. + * + *

See {@link #listAiGatewayBudgetInstancesWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return AiGatewayBudgetInstanceListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstanceListResponse listAiGatewayBudgetInstances( + UUID id, ListAiGatewayBudgetInstancesOptionalParameters parameters) throws ApiException { + return listAiGatewayBudgetInstancesWithHttpInfo(id, parameters).getData(); + } + + /** + * List AI Gateway budget instances. + * + *

See {@link #listAiGatewayBudgetInstancesWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayBudgetInstanceListResponse> + */ + public CompletableFuture listAiGatewayBudgetInstancesAsync( + UUID id, ListAiGatewayBudgetInstancesOptionalParameters parameters) { + return listAiGatewayBudgetInstancesWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List instance counters for an accounting window. Legacy fixed-scope budgets return one pooled + * row with an empty instance_key. Omit window to use the current window. Use split_dim to keep + * only counters that match every given dimension value. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayBudgetInstanceListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayBudgetInstancesWithHttpInfo( + UUID id, ListAiGatewayBudgetInstancesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayBudgetInstances"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling listAiGatewayBudgetInstances"); + } + OffsetDateTime window = parameters.window; + List splitDim = parameters.splitDim; + AiGatewayBudgetInstanceSort sort = parameters.sort; + Long limit = parameters.limit; + Long offset = parameters.offset; + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window", window)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "split_dim", splitDim)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayBudgetInstances", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway budget instances. + * + *

See {@link #listAiGatewayBudgetInstancesWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AiGatewayBudgetInstanceListResponse>> + */ + public CompletableFuture> + listAiGatewayBudgetInstancesWithHttpInfoAsync( + UUID id, ListAiGatewayBudgetInstancesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listAiGatewayBudgetInstances"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling listAiGatewayBudgetInstances")); + return result; + } + OffsetDateTime window = parameters.window; + List splitDim = parameters.splitDim; + AiGatewayBudgetInstanceSort sort = parameters.sort; + Long limit = parameters.limit; + Long offset = parameters.offset; + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window", window)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "split_dim", splitDim)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayBudgetInstances", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway budgets. + * + *

See {@link #listAiGatewayBudgetsWithHttpInfo}. + * + * @return AiGatewayBudgetListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetListResponse listAiGatewayBudgets() throws ApiException { + return listAiGatewayBudgetsWithHttpInfo().getData(); + } + + /** + * List AI Gateway budgets. + * + *

See {@link #listAiGatewayBudgetsWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayBudgetListResponse> + */ + public CompletableFuture listAiGatewayBudgetsAsync() { + return listAiGatewayBudgetsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List spend budgets for the organization, including active-window spend and effective capacity. + * + * @return ApiResponse<AiGatewayBudgetListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayBudgetsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayBudgets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/budgets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayBudgets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway budgets. + * + *

See {@link #listAiGatewayBudgetsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayBudgetListResponse>> + */ + public CompletableFuture> + listAiGatewayBudgetsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listAiGatewayBudgets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/budgets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayBudgets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway model groups. + * + *

See {@link #listAiGatewayModelGroupsWithHttpInfo}. + * + * @return AiGatewayModelGroupListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelGroupListResponse listAiGatewayModelGroups() throws ApiException { + return listAiGatewayModelGroupsWithHttpInfo().getData(); + } + + /** + * List AI Gateway model groups. + * + *

See {@link #listAiGatewayModelGroupsWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayModelGroupListResponse> + */ + public CompletableFuture listAiGatewayModelGroupsAsync() { + return listAiGatewayModelGroupsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List model groups the user can view. The organization-wide policy has id "default" and explicit + * model, provider, and route selections. Missing or empty selections grant no organization-wide + * access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named + * policies retain their access bindings. Requires configuration read permission; named policies + * also require view access. + * + * @return ApiResponse<AiGatewayModelGroupListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayModelGroupsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayModelGroups"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/model-groups"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayModelGroups", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway model groups. + * + *

See {@link #listAiGatewayModelGroupsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayModelGroupListResponse>> + */ + public CompletableFuture> + listAiGatewayModelGroupsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listAiGatewayModelGroups"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/model-groups"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayModelGroups", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List models for an AI Gateway provider. + * + *

See {@link #listAiGatewayModelsWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @return AiGatewayModelCatalogEntryListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelCatalogEntryListResponse listAiGatewayModels(Long providerId) + throws ApiException { + return listAiGatewayModelsWithHttpInfo(providerId).getData(); + } + + /** + * List models for an AI Gateway provider. + * + *

See {@link #listAiGatewayModelsWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @return CompletableFuture<AiGatewayModelCatalogEntryListResponse> + */ + public CompletableFuture listAiGatewayModelsAsync( + Long providerId) { + return listAiGatewayModelsWithHttpInfoAsync(providerId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all model catalog entries for a provider. Requires ai_gateway_config_read and + * provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; + * direct reads of hidden resources return 404. + * + * @param providerId Provider ID. (required) + * @return ApiResponse<AiGatewayModelCatalogEntryListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayModelsWithHttpInfo( + Long providerId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'providerId' when calling listAiGatewayModels"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List models for an AI Gateway provider. + * + *

See {@link #listAiGatewayModelsWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelCatalogEntryListResponse>> + */ + public CompletableFuture> + listAiGatewayModelsWithHttpInfoAsync(Long providerId) { + // Check if unstable operation is enabled + String operationId = "listAiGatewayModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'providerId' when calling listAiGatewayModels")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway models by canonical ID. + * + *

See {@link #listAiGatewayModelsByCanonicalWithHttpInfo}. + * + * @return AiGatewayModelsByCanonicalListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelsByCanonicalListResponse listAiGatewayModelsByCanonical() + throws ApiException { + return listAiGatewayModelsByCanonicalWithHttpInfo().getData(); + } + + /** + * List AI Gateway models by canonical ID. + * + *

See {@link #listAiGatewayModelsByCanonicalWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayModelsByCanonicalListResponse> + */ + public CompletableFuture + listAiGatewayModelsByCanonicalAsync() { + return listAiGatewayModelsByCanonicalWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all model catalog entries grouped by canonical model ID. Requires + * ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider + * access. Lists omit hidden entries; direct reads of hidden resources return 404. + * + * @return ApiResponse<AiGatewayModelsByCanonicalListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse + listAiGatewayModelsByCanonicalWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayModelsByCanonical"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/models"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayModelsByCanonical", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway models by canonical ID. + * + *

See {@link #listAiGatewayModelsByCanonicalWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayModelsByCanonicalListResponse>> + */ + public CompletableFuture> + listAiGatewayModelsByCanonicalWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listAiGatewayModelsByCanonical"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/models"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayModelsByCanonical", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listAiGatewayPolicies. */ + public static class ListAiGatewayPoliciesOptionalParameters { + private UUID userId; + + /** + * Set userId. + * + * @param userId Filter or scope policies to a specific user. Omit for organization-wide + * policies. (optional) + * @return ListAiGatewayPoliciesOptionalParameters + */ + public ListAiGatewayPoliciesOptionalParameters userId(UUID userId) { + this.userId = userId; + return this; + } + } + + /** + * List AI Gateway routing policies. + * + *

See {@link #listAiGatewayPoliciesWithHttpInfo}. + * + * @return AiGatewayPolicyListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayPolicyListResponse listAiGatewayPolicies() throws ApiException { + return listAiGatewayPoliciesWithHttpInfo(new ListAiGatewayPoliciesOptionalParameters()) + .getData(); + } + + /** + * List AI Gateway routing policies. + * + *

See {@link #listAiGatewayPoliciesWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayPolicyListResponse> + */ + public CompletableFuture listAiGatewayPoliciesAsync() { + return listAiGatewayPoliciesWithHttpInfoAsync(new ListAiGatewayPoliciesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List AI Gateway routing policies. + * + *

See {@link #listAiGatewayPoliciesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return AiGatewayPolicyListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayPolicyListResponse listAiGatewayPolicies( + ListAiGatewayPoliciesOptionalParameters parameters) throws ApiException { + return listAiGatewayPoliciesWithHttpInfo(parameters).getData(); + } + + /** + * List AI Gateway routing policies. + * + *

See {@link #listAiGatewayPoliciesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayPolicyListResponse> + */ + public CompletableFuture listAiGatewayPoliciesAsync( + ListAiGatewayPoliciesOptionalParameters parameters) { + return listAiGatewayPoliciesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all routing policy documents for the organization. Pass user_id to filter by user scope. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayPolicyListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayPoliciesWithHttpInfo( + ListAiGatewayPoliciesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayPolicies"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = "/api/v2/policies"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayPolicies", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway routing policies. + * + *

See {@link #listAiGatewayPoliciesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AiGatewayPolicyListResponse>> + */ + public CompletableFuture> + listAiGatewayPoliciesWithHttpInfoAsync(ListAiGatewayPoliciesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listAiGatewayPolicies"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = "/api/v2/policies"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayPolicies", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listAiGatewayProviderModels. */ + public static class ListAiGatewayProviderModelsOptionalParameters { + private String projectId; + private String location; + private String bedrockRegion; + private String foundryResourceId; + + /** + * Set projectId. + * + * @param projectId GCP project ID used for Gemini model discovery. Required for Gemini + * integrations. (optional) + * @return ListAiGatewayProviderModelsOptionalParameters + */ + public ListAiGatewayProviderModelsOptionalParameters projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Set location. + * + * @param location Optional GCP location used for Gemini model discovery. Defaults to global. + * (optional) + * @return ListAiGatewayProviderModelsOptionalParameters + */ + public ListAiGatewayProviderModelsOptionalParameters location(String location) { + this.location = location; + return this; + } + + /** + * Set bedrockRegion. + * + * @param bedrockRegion AWS region used for Bedrock model discovery. Required for Amazon Bedrock + * integrations. (optional) + * @return ListAiGatewayProviderModelsOptionalParameters + */ + public ListAiGatewayProviderModelsOptionalParameters bedrockRegion(String bedrockRegion) { + this.bedrockRegion = bedrockRegion; + return this; + } + + /** + * Set foundryResourceId. + * + * @param foundryResourceId ARM resource ID of the Azure AI Foundry resource used for model + * discovery. Required for Azure AI Foundry integrations. (optional) + * @return ListAiGatewayProviderModelsOptionalParameters + */ + public ListAiGatewayProviderModelsOptionalParameters foundryResourceId( + String foundryResourceId) { + this.foundryResourceId = foundryResourceId; + return this; + } + } + + /** + * List models available from a provider integration. + * + *

See {@link #listAiGatewayProviderModelsWithHttpInfo}. + * + * @param integrationType Provider integration type. (required) + * @param integrationAccountId Provider integration account ID. (required) + * @return AiGatewayDiscoveredModelListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayDiscoveredModelListResponse listAiGatewayProviderModels( + String integrationType, String integrationAccountId) throws ApiException { + return listAiGatewayProviderModelsWithHttpInfo( + integrationType, + integrationAccountId, + new ListAiGatewayProviderModelsOptionalParameters()) + .getData(); + } + + /** + * List models available from a provider integration. + * + *

See {@link #listAiGatewayProviderModelsWithHttpInfoAsync}. + * + * @param integrationType Provider integration type. (required) + * @param integrationAccountId Provider integration account ID. (required) + * @return CompletableFuture<AiGatewayDiscoveredModelListResponse> + */ + public CompletableFuture listAiGatewayProviderModelsAsync( + String integrationType, String integrationAccountId) { + return listAiGatewayProviderModelsWithHttpInfoAsync( + integrationType, + integrationAccountId, + new ListAiGatewayProviderModelsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List models available from a provider integration. + * + *

See {@link #listAiGatewayProviderModelsWithHttpInfo}. + * + * @param integrationType Provider integration type. (required) + * @param integrationAccountId Provider integration account ID. (required) + * @param parameters Optional parameters for the request. + * @return AiGatewayDiscoveredModelListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayDiscoveredModelListResponse listAiGatewayProviderModels( + String integrationType, + String integrationAccountId, + ListAiGatewayProviderModelsOptionalParameters parameters) + throws ApiException { + return listAiGatewayProviderModelsWithHttpInfo( + integrationType, integrationAccountId, parameters) + .getData(); + } + + /** + * List models available from a provider integration. + * + *

See {@link #listAiGatewayProviderModelsWithHttpInfoAsync}. + * + * @param integrationType Provider integration type. (required) + * @param integrationAccountId Provider integration account ID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayDiscoveredModelListResponse> + */ + public CompletableFuture listAiGatewayProviderModelsAsync( + String integrationType, + String integrationAccountId, + ListAiGatewayProviderModelsOptionalParameters parameters) { + return listAiGatewayProviderModelsWithHttpInfoAsync( + integrationType, integrationAccountId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List live models available to a provider integration account that supports model discovery. + * + * @param integrationType Provider integration type. (required) + * @param integrationAccountId Provider integration account ID. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayDiscoveredModelListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayProviderModelsWithHttpInfo( + String integrationType, + String integrationAccountId, + ListAiGatewayProviderModelsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayProviderModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'integrationType' is set + if (integrationType == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integrationType' when calling" + + " listAiGatewayProviderModels"); + } + + // verify the required parameter 'integrationAccountId' is set + if (integrationAccountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integrationAccountId' when calling" + + " listAiGatewayProviderModels"); + } + String projectId = parameters.projectId; + String location = parameters.location; + String bedrockRegion = parameters.bedrockRegion; + String foundryResourceId = parameters.foundryResourceId; + // create path and map variables + String localVarPath = "/api/v2/provider-models"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "integration_type", integrationType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "integration_account_id", integrationAccountId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "project_id", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "location", location)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "bedrock_region", bedrockRegion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "foundry_resource_id", foundryResourceId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayProviderModels", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List models available from a provider integration. + * + *

See {@link #listAiGatewayProviderModelsWithHttpInfo}. + * + * @param integrationType Provider integration type. (required) + * @param integrationAccountId Provider integration account ID. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AiGatewayDiscoveredModelListResponse>> + */ + public CompletableFuture> + listAiGatewayProviderModelsWithHttpInfoAsync( + String integrationType, + String integrationAccountId, + ListAiGatewayProviderModelsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listAiGatewayProviderModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'integrationType' is set + if (integrationType == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integrationType' when calling" + + " listAiGatewayProviderModels")); + return result; + } + + // verify the required parameter 'integrationAccountId' is set + if (integrationAccountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integrationAccountId' when calling" + + " listAiGatewayProviderModels")); + return result; + } + String projectId = parameters.projectId; + String location = parameters.location; + String bedrockRegion = parameters.bedrockRegion; + String foundryResourceId = parameters.foundryResourceId; + // create path and map variables + String localVarPath = "/api/v2/provider-models"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "integration_type", integrationType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "integration_account_id", integrationAccountId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "project_id", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "location", location)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "bedrock_region", bedrockRegion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "foundry_resource_id", foundryResourceId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayProviderModels", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway providers. + * + *

See {@link #listAiGatewayProvidersWithHttpInfo}. + * + * @return AiGatewayProviderListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayProviderListResponse listAiGatewayProviders() throws ApiException { + return listAiGatewayProvidersWithHttpInfo().getData(); + } + + /** + * List AI Gateway providers. + * + *

See {@link #listAiGatewayProvidersWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayProviderListResponse> + */ + public CompletableFuture listAiGatewayProvidersAsync() { + return listAiGatewayProvidersWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the model providers connected to the organization. Credentials stay in each provider's + * integration account and are never returned. Requires ai_gateway_config_read and + * provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; + * direct reads of hidden resources return 404. + * + * @return ApiResponse<AiGatewayProviderListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayProvidersWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayProviders"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/providers"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayProviders", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway providers. + * + *

See {@link #listAiGatewayProvidersWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayProviderListResponse>> + */ + public CompletableFuture> + listAiGatewayProvidersWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listAiGatewayProviders"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/providers"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayProviders", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway rate limits. + * + *

See {@link #listAiGatewayRateLimitsWithHttpInfo}. + * + * @return AiGatewayRateLimitListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRateLimitListResponse listAiGatewayRateLimits() throws ApiException { + return listAiGatewayRateLimitsWithHttpInfo().getData(); + } + + /** + * List AI Gateway rate limits. + * + *

See {@link #listAiGatewayRateLimitsWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayRateLimitListResponse> + */ + public CompletableFuture listAiGatewayRateLimitsAsync() { + return listAiGatewayRateLimitsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the organization's AI Gateway rate limits. + * + * @return ApiResponse<AiGatewayRateLimitListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayRateLimitsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayRateLimits"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/rate-limits"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayRateLimits", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway rate limits. + * + *

See {@link #listAiGatewayRateLimitsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayRateLimitListResponse>> + */ + public CompletableFuture> + listAiGatewayRateLimitsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listAiGatewayRateLimits"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/rate-limits"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayRateLimits", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway routing rules. + * + *

See {@link #listAiGatewayRoutingRulesWithHttpInfo}. + * + * @return AiGatewayRoutingRuleListResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRoutingRuleListResponse listAiGatewayRoutingRules() throws ApiException { + return listAiGatewayRoutingRulesWithHttpInfo().getData(); + } + + /** + * List AI Gateway routing rules. + * + *

See {@link #listAiGatewayRoutingRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<AiGatewayRoutingRuleListResponse> + */ + public CompletableFuture listAiGatewayRoutingRulesAsync() { + return listAiGatewayRoutingRulesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all routing rules for the organization. + * + * @return ApiResponse<AiGatewayRoutingRuleListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listAiGatewayRoutingRulesWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listAiGatewayRoutingRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayRoutingRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List AI Gateway routing rules. + * + *

See {@link #listAiGatewayRoutingRulesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AiGatewayRoutingRuleListResponse>> + */ + public CompletableFuture> + listAiGatewayRoutingRulesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listAiGatewayRoutingRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.listAiGatewayRoutingRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Override a budget instance's capacity. + * + *

See {@link #overrideAiGatewayBudgetInstanceCapacityWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return AiGatewayBudgetInstanceResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstanceResponse overrideAiGatewayBudgetInstanceCapacity( + UUID id, AiGatewayBudgetInstanceCapacityOverrideRequest body) throws ApiException { + return overrideAiGatewayBudgetInstanceCapacityWithHttpInfo(id, body).getData(); + } + + /** + * Override a budget instance's capacity. + * + *

See {@link #overrideAiGatewayBudgetInstanceCapacityWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayBudgetInstanceResponse> + */ + public CompletableFuture + overrideAiGatewayBudgetInstanceCapacityAsync( + UUID id, AiGatewayBudgetInstanceCapacityOverrideRequest body) { + return overrideAiGatewayBudgetInstanceCapacityWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Override active-period capacity for one instance of a template budget, identified by its + * instance_key. Other instances and the budget's default capacity are unchanged. The override is + * retained in the budget adjustment audit history. Returns 404 when the instance has no counter + * in the active period. Not supported for legacy fixed-scope budgets. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayBudgetInstanceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + overrideAiGatewayBudgetInstanceCapacityWithHttpInfo( + UUID id, AiGatewayBudgetInstanceCapacityOverrideRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "overrideAiGatewayBudgetInstanceCapacity"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " overrideAiGatewayBudgetInstanceCapacity"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " overrideAiGatewayBudgetInstanceCapacity"); + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/capacity" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.overrideAiGatewayBudgetInstanceCapacity", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Override a budget instance's capacity. + * + *

See {@link #overrideAiGatewayBudgetInstanceCapacityWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayBudgetInstanceResponse>> + */ + public CompletableFuture> + overrideAiGatewayBudgetInstanceCapacityWithHttpInfoAsync( + UUID id, AiGatewayBudgetInstanceCapacityOverrideRequest body) { + // Check if unstable operation is enabled + String operationId = "overrideAiGatewayBudgetInstanceCapacity"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " overrideAiGatewayBudgetInstanceCapacity")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " overrideAiGatewayBudgetInstanceCapacity")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/capacity" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.overrideAiGatewayBudgetInstanceCapacity", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Reset a budget instance's spend. + * + *

See {@link #resetAiGatewayBudgetInstanceSpendWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return AiGatewayBudgetInstanceResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetInstanceResponse resetAiGatewayBudgetInstanceSpend( + UUID id, AiGatewayBudgetInstanceResetRequest body) throws ApiException { + return resetAiGatewayBudgetInstanceSpendWithHttpInfo(id, body).getData(); + } + + /** + * Reset a budget instance's spend. + * + *

See {@link #resetAiGatewayBudgetInstanceSpendWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayBudgetInstanceResponse> + */ + public CompletableFuture resetAiGatewayBudgetInstanceSpendAsync( + UUID id, AiGatewayBudgetInstanceResetRequest body) { + return resetAiGatewayBudgetInstanceSpendWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Reset active-period spend for one instance of a template budget, identified by its + * instance_key. The reset is retained in the budget adjustment audit history. Returns 404 when + * the instance has no counter in the active period. Not supported for legacy fixed-scope budgets. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayBudgetInstanceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse resetAiGatewayBudgetInstanceSpendWithHttpInfo( + UUID id, AiGatewayBudgetInstanceResetRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "resetAiGatewayBudgetInstanceSpend"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling resetAiGatewayBudgetInstanceSpend"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling resetAiGatewayBudgetInstanceSpend"); + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/reset" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.resetAiGatewayBudgetInstanceSpend", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Reset a budget instance's spend. + * + *

See {@link #resetAiGatewayBudgetInstanceSpendWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayBudgetInstanceResponse>> + */ + public CompletableFuture> + resetAiGatewayBudgetInstanceSpendWithHttpInfoAsync( + UUID id, AiGatewayBudgetInstanceResetRequest body) { + // Check if unstable operation is enabled + String operationId = "resetAiGatewayBudgetInstanceSpend"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " resetAiGatewayBudgetInstanceSpend")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " resetAiGatewayBudgetInstanceSpend")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}/instances/reset" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.resetAiGatewayBudgetInstanceSpend", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway budget. + * + *

See {@link #updateAiGatewayBudgetWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return AiGatewayBudgetResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayBudgetResponse updateAiGatewayBudget(UUID id, AiGatewayBudgetUpdateRequest body) + throws ApiException { + return updateAiGatewayBudgetWithHttpInfo(id, body).getData(); + } + + /** + * Update an AI Gateway budget. + * + *

See {@link #updateAiGatewayBudgetWithHttpInfoAsync}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayBudgetResponse> + */ + public CompletableFuture updateAiGatewayBudgetAsync( + UUID id, AiGatewayBudgetUpdateRequest body) { + return updateAiGatewayBudgetWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a budget's mutable definition. Capacity changes apply to future accounting periods + * unless apply_to_current_period is true. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayBudgetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayBudgetWithHttpInfo( + UUID id, AiGatewayBudgetUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayBudget"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayBudget"); + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway budget. + * + *

See {@link #updateAiGatewayBudgetWithHttpInfo}. + * + * @param id Budget UUID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayBudgetResponse>> + */ + public CompletableFuture> + updateAiGatewayBudgetWithHttpInfoAsync(UUID id, AiGatewayBudgetUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayBudget"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayBudget")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayBudget")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/budgets/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayBudget", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Replace an AI Gateway data capture override. + * + *

See {@link #updateAiGatewayDataCaptureOverrideWithHttpInfo}. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return AiGatewayCaptureOverrideResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayCaptureOverrideResponse updateAiGatewayDataCaptureOverride( + UUID id, AiGatewayCaptureUpdateRequest body) throws ApiException { + return updateAiGatewayDataCaptureOverrideWithHttpInfo(id, body).getData(); + } + + /** + * Replace an AI Gateway data capture override. + * + *

See {@link #updateAiGatewayDataCaptureOverrideWithHttpInfoAsync}. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayCaptureOverrideResponse> + */ + public CompletableFuture + updateAiGatewayDataCaptureOverrideAsync(UUID id, AiGatewayCaptureUpdateRequest body) { + return updateAiGatewayDataCaptureOverrideWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Replace an override using its revision and the current + * configuration_revision. Changes to capture overrides don't affect routing rules. Returns + * HTTP 409 when configuration_revision or the override revision is + * stale, including a concurrent change during replacement. Missing revisions or required + * full-capture confirmation returns HTTP 400. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayCaptureOverrideResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse + updateAiGatewayDataCaptureOverrideWithHttpInfo(UUID id, AiGatewayCaptureUpdateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayDataCaptureOverride"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling updateAiGatewayDataCaptureOverride"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling updateAiGatewayDataCaptureOverride"); + } + // create path and map variables + String localVarPath = + "/api/v2/data-capture/overrides/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayDataCaptureOverride", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Replace an AI Gateway data capture override. + * + *

See {@link #updateAiGatewayDataCaptureOverrideWithHttpInfo}. + * + * @param id Data capture override ID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayCaptureOverrideResponse>> + */ + public CompletableFuture> + updateAiGatewayDataCaptureOverrideWithHttpInfoAsync( + UUID id, AiGatewayCaptureUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayDataCaptureOverride"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " updateAiGatewayDataCaptureOverride")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateAiGatewayDataCaptureOverride")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/data-capture/overrides/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayDataCaptureOverride", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Replace AI Gateway governance controls. + * + *

See {@link #updateAiGatewayGovernanceWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayGovernanceResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayGovernanceResponse updateAiGatewayGovernance( + AiGatewayGovernanceReplaceRequest body) throws ApiException { + return updateAiGatewayGovernanceWithHttpInfo(body).getData(); + } + + /** + * Replace AI Gateway governance controls. + * + *

See {@link #updateAiGatewayGovernanceWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayGovernanceResponse> + */ + public CompletableFuture updateAiGatewayGovernanceAsync( + AiGatewayGovernanceReplaceRequest body) { + return updateAiGatewayGovernanceWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Replace the organization-wide AI Gateway governance settings, which are the default data + * capture mode and whether requests must reach providers covered by a zero data retention + * agreement. + * + * @param body (required) + * @return ApiResponse<AiGatewayGovernanceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayGovernanceWithHttpInfo( + AiGatewayGovernanceReplaceRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayGovernance"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayGovernance"); + } + // create path and map variables + String localVarPath = "/api/v2/governance"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayGovernance", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Replace AI Gateway governance controls. + * + *

See {@link #updateAiGatewayGovernanceWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayGovernanceResponse>> + */ + public CompletableFuture> + updateAiGatewayGovernanceWithHttpInfoAsync(AiGatewayGovernanceReplaceRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayGovernance"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayGovernance")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/governance"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayGovernance", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a model for an AI Gateway provider. + * + *

See {@link #updateAiGatewayModelWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return AiGatewayModelCatalogEntryResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelCatalogEntryResponse updateAiGatewayModel( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) throws ApiException { + return updateAiGatewayModelWithHttpInfo(providerId, canonical, body).getData(); + } + + /** + * Update a model for an AI Gateway provider. + * + *

See {@link #updateAiGatewayModelWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayModelCatalogEntryResponse> + */ + public CompletableFuture updateAiGatewayModelAsync( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) { + return updateAiGatewayModelWithHttpInfoAsync(providerId, canonical, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a manually managed model catalog entry. Discovered entries are read-only. Requires + * ai_gateway_config_write and provider Edit. Models and pricing inherit provider + * access. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return ApiResponse<AiGatewayModelCatalogEntryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayModelWithHttpInfo( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayModel"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'providerId' when calling updateAiGatewayModel"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, "Missing the required parameter 'canonical' when calling updateAiGatewayModel"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayModel"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayModel", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a model for an AI Gateway provider. + * + *

See {@link #updateAiGatewayModelWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelCatalogEntryResponse>> + */ + public CompletableFuture> + updateAiGatewayModelWithHttpInfoAsync( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayModel"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling updateAiGatewayModel")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'canonical' when calling updateAiGatewayModel")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayModel")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayModel", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway model group. + * + *

See {@link #updateAiGatewayModelGroupWithHttpInfo}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @param body (required) + * @return AiGatewayModelGroupResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelGroupResponse updateAiGatewayModelGroup( + String id, AiGatewayModelGroupUpdateRequest body) throws ApiException { + return updateAiGatewayModelGroupWithHttpInfo(id, body).getData(); + } + + /** + * Update an AI Gateway model group. + * + *

See {@link #updateAiGatewayModelGroupWithHttpInfoAsync}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @param body (required) + * @return CompletableFuture<AiGatewayModelGroupResponse> + */ + public CompletableFuture updateAiGatewayModelGroupAsync( + String id, AiGatewayModelGroupUpdateRequest body) { + return updateAiGatewayModelGroupWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a model group. For id "default", save membership and request options atomically with + * expected_revision. Empty selections grant no organization-wide access. Applicable authorized + * named policies override organization-wide request options; a rejected named-policy request + * cannot fall back to organization-wide options. The organization-wide audience is fixed and + * grants resource use only. Requires configuration write permission; named policies also require + * edit access. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @param body (required) + * @return ApiResponse<AiGatewayModelGroupResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayModelGroupWithHttpInfo( + String id, AiGatewayModelGroupUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayModelGroup"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayModelGroup"); + } + // create path and map variables + String localVarPath = + "/api/v2/model-groups/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway model group. + * + *

See {@link #updateAiGatewayModelGroupWithHttpInfo}. + * + * @param id Model group ID, or "default" for the explicit organization-wide access policy. + * (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelGroupResponse>> + */ + public CompletableFuture> + updateAiGatewayModelGroupWithHttpInfoAsync(String id, AiGatewayModelGroupUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayModelGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayModelGroup")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayModelGroup")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/model-groups/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayModelGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Set a model pricing override. + * + *

See {@link #updateAiGatewayModelPricingWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return AiGatewayModelPricingResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelPricingResponse updateAiGatewayModelPricing( + Long providerId, String canonical, AiGatewayModelPricingRequest body) throws ApiException { + return updateAiGatewayModelPricingWithHttpInfo(providerId, canonical, body).getData(); + } + + /** + * Set a model pricing override. + * + *

See {@link #updateAiGatewayModelPricingWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayModelPricingResponse> + */ + public CompletableFuture updateAiGatewayModelPricingAsync( + Long providerId, String canonical, AiGatewayModelPricingRequest body) { + return updateAiGatewayModelPricingWithHttpInfoAsync(providerId, canonical, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Set a custom provider model's pricing override. Requires ai_gateway_config_write + * and provider Edit. Models and pricing inherit provider access. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return ApiResponse<AiGatewayModelPricingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayModelPricingWithHttpInfo( + Long providerId, String canonical, AiGatewayModelPricingRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayModelPricing"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'providerId' when calling updateAiGatewayModelPricing"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, + "Missing the required parameter 'canonical' when calling updateAiGatewayModelPricing"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayModelPricing"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}/pricing" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayModelPricing", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Set a model pricing override. + * + *

See {@link #updateAiGatewayModelPricingWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelPricingResponse>> + */ + public CompletableFuture> + updateAiGatewayModelPricingWithHttpInfoAsync( + Long providerId, String canonical, AiGatewayModelPricingRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayModelPricing"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " updateAiGatewayModelPricing")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'canonical' when calling" + + " updateAiGatewayModelPricing")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateAiGatewayModelPricing")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/models/{canonical}/pricing" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())) + .replaceAll("\\{" + "canonical" + "\\}", apiClient.escapeString(canonical.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayModelPricing", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway provider. + * + *

See {@link #updateAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @param body (required) + * @return AiGatewayProviderResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayProviderResponse updateAiGatewayProvider( + Long id, AiGatewayProviderUpdateRequest body) throws ApiException { + return updateAiGatewayProviderWithHttpInfo(id, body).getData(); + } + + /** + * Update an AI Gateway provider. + * + *

See {@link #updateAiGatewayProviderWithHttpInfoAsync}. + * + * @param id Provider ID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayProviderResponse> + */ + public CompletableFuture updateAiGatewayProviderAsync( + Long id, AiGatewayProviderUpdateRequest body) { + return updateAiGatewayProviderWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a provider's display name or cost multiplier. Provider type, integration settings, and + * slug are immutable. Requires ai_gateway_config_write and provider Edit. Models and + * pricing inherit provider access. + * + * @param id Provider ID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayProviderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayProviderWithHttpInfo( + Long id, AiGatewayProviderUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayProvider"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayProvider"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway provider. + * + *

See {@link #updateAiGatewayProviderWithHttpInfo}. + * + * @param id Provider ID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayProviderResponse>> + */ + public CompletableFuture> + updateAiGatewayProviderWithHttpInfoAsync(Long id, AiGatewayProviderUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayProvider")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayProvider")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway rate limit. + * + *

See {@link #updateAiGatewayRateLimitWithHttpInfo}. + * + * @param id Rate limit UUID. (required) + * @param body (required) + * @return AiGatewayRateLimitResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRateLimitResponse updateAiGatewayRateLimit( + UUID id, AiGatewayRateLimitUpdateRequest body) throws ApiException { + return updateAiGatewayRateLimitWithHttpInfo(id, body).getData(); + } + + /** + * Update an AI Gateway rate limit. + * + *

See {@link #updateAiGatewayRateLimitWithHttpInfoAsync}. + * + * @param id Rate limit UUID. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayRateLimitResponse> + */ + public CompletableFuture updateAiGatewayRateLimitAsync( + UUID id, AiGatewayRateLimitUpdateRequest body) { + return updateAiGatewayRateLimitWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a rate limit. Only the attributes sent are changed. Scope stays editable, and changes + * never reset current usage. Returns 409 when the rule was changed concurrently or the new scope + * duplicates another rule. + * + * @param id Rate limit UUID. (required) + * @param body (required) + * @return ApiResponse<AiGatewayRateLimitResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayRateLimitWithHttpInfo( + UUID id, AiGatewayRateLimitUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayRateLimit"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayRateLimit"); + } + // create path and map variables + String localVarPath = + "/api/v2/rate-limits/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an AI Gateway rate limit. + * + *

See {@link #updateAiGatewayRateLimitWithHttpInfo}. + * + * @param id Rate limit UUID. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayRateLimitResponse>> + */ + public CompletableFuture> + updateAiGatewayRateLimitWithHttpInfoAsync(UUID id, AiGatewayRateLimitUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayRateLimit"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling updateAiGatewayRateLimit")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayRateLimit")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rate-limits/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayRateLimit", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Replace an AI Gateway routing rule. + * + *

See {@link #updateAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @param body (required) + * @return AiGatewayRoutingRuleResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayRoutingRuleResponse updateAiGatewayRoutingRule( + String slug, AiGatewayRoutingRuleReplaceRequest body) throws ApiException { + return updateAiGatewayRoutingRuleWithHttpInfo(slug, body).getData(); + } + + /** + * Replace an AI Gateway routing rule. + * + *

See {@link #updateAiGatewayRoutingRuleWithHttpInfoAsync}. + * + * @param slug Organization-unique routing rule slug. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayRoutingRuleResponse> + */ + public CompletableFuture updateAiGatewayRoutingRuleAsync( + String slug, AiGatewayRoutingRuleReplaceRequest body) { + return updateAiGatewayRoutingRuleWithHttpInfoAsync(slug, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Replace a routing rule's tiers. The slug is immutable; data capture is managed independently. + * This is a full replacement: omitted or null ordering resets the tier to configured, and omitted + * or null weights in a weighted_affinity tier reset to 1. Omitted or null reasoning_level clears + * a model destination's reasoning override. Replacing a rule repairs tiers reported with an + * ordering_issue. + * + * @param slug Organization-unique routing rule slug. (required) + * @param body (required) + * @return ApiResponse<AiGatewayRoutingRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse updateAiGatewayRoutingRuleWithHttpInfo( + String slug, AiGatewayRoutingRuleReplaceRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'slug' is set + if (slug == null) { + throw new ApiException( + 400, "Missing the required parameter 'slug' when calling updateAiGatewayRoutingRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateAiGatewayRoutingRule"); + } + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "slug", slug)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayRoutingRule", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Replace an AI Gateway routing rule. + * + *

See {@link #updateAiGatewayRoutingRuleWithHttpInfo}. + * + * @param slug Organization-unique routing rule slug. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayRoutingRuleResponse>> + */ + public CompletableFuture> + updateAiGatewayRoutingRuleWithHttpInfoAsync( + String slug, AiGatewayRoutingRuleReplaceRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAiGatewayRoutingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'slug' is set + if (slug == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'slug' when calling updateAiGatewayRoutingRule")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateAiGatewayRoutingRule")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/routing-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "slug", slug)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAiGatewayRoutingRule", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to upsertAiGatewayPolicy. */ + public static class UpsertAiGatewayPolicyOptionalParameters { + private UUID userId; + + /** + * Set userId. + * + * @param userId Filter or scope policies to a specific user. Omit for organization-wide + * policies. (optional) + * @return UpsertAiGatewayPolicyOptionalParameters + */ + public UpsertAiGatewayPolicyOptionalParameters userId(UUID userId) { + this.userId = userId; + return this; + } + } + + /** + * Create or replace an AI Gateway routing policy. + * + *

See {@link #upsertAiGatewayPolicyWithHttpInfo}. + * + * @param body (required) + * @return AiGatewayPolicyResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayPolicyResponse upsertAiGatewayPolicy(AiGatewayPolicyRequest body) + throws ApiException { + return upsertAiGatewayPolicyWithHttpInfo(body, new UpsertAiGatewayPolicyOptionalParameters()) + .getData(); + } + + /** + * Create or replace an AI Gateway routing policy. + * + *

See {@link #upsertAiGatewayPolicyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AiGatewayPolicyResponse> + */ + public CompletableFuture upsertAiGatewayPolicyAsync( + AiGatewayPolicyRequest body) { + return upsertAiGatewayPolicyWithHttpInfoAsync( + body, new UpsertAiGatewayPolicyOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create or replace an AI Gateway routing policy. + * + *

See {@link #upsertAiGatewayPolicyWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return AiGatewayPolicyResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayPolicyResponse upsertAiGatewayPolicy( + AiGatewayPolicyRequest body, UpsertAiGatewayPolicyOptionalParameters parameters) + throws ApiException { + return upsertAiGatewayPolicyWithHttpInfo(body, parameters).getData(); + } + + /** + * Create or replace an AI Gateway routing policy. + * + *

See {@link #upsertAiGatewayPolicyWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AiGatewayPolicyResponse> + */ + public CompletableFuture upsertAiGatewayPolicyAsync( + AiGatewayPolicyRequest body, UpsertAiGatewayPolicyOptionalParameters parameters) { + return upsertAiGatewayPolicyWithHttpInfoAsync(body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create or replace the routing policy document for an inbound pattern. Pass user_id to scope the + * policy to a user. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AiGatewayPolicyResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse upsertAiGatewayPolicyWithHttpInfo( + AiGatewayPolicyRequest body, UpsertAiGatewayPolicyOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "upsertAiGatewayPolicy"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling upsertAiGatewayPolicy"); + } + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = "/api/v2/policies"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.upsertAiGatewayPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create or replace an AI Gateway routing policy. + * + *

See {@link #upsertAiGatewayPolicyWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AiGatewayPolicyResponse>> + */ + public CompletableFuture> + upsertAiGatewayPolicyWithHttpInfoAsync( + AiGatewayPolicyRequest body, UpsertAiGatewayPolicyOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "upsertAiGatewayPolicy"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling upsertAiGatewayPolicy")); + return result; + } + UUID userId = parameters.userId; + // create path and map variables + String localVarPath = "/api/v2/policies"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_id", userId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.upsertAiGatewayPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetAttributes.java new file mode 100644 index 00000000000..4ede66bf0b6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetAttributes.java @@ -0,0 +1,605 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AI Gateway budget configuration and metadata. */ +@JsonPropertyOrder({ + AiGatewayBudgetAttributes.JSON_PROPERTY_CAPACITY_MICROCENTS, + AiGatewayBudgetAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayBudgetAttributes.JSON_PROPERTY_CREATED_BY, + AiGatewayBudgetAttributes.JSON_PROPERTY_ENABLED, + AiGatewayBudgetAttributes.JSON_PROPERTY_ENFORCEMENT, + AiGatewayBudgetAttributes.JSON_PROPERTY_MONITOR_ID, + AiGatewayBudgetAttributes.JSON_PROPERTY_NAME, + AiGatewayBudgetAttributes.JSON_PROPERTY_SCOPE_RESTRICTED, + AiGatewayBudgetAttributes.JSON_PROPERTY_SELECTOR, + AiGatewayBudgetAttributes.JSON_PROPERTY_TAGS, + AiGatewayBudgetAttributes.JSON_PROPERTY_TEAM_ID, + AiGatewayBudgetAttributes.JSON_PROPERTY_UPDATED_AT, + AiGatewayBudgetAttributes.JSON_PROPERTY_USER_ID, + AiGatewayBudgetAttributes.JSON_PROPERTY_WARNING_THRESHOLD, + AiGatewayBudgetAttributes.JSON_PROPERTY_WINDOW_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CAPACITY_MICROCENTS = "capacity_microcents"; + private Long capacityMicrocents; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ENFORCEMENT = "enforcement"; + private AiGatewayBudgetEnforcement enforcement; + + public static final String JSON_PROPERTY_MONITOR_ID = "monitor_id"; + private Long monitorId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SCOPE_RESTRICTED = "scope_restricted"; + private Boolean scopeRestricted; + + public static final String JSON_PROPERTY_SELECTOR = "selector"; + private JsonNullable> selector = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap(); + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private UUID teamId; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private UUID userId; + + public static final String JSON_PROPERTY_WARNING_THRESHOLD = "warning_threshold"; + private Double warningThreshold; + + public static final String JSON_PROPERTY_WINDOW_POLICY = "window_policy"; + private AiGatewayBudgetWindowPolicy windowPolicy; + + public AiGatewayBudgetAttributes() {} + + @JsonCreator + public AiGatewayBudgetAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CAPACITY_MICROCENTS) + Long capacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_ENFORCEMENT) + AiGatewayBudgetEnforcement enforcement, + @JsonProperty(required = true, value = JSON_PROPERTY_MONITOR_ID) Long monitorId, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE_RESTRICTED) + Boolean scopeRestricted, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) Map tags, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_WARNING_THRESHOLD) + Double warningThreshold, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_POLICY) + AiGatewayBudgetWindowPolicy windowPolicy) { + this.capacityMicrocents = capacityMicrocents; + this.createdAt = createdAt; + this.createdBy = createdBy; + this.enabled = enabled; + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + this.monitorId = monitorId; + if (monitorId != null) {} + this.name = name; + this.scopeRestricted = scopeRestricted; + this.tags = tags; + this.updatedAt = updatedAt; + this.warningThreshold = warningThreshold; + this.windowPolicy = windowPolicy; + this.unparsed |= !windowPolicy.isValid(); + } + + public AiGatewayBudgetAttributes capacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + return this; + } + + /** + * Budget capacity in microcents. + * + * @return capacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCapacityMicrocents() { + return capacityMicrocents; + } + + public void setCapacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + } + + public AiGatewayBudgetAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayBudgetAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Identifier of the principal that created the resource. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public AiGatewayBudgetAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the resource is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public AiGatewayBudgetAttributes enforcement(AiGatewayBudgetEnforcement enforcement) { + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + return this; + } + + /** + * Action taken when spend exceeds the budget. + * + * @return enforcement + */ + @JsonProperty(JSON_PROPERTY_ENFORCEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetEnforcement getEnforcement() { + return enforcement; + } + + public void setEnforcement(AiGatewayBudgetEnforcement enforcement) { + if (!enforcement.isValid()) { + this.unparsed = true; + } + this.enforcement = enforcement; + } + + public AiGatewayBudgetAttributes monitorId(Long monitorId) { + this.monitorId = monitorId; + if (monitorId != null) {} + return this; + } + + /** + * Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or + * failed. + * + * @return monitorId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getMonitorId() { + return monitorId; + } + + public void setMonitorId(Long monitorId) { + this.monitorId = monitorId; + } + + public AiGatewayBudgetAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayBudgetAttributes scopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + return this; + } + + /** + * Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an + * unrelated update to preserve their saved values. + * + * @return scopeRestricted + */ + @JsonProperty(JSON_PROPERTY_SCOPE_RESTRICTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getScopeRestricted() { + return scopeRestricted; + } + + public void setScopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + } + + public AiGatewayBudgetAttributes selector(List selector) { + this.selector = JsonNullable.>of(selector); + return this; + } + + public AiGatewayBudgetAttributes addSelectorItem(AiGatewayBudgetSelectorEntry selectorItem) { + if (this.selector == null || !this.selector.isPresent()) { + this.selector = JsonNullable.>of(new ArrayList<>()); + } + try { + this.selector.get().add(selectorItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Dimension rules for a template budget. A nonempty selector creates independent counters for + * matched instances. Omit or pass an empty selector for a legacy fixed-scope budget. + * + * @return selector + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getSelector() { + return selector.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SELECTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getSelector_JsonNullable() { + return selector; + } + + @JsonProperty(JSON_PROPERTY_SELECTOR) + public void setSelector_JsonNullable(JsonNullable> selector) { + this.selector = selector; + } + + public void setSelector(List selector) { + this.selector = JsonNullable.>of(selector); + } + + public AiGatewayBudgetAttributes tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayBudgetAttributes putTagsItem(String key, String tagsItem) { + this.tags.put(key, tagsItem); + return this; + } + + /** + * Request tags that must match for the budget to apply. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayBudgetAttributes teamId(UUID teamId) { + this.teamId = teamId; + return this; + } + + /** + * Optional Datadog Team scope. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTeamId() { + return teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = teamId; + } + + public AiGatewayBudgetAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public AiGatewayBudgetAttributes userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * User scope. Omitted when the budget is not user-scoped. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + public AiGatewayBudgetAttributes warningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + return this; + } + + /** + * Fraction of capacity at which to issue a warning. + * + * @return warningThreshold + */ + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getWarningThreshold() { + return warningThreshold; + } + + public void setWarningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + } + + public AiGatewayBudgetAttributes windowPolicy(AiGatewayBudgetWindowPolicy windowPolicy) { + this.windowPolicy = windowPolicy; + this.unparsed |= !windowPolicy.isValid(); + return this; + } + + /** + * UTC accounting period for a budget. + * + * @return windowPolicy + */ + @JsonProperty(JSON_PROPERTY_WINDOW_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetWindowPolicy getWindowPolicy() { + return windowPolicy; + } + + public void setWindowPolicy(AiGatewayBudgetWindowPolicy windowPolicy) { + if (!windowPolicy.isValid()) { + this.unparsed = true; + } + this.windowPolicy = windowPolicy; + } + + /** + * 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 AiGatewayBudgetAttributes + */ + @JsonAnySetter + public AiGatewayBudgetAttributes 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 AiGatewayBudgetAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetAttributes aiGatewayBudgetAttributes = (AiGatewayBudgetAttributes) o; + return Objects.equals(this.capacityMicrocents, aiGatewayBudgetAttributes.capacityMicrocents) + && Objects.equals(this.createdAt, aiGatewayBudgetAttributes.createdAt) + && Objects.equals(this.createdBy, aiGatewayBudgetAttributes.createdBy) + && Objects.equals(this.enabled, aiGatewayBudgetAttributes.enabled) + && Objects.equals(this.enforcement, aiGatewayBudgetAttributes.enforcement) + && Objects.equals(this.monitorId, aiGatewayBudgetAttributes.monitorId) + && Objects.equals(this.name, aiGatewayBudgetAttributes.name) + && Objects.equals(this.scopeRestricted, aiGatewayBudgetAttributes.scopeRestricted) + && Objects.equals(this.selector, aiGatewayBudgetAttributes.selector) + && Objects.equals(this.tags, aiGatewayBudgetAttributes.tags) + && Objects.equals(this.teamId, aiGatewayBudgetAttributes.teamId) + && Objects.equals(this.updatedAt, aiGatewayBudgetAttributes.updatedAt) + && Objects.equals(this.userId, aiGatewayBudgetAttributes.userId) + && Objects.equals(this.warningThreshold, aiGatewayBudgetAttributes.warningThreshold) + && Objects.equals(this.windowPolicy, aiGatewayBudgetAttributes.windowPolicy) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + capacityMicrocents, + createdAt, + createdBy, + enabled, + enforcement, + monitorId, + name, + scopeRestricted, + selector, + tags, + teamId, + updatedAt, + userId, + warningThreshold, + windowPolicy, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetAttributes {\n"); + sb.append(" capacityMicrocents: ").append(toIndentedString(capacityMicrocents)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" enforcement: ").append(toIndentedString(enforcement)).append("\n"); + sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopeRestricted: ").append(toIndentedString(scopeRestricted)).append("\n"); + sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" warningThreshold: ").append(toIndentedString(warningThreshold)).append("\n"); + sb.append(" windowPolicy: ").append(toIndentedString(windowPolicy)).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/AiGatewayBudgetCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateAttributes.java new file mode 100644 index 00000000000..05cfddd0375 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateAttributes.java @@ -0,0 +1,456 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes used to create an AI Gateway budget. */ +@JsonPropertyOrder({ + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_CAPACITY_MICROCENTS, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_ENFORCEMENT, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_NAME, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_SELECTOR, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_TAGS, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_TEAM_ID, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_TRACK_EXISTING, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_USER_ID, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_WARNING_THRESHOLD, + AiGatewayBudgetCreateAttributes.JSON_PROPERTY_WINDOW_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CAPACITY_MICROCENTS = "capacity_microcents"; + private Long capacityMicrocents; + + public static final String JSON_PROPERTY_ENFORCEMENT = "enforcement"; + private AiGatewayBudgetEnforcement enforcement; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SELECTOR = "selector"; + private JsonNullable> selector = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = null; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private UUID teamId; + + public static final String JSON_PROPERTY_TRACK_EXISTING = "track_existing"; + private Boolean trackExisting = false; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private UUID userId; + + public static final String JSON_PROPERTY_WARNING_THRESHOLD = "warning_threshold"; + private Double warningThreshold = 0.9; + + public static final String JSON_PROPERTY_WINDOW_POLICY = "window_policy"; + private AiGatewayBudgetWindowPolicy windowPolicy; + + public AiGatewayBudgetCreateAttributes() {} + + @JsonCreator + public AiGatewayBudgetCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CAPACITY_MICROCENTS) + Long capacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_ENFORCEMENT) + AiGatewayBudgetEnforcement enforcement, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_POLICY) + AiGatewayBudgetWindowPolicy windowPolicy) { + this.capacityMicrocents = capacityMicrocents; + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + this.name = name; + this.windowPolicy = windowPolicy; + this.unparsed |= !windowPolicy.isValid(); + } + + public AiGatewayBudgetCreateAttributes capacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + return this; + } + + /** + * Budget capacity in microcents. minimum: 1 + * + * @return capacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCapacityMicrocents() { + return capacityMicrocents; + } + + public void setCapacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + } + + public AiGatewayBudgetCreateAttributes enforcement(AiGatewayBudgetEnforcement enforcement) { + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + return this; + } + + /** + * Action taken when spend exceeds the budget. + * + * @return enforcement + */ + @JsonProperty(JSON_PROPERTY_ENFORCEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetEnforcement getEnforcement() { + return enforcement; + } + + public void setEnforcement(AiGatewayBudgetEnforcement enforcement) { + if (!enforcement.isValid()) { + this.unparsed = true; + } + this.enforcement = enforcement; + } + + public AiGatewayBudgetCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayBudgetCreateAttributes selector(List selector) { + this.selector = JsonNullable.>of(selector); + return this; + } + + public AiGatewayBudgetCreateAttributes addSelectorItem( + AiGatewayBudgetSelectorEntry selectorItem) { + if (this.selector == null || !this.selector.isPresent()) { + this.selector = JsonNullable.>of(new ArrayList<>()); + } + try { + this.selector.get().add(selectorItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Dimension rules for a template budget. A nonempty selector creates independent counters for + * matched instances. Omit or pass an empty selector for a legacy fixed-scope budget. + * + * @return selector + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getSelector() { + return selector.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SELECTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getSelector_JsonNullable() { + return selector; + } + + @JsonProperty(JSON_PROPERTY_SELECTOR) + public void setSelector_JsonNullable(JsonNullable> selector) { + this.selector = selector; + } + + public void setSelector(List selector) { + this.selector = JsonNullable.>of(selector); + } + + public AiGatewayBudgetCreateAttributes tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayBudgetCreateAttributes putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Request tags that must match for the budget to apply. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayBudgetCreateAttributes teamId(UUID teamId) { + this.teamId = teamId; + return this; + } + + /** + * Optional Datadog Team scope. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTeamId() { + return teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = teamId; + } + + public AiGatewayBudgetCreateAttributes trackExisting(Boolean trackExisting) { + this.trackExisting = trackExisting; + return this; + } + + /** + * Initialize current-period spend from historical priced LLM Observability spans. Defaults to + * false. Unsupported for template budgets; failures can be retried with an update. + * + * @return trackExisting + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACK_EXISTING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTrackExisting() { + return trackExisting; + } + + public void setTrackExisting(Boolean trackExisting) { + this.trackExisting = trackExisting; + } + + public AiGatewayBudgetCreateAttributes userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * Optional user scope. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + public AiGatewayBudgetCreateAttributes warningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + return this; + } + + /** + * Fraction of capacity at which to issue a warning. minimum: 0 maximum: 1 + * + * @return warningThreshold + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getWarningThreshold() { + return warningThreshold; + } + + public void setWarningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + } + + public AiGatewayBudgetCreateAttributes windowPolicy(AiGatewayBudgetWindowPolicy windowPolicy) { + this.windowPolicy = windowPolicy; + this.unparsed |= !windowPolicy.isValid(); + return this; + } + + /** + * UTC accounting period for a budget. + * + * @return windowPolicy + */ + @JsonProperty(JSON_PROPERTY_WINDOW_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetWindowPolicy getWindowPolicy() { + return windowPolicy; + } + + public void setWindowPolicy(AiGatewayBudgetWindowPolicy windowPolicy) { + if (!windowPolicy.isValid()) { + this.unparsed = true; + } + this.windowPolicy = windowPolicy; + } + + /** + * 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 AiGatewayBudgetCreateAttributes + */ + @JsonAnySetter + public AiGatewayBudgetCreateAttributes 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 AiGatewayBudgetCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetCreateAttributes aiGatewayBudgetCreateAttributes = + (AiGatewayBudgetCreateAttributes) o; + return Objects.equals( + this.capacityMicrocents, aiGatewayBudgetCreateAttributes.capacityMicrocents) + && Objects.equals(this.enforcement, aiGatewayBudgetCreateAttributes.enforcement) + && Objects.equals(this.name, aiGatewayBudgetCreateAttributes.name) + && Objects.equals(this.selector, aiGatewayBudgetCreateAttributes.selector) + && Objects.equals(this.tags, aiGatewayBudgetCreateAttributes.tags) + && Objects.equals(this.teamId, aiGatewayBudgetCreateAttributes.teamId) + && Objects.equals(this.trackExisting, aiGatewayBudgetCreateAttributes.trackExisting) + && Objects.equals(this.userId, aiGatewayBudgetCreateAttributes.userId) + && Objects.equals(this.warningThreshold, aiGatewayBudgetCreateAttributes.warningThreshold) + && Objects.equals(this.windowPolicy, aiGatewayBudgetCreateAttributes.windowPolicy) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + capacityMicrocents, + enforcement, + name, + selector, + tags, + teamId, + trackExisting, + userId, + warningThreshold, + windowPolicy, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetCreateAttributes {\n"); + sb.append(" capacityMicrocents: ").append(toIndentedString(capacityMicrocents)).append("\n"); + sb.append(" enforcement: ").append(toIndentedString(enforcement)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" trackExisting: ").append(toIndentedString(trackExisting)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" warningThreshold: ").append(toIndentedString(warningThreshold)).append("\n"); + sb.append(" windowPolicy: ").append(toIndentedString(windowPolicy)).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/AiGatewayBudgetCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateData.java new file mode 100644 index 00000000000..83d3ae9f3f1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create an AI Gateway budget. */ +@JsonPropertyOrder({ + AiGatewayBudgetCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetType type; + + public AiGatewayBudgetCreateData() {} + + @JsonCreator + public AiGatewayBudgetCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetCreateData attributes(AiGatewayBudgetCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create an AI Gateway budget. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetCreateData type(AiGatewayBudgetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway budget resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetType getType() { + return type; + } + + public void setType(AiGatewayBudgetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetCreateData + */ + @JsonAnySetter + public AiGatewayBudgetCreateData 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 AiGatewayBudgetCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetCreateData aiGatewayBudgetCreateData = (AiGatewayBudgetCreateData) o; + return Objects.equals(this.attributes, aiGatewayBudgetCreateData.attributes) + && Objects.equals(this.type, aiGatewayBudgetCreateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateRequest.java new file mode 100644 index 00000000000..811018a6eb8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetCreateRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create an AI Gateway budget. */ +@JsonPropertyOrder({AiGatewayBudgetCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetCreateData data; + + public AiGatewayBudgetCreateRequest() {} + + @JsonCreator + public AiGatewayBudgetCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayBudgetCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetCreateRequest data(AiGatewayBudgetCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create an AI Gateway budget. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetCreateData getData() { + return data; + } + + public void setData(AiGatewayBudgetCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetCreateRequest + */ + @JsonAnySetter + public AiGatewayBudgetCreateRequest 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 AiGatewayBudgetCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetCreateRequest aiGatewayBudgetCreateRequest = (AiGatewayBudgetCreateRequest) o; + return Objects.equals(this.data, aiGatewayBudgetCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetEnforcement.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetEnforcement.java new file mode 100644 index 00000000000..7a8968bd77d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetEnforcement.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** Action taken when spend exceeds the budget. */ +@JsonSerialize(using = AiGatewayBudgetEnforcement.AiGatewayBudgetEnforcementSerializer.class) +public class AiGatewayBudgetEnforcement extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("BLOCK", "NOTIFY")); + + public static final AiGatewayBudgetEnforcement BLOCK = new AiGatewayBudgetEnforcement("BLOCK"); + public static final AiGatewayBudgetEnforcement NOTIFY = new AiGatewayBudgetEnforcement("NOTIFY"); + + AiGatewayBudgetEnforcement(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetEnforcementSerializer + extends StdSerializer { + public AiGatewayBudgetEnforcementSerializer(Class t) { + super(t); + } + + public AiGatewayBudgetEnforcementSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetEnforcement value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetEnforcement fromValue(String value) { + return new AiGatewayBudgetEnforcement(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceAttributes.java new file mode 100644 index 00000000000..5dcbebb52a9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceAttributes.java @@ -0,0 +1,339 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** One budget instance counter. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_BUDGET_ID, + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS, + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_INSTANCE_KEY, + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_MODIFIED_AT, + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_SPEND_MICROCENTS, + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_SPLIT_DIMS, + AiGatewayBudgetInstanceAttributes.JSON_PROPERTY_WINDOW_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUDGET_ID = "budget_id"; + private UUID budgetId; + + public static final String JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS = + "effective_capacity_microcents"; + private Long effectiveCapacityMicrocents; + + public static final String JSON_PROPERTY_INSTANCE_KEY = "instance_key"; + private String instanceKey; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_SPEND_MICROCENTS = "spend_microcents"; + private Long spendMicrocents; + + public static final String JSON_PROPERTY_SPLIT_DIMS = "split_dims"; + private Map splitDims = new HashMap(); + + public static final String JSON_PROPERTY_WINDOW_START = "window_start"; + private OffsetDateTime windowStart; + + public AiGatewayBudgetInstanceAttributes() {} + + @JsonCreator + public AiGatewayBudgetInstanceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_BUDGET_ID) UUID budgetId, + @JsonProperty(required = true, value = JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS) + Long effectiveCapacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_INSTANCE_KEY) String instanceKey, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_SPEND_MICROCENTS) Long spendMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_SPLIT_DIMS) + Map splitDims, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_START) + OffsetDateTime windowStart) { + this.budgetId = budgetId; + this.effectiveCapacityMicrocents = effectiveCapacityMicrocents; + this.instanceKey = instanceKey; + this.modifiedAt = modifiedAt; + this.spendMicrocents = spendMicrocents; + this.splitDims = splitDims; + this.windowStart = windowStart; + } + + public AiGatewayBudgetInstanceAttributes budgetId(UUID budgetId) { + this.budgetId = budgetId; + return this; + } + + /** + * Budget identifier. + * + * @return budgetId + */ + @JsonProperty(JSON_PROPERTY_BUDGET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getBudgetId() { + return budgetId; + } + + public void setBudgetId(UUID budgetId) { + this.budgetId = budgetId; + } + + public AiGatewayBudgetInstanceAttributes effectiveCapacityMicrocents( + Long effectiveCapacityMicrocents) { + this.effectiveCapacityMicrocents = effectiveCapacityMicrocents; + return this; + } + + /** + * Capacity enforced for this instance, in microcents. + * + * @return effectiveCapacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getEffectiveCapacityMicrocents() { + return effectiveCapacityMicrocents; + } + + public void setEffectiveCapacityMicrocents(Long effectiveCapacityMicrocents) { + this.effectiveCapacityMicrocents = effectiveCapacityMicrocents; + } + + public AiGatewayBudgetInstanceAttributes instanceKey(String instanceKey) { + this.instanceKey = instanceKey; + return this; + } + + /** + * Opaque canonical counter key. Empty for legacy pooled counters. + * + * @return instanceKey + */ + @JsonProperty(JSON_PROPERTY_INSTANCE_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstanceKey() { + return instanceKey; + } + + public void setInstanceKey(String instanceKey) { + this.instanceKey = instanceKey; + } + + public AiGatewayBudgetInstanceAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Time the instance counter was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public AiGatewayBudgetInstanceAttributes spendMicrocents(Long spendMicrocents) { + this.spendMicrocents = spendMicrocents; + return this; + } + + /** + * Spend counted against this instance, in microcents. + * + * @return spendMicrocents + */ + @JsonProperty(JSON_PROPERTY_SPEND_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSpendMicrocents() { + return spendMicrocents; + } + + public void setSpendMicrocents(Long spendMicrocents) { + this.spendMicrocents = spendMicrocents; + } + + public AiGatewayBudgetInstanceAttributes splitDims(Map splitDims) { + this.splitDims = splitDims; + return this; + } + + public AiGatewayBudgetInstanceAttributes putSplitDimsItem(String key, String splitDimsItem) { + this.splitDims.put(key, splitDimsItem); + return this; + } + + /** + * Dimension values decoded from instance_key. User and Team values are raw UUIDs. + * + * @return splitDims + */ + @JsonProperty(JSON_PROPERTY_SPLIT_DIMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getSplitDims() { + return splitDims; + } + + public void setSplitDims(Map splitDims) { + this.splitDims = splitDims; + } + + public AiGatewayBudgetInstanceAttributes windowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + return this; + } + + /** + * Start of the accounting window. + * + * @return windowStart + */ + @JsonProperty(JSON_PROPERTY_WINDOW_START) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowStart() { + return windowStart; + } + + public void setWindowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + } + + /** + * 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 AiGatewayBudgetInstanceAttributes + */ + @JsonAnySetter + public AiGatewayBudgetInstanceAttributes 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 AiGatewayBudgetInstanceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceAttributes aiGatewayBudgetInstanceAttributes = + (AiGatewayBudgetInstanceAttributes) o; + return Objects.equals(this.budgetId, aiGatewayBudgetInstanceAttributes.budgetId) + && Objects.equals( + this.effectiveCapacityMicrocents, + aiGatewayBudgetInstanceAttributes.effectiveCapacityMicrocents) + && Objects.equals(this.instanceKey, aiGatewayBudgetInstanceAttributes.instanceKey) + && Objects.equals(this.modifiedAt, aiGatewayBudgetInstanceAttributes.modifiedAt) + && Objects.equals(this.spendMicrocents, aiGatewayBudgetInstanceAttributes.spendMicrocents) + && Objects.equals(this.splitDims, aiGatewayBudgetInstanceAttributes.splitDims) + && Objects.equals(this.windowStart, aiGatewayBudgetInstanceAttributes.windowStart) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + budgetId, + effectiveCapacityMicrocents, + instanceKey, + modifiedAt, + spendMicrocents, + splitDims, + windowStart, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceAttributes {\n"); + sb.append(" budgetId: ").append(toIndentedString(budgetId)).append("\n"); + sb.append(" effectiveCapacityMicrocents: ") + .append(toIndentedString(effectiveCapacityMicrocents)) + .append("\n"); + sb.append(" instanceKey: ").append(toIndentedString(instanceKey)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" spendMicrocents: ").append(toIndentedString(spendMicrocents)).append("\n"); + sb.append(" splitDims: ").append(toIndentedString(splitDims)).append("\n"); + sb.append(" windowStart: ").append(toIndentedString(windowStart)).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/AiGatewayBudgetInstanceCapacityOverrideAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideAttributes.java new file mode 100644 index 00000000000..2e1b74da472 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideAttributes.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to override one budget instance's active-period capacity. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceCapacityOverrideAttributes.JSON_PROPERTY_CAPACITY_MICROCENTS, + AiGatewayBudgetInstanceCapacityOverrideAttributes.JSON_PROPERTY_INSTANCE_KEY, + AiGatewayBudgetInstanceCapacityOverrideAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceCapacityOverrideAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CAPACITY_MICROCENTS = "capacity_microcents"; + private Long capacityMicrocents; + + public static final String JSON_PROPERTY_INSTANCE_KEY = "instance_key"; + private String instanceKey; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public AiGatewayBudgetInstanceCapacityOverrideAttributes() {} + + @JsonCreator + public AiGatewayBudgetInstanceCapacityOverrideAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CAPACITY_MICROCENTS) + Long capacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_INSTANCE_KEY) String instanceKey) { + this.capacityMicrocents = capacityMicrocents; + this.instanceKey = instanceKey; + } + + public AiGatewayBudgetInstanceCapacityOverrideAttributes capacityMicrocents( + Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + return this; + } + + /** + * New capacity for this instance in the active accounting period, in microcents. minimum: 1 + * + * @return capacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCapacityMicrocents() { + return capacityMicrocents; + } + + public void setCapacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + } + + public AiGatewayBudgetInstanceCapacityOverrideAttributes instanceKey(String instanceKey) { + this.instanceKey = instanceKey; + return this; + } + + /** + * Counter key of the instance to override, as returned by the list budget instances endpoint. + * + * @return instanceKey + */ + @JsonProperty(JSON_PROPERTY_INSTANCE_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstanceKey() { + return instanceKey; + } + + public void setInstanceKey(String instanceKey) { + this.instanceKey = instanceKey; + } + + public AiGatewayBudgetInstanceCapacityOverrideAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Optional reason recorded with the capacity override. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + /** + * 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 AiGatewayBudgetInstanceCapacityOverrideAttributes + */ + @JsonAnySetter + public AiGatewayBudgetInstanceCapacityOverrideAttributes 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 AiGatewayBudgetInstanceCapacityOverrideAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceCapacityOverrideAttributes + aiGatewayBudgetInstanceCapacityOverrideAttributes = + (AiGatewayBudgetInstanceCapacityOverrideAttributes) o; + return Objects.equals( + this.capacityMicrocents, + aiGatewayBudgetInstanceCapacityOverrideAttributes.capacityMicrocents) + && Objects.equals( + this.instanceKey, aiGatewayBudgetInstanceCapacityOverrideAttributes.instanceKey) + && Objects.equals(this.reason, aiGatewayBudgetInstanceCapacityOverrideAttributes.reason) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstanceCapacityOverrideAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(capacityMicrocents, instanceKey, reason, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceCapacityOverrideAttributes {\n"); + sb.append(" capacityMicrocents: ").append(toIndentedString(capacityMicrocents)).append("\n"); + sb.append(" instanceKey: ").append(toIndentedString(instanceKey)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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/AiGatewayBudgetInstanceCapacityOverrideData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideData.java new file mode 100644 index 00000000000..0f1716cd8ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideData.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; + +/** Data used to override one budget instance's active-period capacity. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceCapacityOverrideData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetInstanceCapacityOverrideData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceCapacityOverrideData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetInstanceCapacityOverrideAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetInstanceType type; + + public AiGatewayBudgetInstanceCapacityOverrideData() {} + + @JsonCreator + public AiGatewayBudgetInstanceCapacityOverrideData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetInstanceCapacityOverrideAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetInstanceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetInstanceCapacityOverrideData attributes( + AiGatewayBudgetInstanceCapacityOverrideAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to override one budget instance's active-period capacity. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceCapacityOverrideAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetInstanceCapacityOverrideAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetInstanceCapacityOverrideData type(AiGatewayBudgetInstanceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Budget instance counter resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceType getType() { + return type; + } + + public void setType(AiGatewayBudgetInstanceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetInstanceCapacityOverrideData + */ + @JsonAnySetter + public AiGatewayBudgetInstanceCapacityOverrideData 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 AiGatewayBudgetInstanceCapacityOverrideData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceCapacityOverrideData aiGatewayBudgetInstanceCapacityOverrideData = + (AiGatewayBudgetInstanceCapacityOverrideData) o; + return Objects.equals(this.attributes, aiGatewayBudgetInstanceCapacityOverrideData.attributes) + && Objects.equals(this.type, aiGatewayBudgetInstanceCapacityOverrideData.type) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstanceCapacityOverrideData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceCapacityOverrideData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideRequest.java new file mode 100644 index 00000000000..0e17b5e9ec6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceCapacityOverrideRequest.java @@ -0,0 +1,154 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to override one budget instance's active-period capacity. */ +@JsonPropertyOrder({AiGatewayBudgetInstanceCapacityOverrideRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceCapacityOverrideRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetInstanceCapacityOverrideData data; + + public AiGatewayBudgetInstanceCapacityOverrideRequest() {} + + @JsonCreator + public AiGatewayBudgetInstanceCapacityOverrideRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayBudgetInstanceCapacityOverrideData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetInstanceCapacityOverrideRequest data( + AiGatewayBudgetInstanceCapacityOverrideData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to override one budget instance's active-period capacity. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceCapacityOverrideData getData() { + return data; + } + + public void setData(AiGatewayBudgetInstanceCapacityOverrideData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetInstanceCapacityOverrideRequest + */ + @JsonAnySetter + public AiGatewayBudgetInstanceCapacityOverrideRequest 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 AiGatewayBudgetInstanceCapacityOverrideRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceCapacityOverrideRequest aiGatewayBudgetInstanceCapacityOverrideRequest = + (AiGatewayBudgetInstanceCapacityOverrideRequest) o; + return Objects.equals(this.data, aiGatewayBudgetInstanceCapacityOverrideRequest.data) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstanceCapacityOverrideRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceCapacityOverrideRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionAttributes.java new file mode 100644 index 00000000000..b37dc3dd56d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionAttributes.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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Values of one budget split dimension. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceDimensionAttributes.JSON_PROPERTY_BUDGET_ID, + AiGatewayBudgetInstanceDimensionAttributes.JSON_PROPERTY_DIM, + AiGatewayBudgetInstanceDimensionAttributes.JSON_PROPERTY_RESTRICTED_DETAILS, + AiGatewayBudgetInstanceDimensionAttributes.JSON_PROPERTY_TRUNCATED, + AiGatewayBudgetInstanceDimensionAttributes.JSON_PROPERTY_VALUES, + AiGatewayBudgetInstanceDimensionAttributes.JSON_PROPERTY_WINDOW_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceDimensionAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUDGET_ID = "budget_id"; + private UUID budgetId; + + public static final String JSON_PROPERTY_DIM = "dim"; + private String dim; + + public static final String JSON_PROPERTY_RESTRICTED_DETAILS = "restricted_details"; + private Boolean restrictedDetails; + + public static final String JSON_PROPERTY_TRUNCATED = "truncated"; + private Boolean truncated; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public static final String JSON_PROPERTY_WINDOW_START = "window_start"; + private OffsetDateTime windowStart; + + public AiGatewayBudgetInstanceDimensionAttributes() {} + + @JsonCreator + public AiGatewayBudgetInstanceDimensionAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_BUDGET_ID) UUID budgetId, + @JsonProperty(required = true, value = JSON_PROPERTY_DIM) String dim, + @JsonProperty(required = true, value = JSON_PROPERTY_RESTRICTED_DETAILS) + Boolean restrictedDetails, + @JsonProperty(required = true, value = JSON_PROPERTY_TRUNCATED) Boolean truncated, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) + List values, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_START) + OffsetDateTime windowStart) { + this.budgetId = budgetId; + this.dim = dim; + this.restrictedDetails = restrictedDetails; + this.truncated = truncated; + this.values = values; + for (AiGatewayBudgetInstanceDimensionValue item : values) { + this.unparsed |= item.unparsed; + } + this.windowStart = windowStart; + } + + public AiGatewayBudgetInstanceDimensionAttributes budgetId(UUID budgetId) { + this.budgetId = budgetId; + return this; + } + + /** + * Budget identifier. + * + * @return budgetId + */ + @JsonProperty(JSON_PROPERTY_BUDGET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getBudgetId() { + return budgetId; + } + + public void setBudgetId(UUID budgetId) { + this.budgetId = budgetId; + } + + public AiGatewayBudgetInstanceDimensionAttributes dim(String dim) { + this.dim = dim; + return this; + } + + /** + * Split dimension name, as used in split_dims and the split_dim filter. + * + * @return dim + */ + @JsonProperty(JSON_PROPERTY_DIM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDim() { + return dim; + } + + public void setDim(String dim) { + this.dim = dim; + } + + public AiGatewayBudgetInstanceDimensionAttributes restrictedDetails(Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + return this; + } + + /** + * Whether identifying instance details were withheld. Aggregate totals still include restricted + * instances. + * + * @return restrictedDetails + */ + @JsonProperty(JSON_PROPERTY_RESTRICTED_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRestrictedDetails() { + return restrictedDetails; + } + + public void setRestrictedDetails(Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + } + + public AiGatewayBudgetInstanceDimensionAttributes truncated(Boolean truncated) { + this.truncated = truncated; + return this; + } + + /** + * Whether more values matched than were returned. Narrow the results with query or + * value to see them. + * + * @return truncated + */ + @JsonProperty(JSON_PROPERTY_TRUNCATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getTruncated() { + return truncated; + } + + public void setTruncated(Boolean truncated) { + this.truncated = truncated; + } + + public AiGatewayBudgetInstanceDimensionAttributes values( + List values) { + this.values = values; + for (AiGatewayBudgetInstanceDimensionValue item : values) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayBudgetInstanceDimensionAttributes addValuesItem( + AiGatewayBudgetInstanceDimensionValue valuesItem) { + this.values.add(valuesItem); + this.unparsed |= valuesItem.unparsed; + return this; + } + + /** + * Values of this dimension across matching instance counters, highest spend first and at most + * limit of them. Values are counted under every split_dim filter except + * the one for this dimension. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + if (values != null) { + for (AiGatewayBudgetInstanceDimensionValue item : values) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayBudgetInstanceDimensionAttributes windowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + return this; + } + + /** + * Start of the accounting window. + * + * @return windowStart + */ + @JsonProperty(JSON_PROPERTY_WINDOW_START) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowStart() { + return windowStart; + } + + public void setWindowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + } + + /** + * 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 AiGatewayBudgetInstanceDimensionAttributes + */ + @JsonAnySetter + public AiGatewayBudgetInstanceDimensionAttributes 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 AiGatewayBudgetInstanceDimensionAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceDimensionAttributes aiGatewayBudgetInstanceDimensionAttributes = + (AiGatewayBudgetInstanceDimensionAttributes) o; + return Objects.equals(this.budgetId, aiGatewayBudgetInstanceDimensionAttributes.budgetId) + && Objects.equals(this.dim, aiGatewayBudgetInstanceDimensionAttributes.dim) + && Objects.equals( + this.restrictedDetails, aiGatewayBudgetInstanceDimensionAttributes.restrictedDetails) + && Objects.equals(this.truncated, aiGatewayBudgetInstanceDimensionAttributes.truncated) + && Objects.equals(this.values, aiGatewayBudgetInstanceDimensionAttributes.values) + && Objects.equals(this.windowStart, aiGatewayBudgetInstanceDimensionAttributes.windowStart) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstanceDimensionAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + budgetId, dim, restrictedDetails, truncated, values, windowStart, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceDimensionAttributes {\n"); + sb.append(" budgetId: ").append(toIndentedString(budgetId)).append("\n"); + sb.append(" dim: ").append(toIndentedString(dim)).append("\n"); + sb.append(" restrictedDetails: ").append(toIndentedString(restrictedDetails)).append("\n"); + sb.append(" truncated: ").append(toIndentedString(truncated)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" windowStart: ").append(toIndentedString(windowStart)).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/AiGatewayBudgetInstanceDimensionListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionListResponse.java new file mode 100644 index 00000000000..76429136134 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionListResponse.java @@ -0,0 +1,169 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing values of budget split dimensions. */ +@JsonPropertyOrder({AiGatewayBudgetInstanceDimensionListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceDimensionListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayBudgetInstanceDimensionListResponse() {} + + @JsonCreator + public AiGatewayBudgetInstanceDimensionListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayBudgetInstanceDimensionResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayBudgetInstanceDimensionListResponse data( + List data) { + this.data = data; + for (AiGatewayBudgetInstanceDimensionResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayBudgetInstanceDimensionListResponse addDataItem( + AiGatewayBudgetInstanceDimensionResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayBudgetInstanceDimensionResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayBudgetInstanceDimensionListResponse + */ + @JsonAnySetter + public AiGatewayBudgetInstanceDimensionListResponse 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 AiGatewayBudgetInstanceDimensionListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceDimensionListResponse aiGatewayBudgetInstanceDimensionListResponse = + (AiGatewayBudgetInstanceDimensionListResponse) o; + return Objects.equals(this.data, aiGatewayBudgetInstanceDimensionListResponse.data) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstanceDimensionListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceDimensionListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionResource.java new file mode 100644 index 00000000000..5424eb038c5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionResource.java @@ -0,0 +1,217 @@ +/* + * 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; + +/** Values of one budget split dimension. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceDimensionResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetInstanceDimensionResource.JSON_PROPERTY_ID, + AiGatewayBudgetInstanceDimensionResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceDimensionResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetInstanceDimensionAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetInstanceDimensionType type; + + public AiGatewayBudgetInstanceDimensionResource() {} + + @JsonCreator + public AiGatewayBudgetInstanceDimensionResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetInstanceDimensionAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayBudgetInstanceDimensionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetInstanceDimensionResource attributes( + AiGatewayBudgetInstanceDimensionAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Values of one budget split dimension. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceDimensionAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetInstanceDimensionAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetInstanceDimensionResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayBudgetInstanceDimensionResource type(AiGatewayBudgetInstanceDimensionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Budget split dimension values resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceDimensionType getType() { + return type; + } + + public void setType(AiGatewayBudgetInstanceDimensionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetInstanceDimensionResource + */ + @JsonAnySetter + public AiGatewayBudgetInstanceDimensionResource 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 AiGatewayBudgetInstanceDimensionResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceDimensionResource aiGatewayBudgetInstanceDimensionResource = + (AiGatewayBudgetInstanceDimensionResource) o; + return Objects.equals(this.attributes, aiGatewayBudgetInstanceDimensionResource.attributes) + && Objects.equals(this.id, aiGatewayBudgetInstanceDimensionResource.id) + && Objects.equals(this.type, aiGatewayBudgetInstanceDimensionResource.type) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstanceDimensionResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceDimensionResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionType.java new file mode 100644 index 00000000000..072bc7d88b1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionType.java @@ -0,0 +1,60 @@ +/* + * 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; + +/** Budget split dimension values resource type. */ +@JsonSerialize( + using = + AiGatewayBudgetInstanceDimensionType.AiGatewayBudgetInstanceDimensionTypeSerializer.class) +public class AiGatewayBudgetInstanceDimensionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("budget-instance-dimensions")); + + public static final AiGatewayBudgetInstanceDimensionType BUDGET_INSTANCE_DIMENSIONS = + new AiGatewayBudgetInstanceDimensionType("budget-instance-dimensions"); + + AiGatewayBudgetInstanceDimensionType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetInstanceDimensionTypeSerializer + extends StdSerializer { + public AiGatewayBudgetInstanceDimensionTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayBudgetInstanceDimensionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetInstanceDimensionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetInstanceDimensionType fromValue(String value) { + return new AiGatewayBudgetInstanceDimensionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionValue.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionValue.java new file mode 100644 index 00000000000..298269f5508 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceDimensionValue.java @@ -0,0 +1,205 @@ +/* + * 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; + +/** One value of a budget split dimension. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceDimensionValue.JSON_PROPERTY_INSTANCE_COUNT, + AiGatewayBudgetInstanceDimensionValue.JSON_PROPERTY_SPEND_MICROCENTS, + AiGatewayBudgetInstanceDimensionValue.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceDimensionValue { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INSTANCE_COUNT = "instance_count"; + private Long instanceCount; + + public static final String JSON_PROPERTY_SPEND_MICROCENTS = "spend_microcents"; + private Long spendMicrocents; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public AiGatewayBudgetInstanceDimensionValue() {} + + @JsonCreator + public AiGatewayBudgetInstanceDimensionValue( + @JsonProperty(required = true, value = JSON_PROPERTY_INSTANCE_COUNT) Long instanceCount, + @JsonProperty(required = true, value = JSON_PROPERTY_SPEND_MICROCENTS) Long spendMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.instanceCount = instanceCount; + this.spendMicrocents = spendMicrocents; + this.value = value; + } + + public AiGatewayBudgetInstanceDimensionValue instanceCount(Long instanceCount) { + this.instanceCount = instanceCount; + return this; + } + + /** + * Number of instance counters carrying this value. + * + * @return instanceCount + */ + @JsonProperty(JSON_PROPERTY_INSTANCE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getInstanceCount() { + return instanceCount; + } + + public void setInstanceCount(Long instanceCount) { + this.instanceCount = instanceCount; + } + + public AiGatewayBudgetInstanceDimensionValue spendMicrocents(Long spendMicrocents) { + this.spendMicrocents = spendMicrocents; + return this; + } + + /** + * Spend summed across those instance counters, in microcents. + * + * @return spendMicrocents + */ + @JsonProperty(JSON_PROPERTY_SPEND_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSpendMicrocents() { + return spendMicrocents; + } + + public void setSpendMicrocents(Long spendMicrocents) { + this.spendMicrocents = spendMicrocents; + } + + public AiGatewayBudgetInstanceDimensionValue value(String value) { + this.value = value; + return this; + } + + /** + * Raw dimension value. User and Team values are UUIDs. A counter with no value for the dimension + * carries the null character (U+0000). + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * 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 AiGatewayBudgetInstanceDimensionValue + */ + @JsonAnySetter + public AiGatewayBudgetInstanceDimensionValue 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 AiGatewayBudgetInstanceDimensionValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceDimensionValue aiGatewayBudgetInstanceDimensionValue = + (AiGatewayBudgetInstanceDimensionValue) o; + return Objects.equals(this.instanceCount, aiGatewayBudgetInstanceDimensionValue.instanceCount) + && Objects.equals( + this.spendMicrocents, aiGatewayBudgetInstanceDimensionValue.spendMicrocents) + && Objects.equals(this.value, aiGatewayBudgetInstanceDimensionValue.value) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceDimensionValue.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(instanceCount, spendMicrocents, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceDimensionValue {\n"); + sb.append(" instanceCount: ").append(toIndentedString(instanceCount)).append("\n"); + sb.append(" spendMicrocents: ").append(toIndentedString(spendMicrocents)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/AiGatewayBudgetInstanceListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceListResponse.java new file mode 100644 index 00000000000..823a1044686 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceListResponse.java @@ -0,0 +1,201 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing budget instance counters. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceListResponse.JSON_PROPERTY_DATA, + AiGatewayBudgetInstanceListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private AiGatewayRestrictedDetailsMeta meta; + + public AiGatewayBudgetInstanceListResponse() {} + + @JsonCreator + public AiGatewayBudgetInstanceListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) + AiGatewayRestrictedDetailsMeta meta) { + this.data = data; + for (AiGatewayBudgetInstanceResource item : data) { + this.unparsed |= item.unparsed; + } + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public AiGatewayBudgetInstanceListResponse data(List data) { + this.data = data; + for (AiGatewayBudgetInstanceResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayBudgetInstanceListResponse addDataItem(AiGatewayBudgetInstanceResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayBudgetInstanceResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayBudgetInstanceListResponse meta(AiGatewayRestrictedDetailsMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Visibility information for identifying instance details. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRestrictedDetailsMeta getMeta() { + return meta; + } + + public void setMeta(AiGatewayRestrictedDetailsMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * 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 AiGatewayBudgetInstanceListResponse + */ + @JsonAnySetter + public AiGatewayBudgetInstanceListResponse 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 AiGatewayBudgetInstanceListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceListResponse aiGatewayBudgetInstanceListResponse = + (AiGatewayBudgetInstanceListResponse) o; + return Objects.equals(this.data, aiGatewayBudgetInstanceListResponse.data) + && Objects.equals(this.meta, aiGatewayBudgetInstanceListResponse.meta) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).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/AiGatewayBudgetInstanceResetAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetAttributes.java new file mode 100644 index 00000000000..8ee322463a3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetAttributes.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to reset one budget instance's active-period spend. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceResetAttributes.JSON_PROPERTY_INSTANCE_KEY, + AiGatewayBudgetInstanceResetAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceResetAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INSTANCE_KEY = "instance_key"; + private String instanceKey; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public AiGatewayBudgetInstanceResetAttributes() {} + + @JsonCreator + public AiGatewayBudgetInstanceResetAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INSTANCE_KEY) String instanceKey) { + this.instanceKey = instanceKey; + } + + public AiGatewayBudgetInstanceResetAttributes instanceKey(String instanceKey) { + this.instanceKey = instanceKey; + return this; + } + + /** + * Counter key of the instance to reset, as returned by the list budget instances endpoint. + * + * @return instanceKey + */ + @JsonProperty(JSON_PROPERTY_INSTANCE_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstanceKey() { + return instanceKey; + } + + public void setInstanceKey(String instanceKey) { + this.instanceKey = instanceKey; + } + + public AiGatewayBudgetInstanceResetAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Optional reason recorded with the spend reset. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + /** + * 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 AiGatewayBudgetInstanceResetAttributes + */ + @JsonAnySetter + public AiGatewayBudgetInstanceResetAttributes 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 AiGatewayBudgetInstanceResetAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceResetAttributes aiGatewayBudgetInstanceResetAttributes = + (AiGatewayBudgetInstanceResetAttributes) o; + return Objects.equals(this.instanceKey, aiGatewayBudgetInstanceResetAttributes.instanceKey) + && Objects.equals(this.reason, aiGatewayBudgetInstanceResetAttributes.reason) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceResetAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(instanceKey, reason, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceResetAttributes {\n"); + sb.append(" instanceKey: ").append(toIndentedString(instanceKey)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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/AiGatewayBudgetInstanceResetData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetData.java new file mode 100644 index 00000000000..f4cf31375a9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to reset one budget instance's active-period spend. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceResetData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetInstanceResetData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceResetData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetInstanceResetAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetInstanceType type; + + public AiGatewayBudgetInstanceResetData() {} + + @JsonCreator + public AiGatewayBudgetInstanceResetData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetInstanceResetAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetInstanceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetInstanceResetData attributes( + AiGatewayBudgetInstanceResetAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to reset one budget instance's active-period spend. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceResetAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetInstanceResetAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetInstanceResetData type(AiGatewayBudgetInstanceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Budget instance counter resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceType getType() { + return type; + } + + public void setType(AiGatewayBudgetInstanceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetInstanceResetData + */ + @JsonAnySetter + public AiGatewayBudgetInstanceResetData 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 AiGatewayBudgetInstanceResetData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceResetData aiGatewayBudgetInstanceResetData = + (AiGatewayBudgetInstanceResetData) o; + return Objects.equals(this.attributes, aiGatewayBudgetInstanceResetData.attributes) + && Objects.equals(this.type, aiGatewayBudgetInstanceResetData.type) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceResetData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceResetData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetRequest.java new file mode 100644 index 00000000000..f9cc4449563 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResetRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to reset one budget instance's active-period spend. */ +@JsonPropertyOrder({AiGatewayBudgetInstanceResetRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceResetRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetInstanceResetData data; + + public AiGatewayBudgetInstanceResetRequest() {} + + @JsonCreator + public AiGatewayBudgetInstanceResetRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayBudgetInstanceResetData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetInstanceResetRequest data(AiGatewayBudgetInstanceResetData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to reset one budget instance's active-period spend. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceResetData getData() { + return data; + } + + public void setData(AiGatewayBudgetInstanceResetData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetInstanceResetRequest + */ + @JsonAnySetter + public AiGatewayBudgetInstanceResetRequest 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 AiGatewayBudgetInstanceResetRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceResetRequest aiGatewayBudgetInstanceResetRequest = + (AiGatewayBudgetInstanceResetRequest) o; + return Objects.equals(this.data, aiGatewayBudgetInstanceResetRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceResetRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceResetRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResource.java new file mode 100644 index 00000000000..f4896f56028 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResource.java @@ -0,0 +1,214 @@ +/* + * 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; + +/** One budget instance counter. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstanceResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetInstanceResource.JSON_PROPERTY_ID, + AiGatewayBudgetInstanceResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetInstanceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetInstanceType type; + + public AiGatewayBudgetInstanceResource() {} + + @JsonCreator + public AiGatewayBudgetInstanceResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetInstanceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetInstanceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetInstanceResource attributes(AiGatewayBudgetInstanceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * One budget instance counter. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetInstanceAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetInstanceResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayBudgetInstanceResource type(AiGatewayBudgetInstanceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Budget instance counter resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceType getType() { + return type; + } + + public void setType(AiGatewayBudgetInstanceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetInstanceResource + */ + @JsonAnySetter + public AiGatewayBudgetInstanceResource 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 AiGatewayBudgetInstanceResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceResource aiGatewayBudgetInstanceResource = + (AiGatewayBudgetInstanceResource) o; + return Objects.equals(this.attributes, aiGatewayBudgetInstanceResource.attributes) + && Objects.equals(this.id, aiGatewayBudgetInstanceResource.id) + && Objects.equals(this.type, aiGatewayBudgetInstanceResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResponse.java new file mode 100644 index 00000000000..27ca3d3909c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one budget instance counter. */ +@JsonPropertyOrder({AiGatewayBudgetInstanceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstanceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetInstanceResource data; + + public AiGatewayBudgetInstanceResponse() {} + + @JsonCreator + public AiGatewayBudgetInstanceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayBudgetInstanceResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetInstanceResponse data(AiGatewayBudgetInstanceResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * One budget instance counter. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstanceResource getData() { + return data; + } + + public void setData(AiGatewayBudgetInstanceResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetInstanceResponse + */ + @JsonAnySetter + public AiGatewayBudgetInstanceResponse 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 AiGatewayBudgetInstanceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstanceResponse aiGatewayBudgetInstanceResponse = + (AiGatewayBudgetInstanceResponse) o; + return Objects.equals(this.data, aiGatewayBudgetInstanceResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetInstanceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstanceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceSort.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceSort.java new file mode 100644 index 00000000000..2a7d2534fe8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceSort.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; + +/** Sort order for budget instance counters. */ +@JsonSerialize(using = AiGatewayBudgetInstanceSort.AiGatewayBudgetInstanceSortSerializer.class) +public class AiGatewayBudgetInstanceSort extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("spend_desc", "spend_asc", "key_asc")); + + public static final AiGatewayBudgetInstanceSort SPEND_DESC = + new AiGatewayBudgetInstanceSort("spend_desc"); + public static final AiGatewayBudgetInstanceSort SPEND_ASC = + new AiGatewayBudgetInstanceSort("spend_asc"); + public static final AiGatewayBudgetInstanceSort KEY_ASC = + new AiGatewayBudgetInstanceSort("key_asc"); + + AiGatewayBudgetInstanceSort(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetInstanceSortSerializer + extends StdSerializer { + public AiGatewayBudgetInstanceSortSerializer(Class t) { + super(t); + } + + public AiGatewayBudgetInstanceSortSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetInstanceSort value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetInstanceSort fromValue(String value) { + return new AiGatewayBudgetInstanceSort(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceType.java new file mode 100644 index 00000000000..4b3cc9d737a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstanceType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** Budget instance counter resource type. */ +@JsonSerialize(using = AiGatewayBudgetInstanceType.AiGatewayBudgetInstanceTypeSerializer.class) +public class AiGatewayBudgetInstanceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("budget-instances")); + + public static final AiGatewayBudgetInstanceType BUDGET_INSTANCES = + new AiGatewayBudgetInstanceType("budget-instances"); + + AiGatewayBudgetInstanceType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetInstanceTypeSerializer + extends StdSerializer { + public AiGatewayBudgetInstanceTypeSerializer(Class t) { + super(t); + } + + public AiGatewayBudgetInstanceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetInstanceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetInstanceType fromValue(String value) { + return new AiGatewayBudgetInstanceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryAttributes.java new file mode 100644 index 00000000000..7f80befc248 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryAttributes.java @@ -0,0 +1,349 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Aggregate state across budget instance counters. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_BUDGET_ID, + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_EXCEEDED_CAPACITY_COUNT, + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_INSTANCE_COUNT, + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_OVER_WARNING_THRESHOLD_COUNT, + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_RESTRICTED_DETAILS, + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_TOTAL_SPEND_MICROCENTS, + AiGatewayBudgetInstancesSummaryAttributes.JSON_PROPERTY_WINDOW_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstancesSummaryAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUDGET_ID = "budget_id"; + private UUID budgetId; + + public static final String JSON_PROPERTY_EXCEEDED_CAPACITY_COUNT = "exceeded_capacity_count"; + private Long exceededCapacityCount; + + public static final String JSON_PROPERTY_INSTANCE_COUNT = "instance_count"; + private Long instanceCount; + + public static final String JSON_PROPERTY_OVER_WARNING_THRESHOLD_COUNT = + "over_warning_threshold_count"; + private Long overWarningThresholdCount; + + public static final String JSON_PROPERTY_RESTRICTED_DETAILS = "restricted_details"; + private Boolean restrictedDetails; + + public static final String JSON_PROPERTY_TOTAL_SPEND_MICROCENTS = "total_spend_microcents"; + private Long totalSpendMicrocents; + + public static final String JSON_PROPERTY_WINDOW_START = "window_start"; + private OffsetDateTime windowStart; + + public AiGatewayBudgetInstancesSummaryAttributes() {} + + @JsonCreator + public AiGatewayBudgetInstancesSummaryAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_BUDGET_ID) UUID budgetId, + @JsonProperty(required = true, value = JSON_PROPERTY_EXCEEDED_CAPACITY_COUNT) + Long exceededCapacityCount, + @JsonProperty(required = true, value = JSON_PROPERTY_INSTANCE_COUNT) Long instanceCount, + @JsonProperty(required = true, value = JSON_PROPERTY_OVER_WARNING_THRESHOLD_COUNT) + Long overWarningThresholdCount, + @JsonProperty(required = true, value = JSON_PROPERTY_RESTRICTED_DETAILS) + Boolean restrictedDetails, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_SPEND_MICROCENTS) + Long totalSpendMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_START) + OffsetDateTime windowStart) { + this.budgetId = budgetId; + this.exceededCapacityCount = exceededCapacityCount; + this.instanceCount = instanceCount; + this.overWarningThresholdCount = overWarningThresholdCount; + this.restrictedDetails = restrictedDetails; + this.totalSpendMicrocents = totalSpendMicrocents; + this.windowStart = windowStart; + } + + public AiGatewayBudgetInstancesSummaryAttributes budgetId(UUID budgetId) { + this.budgetId = budgetId; + return this; + } + + /** + * Budget identifier. + * + * @return budgetId + */ + @JsonProperty(JSON_PROPERTY_BUDGET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getBudgetId() { + return budgetId; + } + + public void setBudgetId(UUID budgetId) { + this.budgetId = budgetId; + } + + public AiGatewayBudgetInstancesSummaryAttributes exceededCapacityCount( + Long exceededCapacityCount) { + this.exceededCapacityCount = exceededCapacityCount; + return this; + } + + /** + * Number of instances at or above capacity. + * + * @return exceededCapacityCount + */ + @JsonProperty(JSON_PROPERTY_EXCEEDED_CAPACITY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getExceededCapacityCount() { + return exceededCapacityCount; + } + + public void setExceededCapacityCount(Long exceededCapacityCount) { + this.exceededCapacityCount = exceededCapacityCount; + } + + public AiGatewayBudgetInstancesSummaryAttributes instanceCount(Long instanceCount) { + this.instanceCount = instanceCount; + return this; + } + + /** + * Number of instance counters. + * + * @return instanceCount + */ + @JsonProperty(JSON_PROPERTY_INSTANCE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getInstanceCount() { + return instanceCount; + } + + public void setInstanceCount(Long instanceCount) { + this.instanceCount = instanceCount; + } + + public AiGatewayBudgetInstancesSummaryAttributes overWarningThresholdCount( + Long overWarningThresholdCount) { + this.overWarningThresholdCount = overWarningThresholdCount; + return this; + } + + /** + * Number of instances at or above the warning threshold. + * + * @return overWarningThresholdCount + */ + @JsonProperty(JSON_PROPERTY_OVER_WARNING_THRESHOLD_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOverWarningThresholdCount() { + return overWarningThresholdCount; + } + + public void setOverWarningThresholdCount(Long overWarningThresholdCount) { + this.overWarningThresholdCount = overWarningThresholdCount; + } + + public AiGatewayBudgetInstancesSummaryAttributes restrictedDetails(Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + return this; + } + + /** + * Whether instances were withheld because their provider or model is hidden. Summary counts and + * totals exclude those instances. + * + * @return restrictedDetails + */ + @JsonProperty(JSON_PROPERTY_RESTRICTED_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRestrictedDetails() { + return restrictedDetails; + } + + public void setRestrictedDetails(Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + } + + public AiGatewayBudgetInstancesSummaryAttributes totalSpendMicrocents(Long totalSpendMicrocents) { + this.totalSpendMicrocents = totalSpendMicrocents; + return this; + } + + /** + * Spend summed across all instances, in microcents. + * + * @return totalSpendMicrocents + */ + @JsonProperty(JSON_PROPERTY_TOTAL_SPEND_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalSpendMicrocents() { + return totalSpendMicrocents; + } + + public void setTotalSpendMicrocents(Long totalSpendMicrocents) { + this.totalSpendMicrocents = totalSpendMicrocents; + } + + public AiGatewayBudgetInstancesSummaryAttributes windowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + return this; + } + + /** + * Start of the accounting window. + * + * @return windowStart + */ + @JsonProperty(JSON_PROPERTY_WINDOW_START) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowStart() { + return windowStart; + } + + public void setWindowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + } + + /** + * 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 AiGatewayBudgetInstancesSummaryAttributes + */ + @JsonAnySetter + public AiGatewayBudgetInstancesSummaryAttributes 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 AiGatewayBudgetInstancesSummaryAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstancesSummaryAttributes aiGatewayBudgetInstancesSummaryAttributes = + (AiGatewayBudgetInstancesSummaryAttributes) o; + return Objects.equals(this.budgetId, aiGatewayBudgetInstancesSummaryAttributes.budgetId) + && Objects.equals( + this.exceededCapacityCount, + aiGatewayBudgetInstancesSummaryAttributes.exceededCapacityCount) + && Objects.equals( + this.instanceCount, aiGatewayBudgetInstancesSummaryAttributes.instanceCount) + && Objects.equals( + this.overWarningThresholdCount, + aiGatewayBudgetInstancesSummaryAttributes.overWarningThresholdCount) + && Objects.equals( + this.restrictedDetails, aiGatewayBudgetInstancesSummaryAttributes.restrictedDetails) + && Objects.equals( + this.totalSpendMicrocents, + aiGatewayBudgetInstancesSummaryAttributes.totalSpendMicrocents) + && Objects.equals(this.windowStart, aiGatewayBudgetInstancesSummaryAttributes.windowStart) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstancesSummaryAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + budgetId, + exceededCapacityCount, + instanceCount, + overWarningThresholdCount, + restrictedDetails, + totalSpendMicrocents, + windowStart, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstancesSummaryAttributes {\n"); + sb.append(" budgetId: ").append(toIndentedString(budgetId)).append("\n"); + sb.append(" exceededCapacityCount: ") + .append(toIndentedString(exceededCapacityCount)) + .append("\n"); + sb.append(" instanceCount: ").append(toIndentedString(instanceCount)).append("\n"); + sb.append(" overWarningThresholdCount: ") + .append(toIndentedString(overWarningThresholdCount)) + .append("\n"); + sb.append(" restrictedDetails: ").append(toIndentedString(restrictedDetails)).append("\n"); + sb.append(" totalSpendMicrocents: ") + .append(toIndentedString(totalSpendMicrocents)) + .append("\n"); + sb.append(" windowStart: ").append(toIndentedString(windowStart)).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/AiGatewayBudgetInstancesSummaryResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResource.java new file mode 100644 index 00000000000..d0f939730f7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResource.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Aggregate state across budget instance counters. */ +@JsonPropertyOrder({ + AiGatewayBudgetInstancesSummaryResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetInstancesSummaryResource.JSON_PROPERTY_ID, + AiGatewayBudgetInstancesSummaryResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstancesSummaryResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetInstancesSummaryAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetInstancesSummaryType type; + + public AiGatewayBudgetInstancesSummaryResource() {} + + @JsonCreator + public AiGatewayBudgetInstancesSummaryResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetInstancesSummaryAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayBudgetInstancesSummaryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetInstancesSummaryResource attributes( + AiGatewayBudgetInstancesSummaryAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Aggregate state across budget instance counters. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstancesSummaryAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetInstancesSummaryAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetInstancesSummaryResource id(UUID id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayBudgetInstancesSummaryResource type(AiGatewayBudgetInstancesSummaryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Budget instance summary resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstancesSummaryType getType() { + return type; + } + + public void setType(AiGatewayBudgetInstancesSummaryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetInstancesSummaryResource + */ + @JsonAnySetter + public AiGatewayBudgetInstancesSummaryResource 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 AiGatewayBudgetInstancesSummaryResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstancesSummaryResource aiGatewayBudgetInstancesSummaryResource = + (AiGatewayBudgetInstancesSummaryResource) o; + return Objects.equals(this.attributes, aiGatewayBudgetInstancesSummaryResource.attributes) + && Objects.equals(this.id, aiGatewayBudgetInstancesSummaryResource.id) + && Objects.equals(this.type, aiGatewayBudgetInstancesSummaryResource.type) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstancesSummaryResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstancesSummaryResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResponse.java new file mode 100644 index 00000000000..38e6852cb4f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryResponse.java @@ -0,0 +1,153 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing aggregate state across budget instance counters. */ +@JsonPropertyOrder({AiGatewayBudgetInstancesSummaryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetInstancesSummaryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetInstancesSummaryResource data; + + public AiGatewayBudgetInstancesSummaryResponse() {} + + @JsonCreator + public AiGatewayBudgetInstancesSummaryResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayBudgetInstancesSummaryResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetInstancesSummaryResponse data( + AiGatewayBudgetInstancesSummaryResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Aggregate state across budget instance counters. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetInstancesSummaryResource getData() { + return data; + } + + public void setData(AiGatewayBudgetInstancesSummaryResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetInstancesSummaryResponse + */ + @JsonAnySetter + public AiGatewayBudgetInstancesSummaryResponse 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 AiGatewayBudgetInstancesSummaryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetInstancesSummaryResponse aiGatewayBudgetInstancesSummaryResponse = + (AiGatewayBudgetInstancesSummaryResponse) o; + return Objects.equals(this.data, aiGatewayBudgetInstancesSummaryResponse.data) + && Objects.equals( + this.additionalProperties, + aiGatewayBudgetInstancesSummaryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetInstancesSummaryResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryType.java new file mode 100644 index 00000000000..73878b56212 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetInstancesSummaryType.java @@ -0,0 +1,59 @@ +/* + * 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; + +/** Budget instance summary resource type. */ +@JsonSerialize( + using = AiGatewayBudgetInstancesSummaryType.AiGatewayBudgetInstancesSummaryTypeSerializer.class) +public class AiGatewayBudgetInstancesSummaryType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("budget-instances-summary")); + + public static final AiGatewayBudgetInstancesSummaryType BUDGET_INSTANCES_SUMMARY = + new AiGatewayBudgetInstancesSummaryType("budget-instances-summary"); + + AiGatewayBudgetInstancesSummaryType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetInstancesSummaryTypeSerializer + extends StdSerializer { + public AiGatewayBudgetInstancesSummaryTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayBudgetInstancesSummaryTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetInstancesSummaryType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetInstancesSummaryType fromValue(String value) { + return new AiGatewayBudgetInstancesSummaryType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListAttributes.java new file mode 100644 index 00000000000..e239cabacdb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListAttributes.java @@ -0,0 +1,733 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Budget configuration including spend and capacity for the active accounting window. */ +@JsonPropertyOrder({ + AiGatewayBudgetListAttributes.JSON_PROPERTY_CAPACITY_MICROCENTS, + AiGatewayBudgetListAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayBudgetListAttributes.JSON_PROPERTY_CREATED_BY, + AiGatewayBudgetListAttributes.JSON_PROPERTY_CURRENT_PERIOD_CAPACITY_MICROCENTS, + AiGatewayBudgetListAttributes.JSON_PROPERTY_CURRENT_SPEND_MICROCENTS, + AiGatewayBudgetListAttributes.JSON_PROPERTY_ENABLED, + AiGatewayBudgetListAttributes.JSON_PROPERTY_ENFORCEMENT, + AiGatewayBudgetListAttributes.JSON_PROPERTY_MONITOR_ID, + AiGatewayBudgetListAttributes.JSON_PROPERTY_NAME, + AiGatewayBudgetListAttributes.JSON_PROPERTY_SCOPE_RESTRICTED, + AiGatewayBudgetListAttributes.JSON_PROPERTY_SELECTOR, + AiGatewayBudgetListAttributes.JSON_PROPERTY_TAGS, + AiGatewayBudgetListAttributes.JSON_PROPERTY_TEAM_ID, + AiGatewayBudgetListAttributes.JSON_PROPERTY_UPDATED_AT, + AiGatewayBudgetListAttributes.JSON_PROPERTY_USER_ID, + AiGatewayBudgetListAttributes.JSON_PROPERTY_WARNING_THRESHOLD, + AiGatewayBudgetListAttributes.JSON_PROPERTY_WINDOW_END, + AiGatewayBudgetListAttributes.JSON_PROPERTY_WINDOW_POLICY, + AiGatewayBudgetListAttributes.JSON_PROPERTY_WINDOW_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetListAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CAPACITY_MICROCENTS = "capacity_microcents"; + private Long capacityMicrocents; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_CURRENT_PERIOD_CAPACITY_MICROCENTS = + "current_period_capacity_microcents"; + private Long currentPeriodCapacityMicrocents; + + public static final String JSON_PROPERTY_CURRENT_SPEND_MICROCENTS = "current_spend_microcents"; + private Long currentSpendMicrocents; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ENFORCEMENT = "enforcement"; + private AiGatewayBudgetEnforcement enforcement; + + public static final String JSON_PROPERTY_MONITOR_ID = "monitor_id"; + private Long monitorId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SCOPE_RESTRICTED = "scope_restricted"; + private Boolean scopeRestricted; + + public static final String JSON_PROPERTY_SELECTOR = "selector"; + private JsonNullable> selector = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap(); + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private UUID teamId; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private UUID userId; + + public static final String JSON_PROPERTY_WARNING_THRESHOLD = "warning_threshold"; + private Double warningThreshold; + + public static final String JSON_PROPERTY_WINDOW_END = "window_end"; + private OffsetDateTime windowEnd; + + public static final String JSON_PROPERTY_WINDOW_POLICY = "window_policy"; + private AiGatewayBudgetWindowPolicy windowPolicy; + + public static final String JSON_PROPERTY_WINDOW_START = "window_start"; + private OffsetDateTime windowStart; + + public AiGatewayBudgetListAttributes() {} + + @JsonCreator + public AiGatewayBudgetListAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CAPACITY_MICROCENTS) + Long capacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_CURRENT_PERIOD_CAPACITY_MICROCENTS) + Long currentPeriodCapacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_CURRENT_SPEND_MICROCENTS) + Long currentSpendMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_ENFORCEMENT) + AiGatewayBudgetEnforcement enforcement, + @JsonProperty(required = true, value = JSON_PROPERTY_MONITOR_ID) Long monitorId, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE_RESTRICTED) + Boolean scopeRestricted, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) Map tags, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_WARNING_THRESHOLD) + Double warningThreshold, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_END) OffsetDateTime windowEnd, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_POLICY) + AiGatewayBudgetWindowPolicy windowPolicy, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_START) + OffsetDateTime windowStart) { + this.capacityMicrocents = capacityMicrocents; + this.createdAt = createdAt; + this.createdBy = createdBy; + this.currentPeriodCapacityMicrocents = currentPeriodCapacityMicrocents; + this.currentSpendMicrocents = currentSpendMicrocents; + this.enabled = enabled; + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + this.monitorId = monitorId; + if (monitorId != null) {} + this.name = name; + this.scopeRestricted = scopeRestricted; + this.tags = tags; + this.updatedAt = updatedAt; + this.warningThreshold = warningThreshold; + this.windowEnd = windowEnd; + this.windowPolicy = windowPolicy; + this.unparsed |= !windowPolicy.isValid(); + this.windowStart = windowStart; + } + + public AiGatewayBudgetListAttributes capacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + return this; + } + + /** + * Budget capacity in microcents. + * + * @return capacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCapacityMicrocents() { + return capacityMicrocents; + } + + public void setCapacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + } + + public AiGatewayBudgetListAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayBudgetListAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Identifier of the principal that created the resource. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public AiGatewayBudgetListAttributes currentPeriodCapacityMicrocents( + Long currentPeriodCapacityMicrocents) { + this.currentPeriodCapacityMicrocents = currentPeriodCapacityMicrocents; + return this; + } + + /** + * Capacity enforced for the active window, in microcents. + * + * @return currentPeriodCapacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_CURRENT_PERIOD_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCurrentPeriodCapacityMicrocents() { + return currentPeriodCapacityMicrocents; + } + + public void setCurrentPeriodCapacityMicrocents(Long currentPeriodCapacityMicrocents) { + this.currentPeriodCapacityMicrocents = currentPeriodCapacityMicrocents; + } + + public AiGatewayBudgetListAttributes currentSpendMicrocents(Long currentSpendMicrocents) { + this.currentSpendMicrocents = currentSpendMicrocents; + return this; + } + + /** + * Spend currently counted against the active window, in microcents. + * + * @return currentSpendMicrocents + */ + @JsonProperty(JSON_PROPERTY_CURRENT_SPEND_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCurrentSpendMicrocents() { + return currentSpendMicrocents; + } + + public void setCurrentSpendMicrocents(Long currentSpendMicrocents) { + this.currentSpendMicrocents = currentSpendMicrocents; + } + + public AiGatewayBudgetListAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the resource is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public AiGatewayBudgetListAttributes enforcement(AiGatewayBudgetEnforcement enforcement) { + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + return this; + } + + /** + * Action taken when spend exceeds the budget. + * + * @return enforcement + */ + @JsonProperty(JSON_PROPERTY_ENFORCEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetEnforcement getEnforcement() { + return enforcement; + } + + public void setEnforcement(AiGatewayBudgetEnforcement enforcement) { + if (!enforcement.isValid()) { + this.unparsed = true; + } + this.enforcement = enforcement; + } + + public AiGatewayBudgetListAttributes monitorId(Long monitorId) { + this.monitorId = monitorId; + if (monitorId != null) {} + return this; + } + + /** + * Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or + * failed. + * + * @return monitorId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getMonitorId() { + return monitorId; + } + + public void setMonitorId(Long monitorId) { + this.monitorId = monitorId; + } + + public AiGatewayBudgetListAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayBudgetListAttributes scopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + return this; + } + + /** + * Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an + * unrelated update to preserve their saved values. + * + * @return scopeRestricted + */ + @JsonProperty(JSON_PROPERTY_SCOPE_RESTRICTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getScopeRestricted() { + return scopeRestricted; + } + + public void setScopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + } + + public AiGatewayBudgetListAttributes selector(List selector) { + this.selector = JsonNullable.>of(selector); + return this; + } + + public AiGatewayBudgetListAttributes addSelectorItem(AiGatewayBudgetSelectorEntry selectorItem) { + if (this.selector == null || !this.selector.isPresent()) { + this.selector = JsonNullable.>of(new ArrayList<>()); + } + try { + this.selector.get().add(selectorItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Dimension rules for a template budget. A nonempty selector creates independent counters for + * matched instances. Omit or pass an empty selector for a legacy fixed-scope budget. + * + * @return selector + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getSelector() { + return selector.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SELECTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getSelector_JsonNullable() { + return selector; + } + + @JsonProperty(JSON_PROPERTY_SELECTOR) + public void setSelector_JsonNullable(JsonNullable> selector) { + this.selector = selector; + } + + public void setSelector(List selector) { + this.selector = JsonNullable.>of(selector); + } + + public AiGatewayBudgetListAttributes tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayBudgetListAttributes putTagsItem(String key, String tagsItem) { + this.tags.put(key, tagsItem); + return this; + } + + /** + * Request tags that must match for the budget to apply. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayBudgetListAttributes teamId(UUID teamId) { + this.teamId = teamId; + return this; + } + + /** + * Optional Datadog Team scope. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTeamId() { + return teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = teamId; + } + + public AiGatewayBudgetListAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public AiGatewayBudgetListAttributes userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * User scope. Omitted when the budget is not user-scoped. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + public AiGatewayBudgetListAttributes warningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + return this; + } + + /** + * Fraction of capacity at which to issue a warning. + * + * @return warningThreshold + */ + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getWarningThreshold() { + return warningThreshold; + } + + public void setWarningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + } + + public AiGatewayBudgetListAttributes windowEnd(OffsetDateTime windowEnd) { + this.windowEnd = windowEnd; + return this; + } + + /** + * End of the active accounting window. + * + * @return windowEnd + */ + @JsonProperty(JSON_PROPERTY_WINDOW_END) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowEnd() { + return windowEnd; + } + + public void setWindowEnd(OffsetDateTime windowEnd) { + this.windowEnd = windowEnd; + } + + public AiGatewayBudgetListAttributes windowPolicy(AiGatewayBudgetWindowPolicy windowPolicy) { + this.windowPolicy = windowPolicy; + this.unparsed |= !windowPolicy.isValid(); + return this; + } + + /** + * UTC accounting period for a budget. + * + * @return windowPolicy + */ + @JsonProperty(JSON_PROPERTY_WINDOW_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetWindowPolicy getWindowPolicy() { + return windowPolicy; + } + + public void setWindowPolicy(AiGatewayBudgetWindowPolicy windowPolicy) { + if (!windowPolicy.isValid()) { + this.unparsed = true; + } + this.windowPolicy = windowPolicy; + } + + public AiGatewayBudgetListAttributes windowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + return this; + } + + /** + * Start of the active accounting window. + * + * @return windowStart + */ + @JsonProperty(JSON_PROPERTY_WINDOW_START) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowStart() { + return windowStart; + } + + public void setWindowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + } + + /** + * 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 AiGatewayBudgetListAttributes + */ + @JsonAnySetter + public AiGatewayBudgetListAttributes 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 AiGatewayBudgetListAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetListAttributes aiGatewayBudgetListAttributes = (AiGatewayBudgetListAttributes) o; + return Objects.equals(this.capacityMicrocents, aiGatewayBudgetListAttributes.capacityMicrocents) + && Objects.equals(this.createdAt, aiGatewayBudgetListAttributes.createdAt) + && Objects.equals(this.createdBy, aiGatewayBudgetListAttributes.createdBy) + && Objects.equals( + this.currentPeriodCapacityMicrocents, + aiGatewayBudgetListAttributes.currentPeriodCapacityMicrocents) + && Objects.equals( + this.currentSpendMicrocents, aiGatewayBudgetListAttributes.currentSpendMicrocents) + && Objects.equals(this.enabled, aiGatewayBudgetListAttributes.enabled) + && Objects.equals(this.enforcement, aiGatewayBudgetListAttributes.enforcement) + && Objects.equals(this.monitorId, aiGatewayBudgetListAttributes.monitorId) + && Objects.equals(this.name, aiGatewayBudgetListAttributes.name) + && Objects.equals(this.scopeRestricted, aiGatewayBudgetListAttributes.scopeRestricted) + && Objects.equals(this.selector, aiGatewayBudgetListAttributes.selector) + && Objects.equals(this.tags, aiGatewayBudgetListAttributes.tags) + && Objects.equals(this.teamId, aiGatewayBudgetListAttributes.teamId) + && Objects.equals(this.updatedAt, aiGatewayBudgetListAttributes.updatedAt) + && Objects.equals(this.userId, aiGatewayBudgetListAttributes.userId) + && Objects.equals(this.warningThreshold, aiGatewayBudgetListAttributes.warningThreshold) + && Objects.equals(this.windowEnd, aiGatewayBudgetListAttributes.windowEnd) + && Objects.equals(this.windowPolicy, aiGatewayBudgetListAttributes.windowPolicy) + && Objects.equals(this.windowStart, aiGatewayBudgetListAttributes.windowStart) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetListAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + capacityMicrocents, + createdAt, + createdBy, + currentPeriodCapacityMicrocents, + currentSpendMicrocents, + enabled, + enforcement, + monitorId, + name, + scopeRestricted, + selector, + tags, + teamId, + updatedAt, + userId, + warningThreshold, + windowEnd, + windowPolicy, + windowStart, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetListAttributes {\n"); + sb.append(" capacityMicrocents: ").append(toIndentedString(capacityMicrocents)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" currentPeriodCapacityMicrocents: ") + .append(toIndentedString(currentPeriodCapacityMicrocents)) + .append("\n"); + sb.append(" currentSpendMicrocents: ") + .append(toIndentedString(currentSpendMicrocents)) + .append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" enforcement: ").append(toIndentedString(enforcement)).append("\n"); + sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopeRestricted: ").append(toIndentedString(scopeRestricted)).append("\n"); + sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" warningThreshold: ").append(toIndentedString(warningThreshold)).append("\n"); + sb.append(" windowEnd: ").append(toIndentedString(windowEnd)).append("\n"); + sb.append(" windowPolicy: ").append(toIndentedString(windowPolicy)).append("\n"); + sb.append(" windowStart: ").append(toIndentedString(windowStart)).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/AiGatewayBudgetListResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResource.java new file mode 100644 index 00000000000..84d2f46e943 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResource.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Budget resource including active-window spend and capacity. */ +@JsonPropertyOrder({ + AiGatewayBudgetListResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetListResource.JSON_PROPERTY_ID, + AiGatewayBudgetListResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetListResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetListAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetType type; + + public AiGatewayBudgetListResource() {} + + @JsonCreator + public AiGatewayBudgetListResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetListAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetListResource attributes(AiGatewayBudgetListAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Budget configuration including spend and capacity for the active accounting window. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetListAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetListAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetListResource id(UUID id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayBudgetListResource type(AiGatewayBudgetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway budget resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetType getType() { + return type; + } + + public void setType(AiGatewayBudgetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetListResource + */ + @JsonAnySetter + public AiGatewayBudgetListResource 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 AiGatewayBudgetListResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetListResource aiGatewayBudgetListResource = (AiGatewayBudgetListResource) o; + return Objects.equals(this.attributes, aiGatewayBudgetListResource.attributes) + && Objects.equals(this.id, aiGatewayBudgetListResource.id) + && Objects.equals(this.type, aiGatewayBudgetListResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetListResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetListResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResponse.java new file mode 100644 index 00000000000..b04c084df3d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetListResponse.java @@ -0,0 +1,164 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing AI Gateway budgets. */ +@JsonPropertyOrder({AiGatewayBudgetListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayBudgetListResponse() {} + + @JsonCreator + public AiGatewayBudgetListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayBudgetListResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayBudgetListResponse data(List data) { + this.data = data; + for (AiGatewayBudgetListResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayBudgetListResponse addDataItem(AiGatewayBudgetListResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayBudgetListResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayBudgetListResponse + */ + @JsonAnySetter + public AiGatewayBudgetListResponse 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 AiGatewayBudgetListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetListResponse aiGatewayBudgetListResponse = (AiGatewayBudgetListResponse) o; + return Objects.equals(this.data, aiGatewayBudgetListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodAttributes.java new file mode 100644 index 00000000000..6d63192d2d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodAttributes.java @@ -0,0 +1,347 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Accounting state enforced for an AI Gateway budget's active period. */ +@JsonPropertyOrder({ + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_BUDGET_ID, + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_CURRENT_SPEND_MICROCENTS, + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_DEFAULT_CAPACITY_MICROCENTS, + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS, + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_MONITOR_ID, + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_WINDOW_END, + AiGatewayBudgetPeriodAttributes.JSON_PROPERTY_WINDOW_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetPeriodAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUDGET_ID = "budget_id"; + private UUID budgetId; + + public static final String JSON_PROPERTY_CURRENT_SPEND_MICROCENTS = "current_spend_microcents"; + private Long currentSpendMicrocents; + + public static final String JSON_PROPERTY_DEFAULT_CAPACITY_MICROCENTS = + "default_capacity_microcents"; + private Long defaultCapacityMicrocents; + + public static final String JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS = + "effective_capacity_microcents"; + private Long effectiveCapacityMicrocents; + + public static final String JSON_PROPERTY_MONITOR_ID = "monitor_id"; + private Long monitorId; + + public static final String JSON_PROPERTY_WINDOW_END = "window_end"; + private OffsetDateTime windowEnd; + + public static final String JSON_PROPERTY_WINDOW_START = "window_start"; + private OffsetDateTime windowStart; + + public AiGatewayBudgetPeriodAttributes() {} + + @JsonCreator + public AiGatewayBudgetPeriodAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_BUDGET_ID) UUID budgetId, + @JsonProperty(required = true, value = JSON_PROPERTY_CURRENT_SPEND_MICROCENTS) + Long currentSpendMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFAULT_CAPACITY_MICROCENTS) + Long defaultCapacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS) + Long effectiveCapacityMicrocents, + @JsonProperty(required = true, value = JSON_PROPERTY_MONITOR_ID) Long monitorId, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_END) OffsetDateTime windowEnd, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_START) + OffsetDateTime windowStart) { + this.budgetId = budgetId; + this.currentSpendMicrocents = currentSpendMicrocents; + this.defaultCapacityMicrocents = defaultCapacityMicrocents; + this.effectiveCapacityMicrocents = effectiveCapacityMicrocents; + this.monitorId = monitorId; + if (monitorId != null) {} + this.windowEnd = windowEnd; + this.windowStart = windowStart; + } + + public AiGatewayBudgetPeriodAttributes budgetId(UUID budgetId) { + this.budgetId = budgetId; + return this; + } + + /** + * Budget resource identifier. + * + * @return budgetId + */ + @JsonProperty(JSON_PROPERTY_BUDGET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getBudgetId() { + return budgetId; + } + + public void setBudgetId(UUID budgetId) { + this.budgetId = budgetId; + } + + public AiGatewayBudgetPeriodAttributes currentSpendMicrocents(Long currentSpendMicrocents) { + this.currentSpendMicrocents = currentSpendMicrocents; + return this; + } + + /** + * Spend currently counted against the active accounting period. + * + * @return currentSpendMicrocents + */ + @JsonProperty(JSON_PROPERTY_CURRENT_SPEND_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCurrentSpendMicrocents() { + return currentSpendMicrocents; + } + + public void setCurrentSpendMicrocents(Long currentSpendMicrocents) { + this.currentSpendMicrocents = currentSpendMicrocents; + } + + public AiGatewayBudgetPeriodAttributes defaultCapacityMicrocents(Long defaultCapacityMicrocents) { + this.defaultCapacityMicrocents = defaultCapacityMicrocents; + return this; + } + + /** + * Capacity that new accounting periods inherit from the budget definition. + * + * @return defaultCapacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getDefaultCapacityMicrocents() { + return defaultCapacityMicrocents; + } + + public void setDefaultCapacityMicrocents(Long defaultCapacityMicrocents) { + this.defaultCapacityMicrocents = defaultCapacityMicrocents; + } + + public AiGatewayBudgetPeriodAttributes effectiveCapacityMicrocents( + Long effectiveCapacityMicrocents) { + this.effectiveCapacityMicrocents = effectiveCapacityMicrocents; + return this; + } + + /** + * Capacity enforced for the active accounting period. + * + * @return effectiveCapacityMicrocents + */ + @JsonProperty(JSON_PROPERTY_EFFECTIVE_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getEffectiveCapacityMicrocents() { + return effectiveCapacityMicrocents; + } + + public void setEffectiveCapacityMicrocents(Long effectiveCapacityMicrocents) { + this.effectiveCapacityMicrocents = effectiveCapacityMicrocents; + } + + public AiGatewayBudgetPeriodAttributes monitorId(Long monitorId) { + this.monitorId = monitorId; + if (monitorId != null) {} + return this; + } + + /** + * Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or + * failed. + * + * @return monitorId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getMonitorId() { + return monitorId; + } + + public void setMonitorId(Long monitorId) { + this.monitorId = monitorId; + } + + public AiGatewayBudgetPeriodAttributes windowEnd(OffsetDateTime windowEnd) { + this.windowEnd = windowEnd; + return this; + } + + /** + * End of the active accounting window. + * + * @return windowEnd + */ + @JsonProperty(JSON_PROPERTY_WINDOW_END) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowEnd() { + return windowEnd; + } + + public void setWindowEnd(OffsetDateTime windowEnd) { + this.windowEnd = windowEnd; + } + + public AiGatewayBudgetPeriodAttributes windowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + return this; + } + + /** + * Start of the active accounting window. + * + * @return windowStart + */ + @JsonProperty(JSON_PROPERTY_WINDOW_START) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getWindowStart() { + return windowStart; + } + + public void setWindowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + } + + /** + * 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 AiGatewayBudgetPeriodAttributes + */ + @JsonAnySetter + public AiGatewayBudgetPeriodAttributes 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 AiGatewayBudgetPeriodAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetPeriodAttributes aiGatewayBudgetPeriodAttributes = + (AiGatewayBudgetPeriodAttributes) o; + return Objects.equals(this.budgetId, aiGatewayBudgetPeriodAttributes.budgetId) + && Objects.equals( + this.currentSpendMicrocents, aiGatewayBudgetPeriodAttributes.currentSpendMicrocents) + && Objects.equals( + this.defaultCapacityMicrocents, + aiGatewayBudgetPeriodAttributes.defaultCapacityMicrocents) + && Objects.equals( + this.effectiveCapacityMicrocents, + aiGatewayBudgetPeriodAttributes.effectiveCapacityMicrocents) + && Objects.equals(this.monitorId, aiGatewayBudgetPeriodAttributes.monitorId) + && Objects.equals(this.windowEnd, aiGatewayBudgetPeriodAttributes.windowEnd) + && Objects.equals(this.windowStart, aiGatewayBudgetPeriodAttributes.windowStart) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetPeriodAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + budgetId, + currentSpendMicrocents, + defaultCapacityMicrocents, + effectiveCapacityMicrocents, + monitorId, + windowEnd, + windowStart, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetPeriodAttributes {\n"); + sb.append(" budgetId: ").append(toIndentedString(budgetId)).append("\n"); + sb.append(" currentSpendMicrocents: ") + .append(toIndentedString(currentSpendMicrocents)) + .append("\n"); + sb.append(" defaultCapacityMicrocents: ") + .append(toIndentedString(defaultCapacityMicrocents)) + .append("\n"); + sb.append(" effectiveCapacityMicrocents: ") + .append(toIndentedString(effectiveCapacityMicrocents)) + .append("\n"); + sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); + sb.append(" windowEnd: ").append(toIndentedString(windowEnd)).append("\n"); + sb.append(" windowStart: ").append(toIndentedString(windowStart)).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/AiGatewayBudgetPeriodResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResource.java new file mode 100644 index 00000000000..6f5946e73a7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResource.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Active accounting period for an AI Gateway budget. */ +@JsonPropertyOrder({ + AiGatewayBudgetPeriodResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetPeriodResource.JSON_PROPERTY_ID, + AiGatewayBudgetPeriodResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetPeriodResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetPeriodAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetPeriodType type; + + public AiGatewayBudgetPeriodResource() {} + + @JsonCreator + public AiGatewayBudgetPeriodResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetPeriodAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetPeriodType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetPeriodResource attributes(AiGatewayBudgetPeriodAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Accounting state enforced for an AI Gateway budget's active period. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetPeriodAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetPeriodAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetPeriodResource id(UUID id) { + this.id = id; + return this; + } + + /** + * Budget identifier associated with this active period. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayBudgetPeriodResource type(AiGatewayBudgetPeriodType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway budget period resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetPeriodType getType() { + return type; + } + + public void setType(AiGatewayBudgetPeriodType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetPeriodResource + */ + @JsonAnySetter + public AiGatewayBudgetPeriodResource 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 AiGatewayBudgetPeriodResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetPeriodResource aiGatewayBudgetPeriodResource = (AiGatewayBudgetPeriodResource) o; + return Objects.equals(this.attributes, aiGatewayBudgetPeriodResource.attributes) + && Objects.equals(this.id, aiGatewayBudgetPeriodResource.id) + && Objects.equals(this.type, aiGatewayBudgetPeriodResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetPeriodResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetPeriodResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResponse.java new file mode 100644 index 00000000000..d5848f7a3be --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing an AI Gateway budget's active period. */ +@JsonPropertyOrder({AiGatewayBudgetPeriodResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetPeriodResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetPeriodResource data; + + public AiGatewayBudgetPeriodResponse() {} + + @JsonCreator + public AiGatewayBudgetPeriodResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayBudgetPeriodResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetPeriodResponse data(AiGatewayBudgetPeriodResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Active accounting period for an AI Gateway budget. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetPeriodResource getData() { + return data; + } + + public void setData(AiGatewayBudgetPeriodResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetPeriodResponse + */ + @JsonAnySetter + public AiGatewayBudgetPeriodResponse 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 AiGatewayBudgetPeriodResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetPeriodResponse aiGatewayBudgetPeriodResponse = (AiGatewayBudgetPeriodResponse) o; + return Objects.equals(this.data, aiGatewayBudgetPeriodResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetPeriodResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetPeriodResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodType.java new file mode 100644 index 00000000000..92a3d7b59e2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetPeriodType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** AI Gateway budget period resource type. */ +@JsonSerialize(using = AiGatewayBudgetPeriodType.AiGatewayBudgetPeriodTypeSerializer.class) +public class AiGatewayBudgetPeriodType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("budget-periods")); + + public static final AiGatewayBudgetPeriodType BUDGET_PERIODS = + new AiGatewayBudgetPeriodType("budget-periods"); + + AiGatewayBudgetPeriodType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetPeriodTypeSerializer + extends StdSerializer { + public AiGatewayBudgetPeriodTypeSerializer(Class t) { + super(t); + } + + public AiGatewayBudgetPeriodTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetPeriodType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetPeriodType fromValue(String value) { + return new AiGatewayBudgetPeriodType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResource.java new file mode 100644 index 00000000000..8f59db4adfc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResource.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** AI Gateway budget resource. */ +@JsonPropertyOrder({ + AiGatewayBudgetResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetResource.JSON_PROPERTY_ID, + AiGatewayBudgetResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetType type; + + public AiGatewayBudgetResource() {} + + @JsonCreator + public AiGatewayBudgetResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetResource attributes(AiGatewayBudgetAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * AI Gateway budget configuration and metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetResource id(UUID id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayBudgetResource type(AiGatewayBudgetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway budget resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetType getType() { + return type; + } + + public void setType(AiGatewayBudgetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetResource + */ + @JsonAnySetter + public AiGatewayBudgetResource 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 AiGatewayBudgetResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetResource aiGatewayBudgetResource = (AiGatewayBudgetResource) o; + return Objects.equals(this.attributes, aiGatewayBudgetResource.attributes) + && Objects.equals(this.id, aiGatewayBudgetResource.id) + && Objects.equals(this.type, aiGatewayBudgetResource.type) + && Objects.equals(this.additionalProperties, aiGatewayBudgetResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResponse.java new file mode 100644 index 00000000000..357f1285a51 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one AI Gateway budget. */ +@JsonPropertyOrder({AiGatewayBudgetResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetResource data; + + public AiGatewayBudgetResponse() {} + + @JsonCreator + public AiGatewayBudgetResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayBudgetResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetResponse data(AiGatewayBudgetResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway budget resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetResource getData() { + return data; + } + + public void setData(AiGatewayBudgetResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetResponse + */ + @JsonAnySetter + public AiGatewayBudgetResponse 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 AiGatewayBudgetResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetResponse aiGatewayBudgetResponse = (AiGatewayBudgetResponse) o; + return Objects.equals(this.data, aiGatewayBudgetResponse.data) + && Objects.equals(this.additionalProperties, aiGatewayBudgetResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetSelectorEntry.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetSelectorEntry.java new file mode 100644 index 00000000000..2ebd94c5d47 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetSelectorEntry.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** One dimension rule in a template budget selector. */ +@JsonPropertyOrder({ + AiGatewayBudgetSelectorEntry.JSON_PROPERTY_DIM, + AiGatewayBudgetSelectorEntry.JSON_PROPERTY_PER_VALUE, + AiGatewayBudgetSelectorEntry.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetSelectorEntry { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DIM = "dim"; + private String dim; + + public static final String JSON_PROPERTY_PER_VALUE = "per_value"; + private Boolean perValue = false; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = null; + + public AiGatewayBudgetSelectorEntry() {} + + @JsonCreator + public AiGatewayBudgetSelectorEntry( + @JsonProperty(required = true, value = JSON_PROPERTY_DIM) String dim, + @JsonProperty(required = true, value = JSON_PROPERTY_PER_VALUE) Boolean perValue) { + this.dim = dim; + this.perValue = perValue; + } + + public AiGatewayBudgetSelectorEntry dim(String dim) { + this.dim = dim; + return this; + } + + /** + * Dimension to match: user_id, team_id, model, provider, or tag:. Reserved metadata tag keys + * are rejected. + * + * @return dim + */ + @JsonProperty(JSON_PROPERTY_DIM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDim() { + return dim; + } + + public void setDim(String dim) { + this.dim = dim; + } + + public AiGatewayBudgetSelectorEntry perValue(Boolean perValue) { + this.perValue = perValue; + return this; + } + + /** + * Separate counters by the matched value when true. Otherwise, pool spend within the other + * separated dimensions. + * + * @return perValue + */ + @JsonProperty(JSON_PROPERTY_PER_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getPerValue() { + return perValue; + } + + public void setPerValue(Boolean perValue) { + this.perValue = perValue; + } + + public AiGatewayBudgetSelectorEntry values(List values) { + this.values = values; + return this; + } + + public AiGatewayBudgetSelectorEntry addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Allowed dimension values. Omit to match any value, including an absent dimension. An explicit + * list must contain at least one value. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * 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 AiGatewayBudgetSelectorEntry + */ + @JsonAnySetter + public AiGatewayBudgetSelectorEntry 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 AiGatewayBudgetSelectorEntry object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetSelectorEntry aiGatewayBudgetSelectorEntry = (AiGatewayBudgetSelectorEntry) o; + return Objects.equals(this.dim, aiGatewayBudgetSelectorEntry.dim) + && Objects.equals(this.perValue, aiGatewayBudgetSelectorEntry.perValue) + && Objects.equals(this.values, aiGatewayBudgetSelectorEntry.values) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetSelectorEntry.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dim, perValue, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetSelectorEntry {\n"); + sb.append(" dim: ").append(toIndentedString(dim)).append("\n"); + sb.append(" perValue: ").append(toIndentedString(perValue)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).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/AiGatewayBudgetType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetType.java new file mode 100644 index 00000000000..a8b410575d4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetType.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** AI Gateway budget resource type. */ +@JsonSerialize(using = AiGatewayBudgetType.AiGatewayBudgetTypeSerializer.class) +public class AiGatewayBudgetType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("budgets")); + + public static final AiGatewayBudgetType BUDGETS = new AiGatewayBudgetType("budgets"); + + AiGatewayBudgetType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetTypeSerializer extends StdSerializer { + public AiGatewayBudgetTypeSerializer(Class t) { + super(t); + } + + public AiGatewayBudgetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetType fromValue(String value) { + return new AiGatewayBudgetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateAttributes.java new file mode 100644 index 00000000000..90be9fd82cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateAttributes.java @@ -0,0 +1,347 @@ +/* + * 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.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; + +/** Mutable attributes of an AI Gateway budget. */ +@JsonPropertyOrder({ + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_APPLY_TO_CURRENT_PERIOD, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_CAPACITY_MICROCENTS, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_ENABLED, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_ENFORCEMENT, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_NAME, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_REASON, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_TRACK_EXISTING, + AiGatewayBudgetUpdateAttributes.JSON_PROPERTY_WARNING_THRESHOLD +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLY_TO_CURRENT_PERIOD = "apply_to_current_period"; + private Boolean applyToCurrentPeriod = false; + + public static final String JSON_PROPERTY_CAPACITY_MICROCENTS = "capacity_microcents"; + private Long capacityMicrocents; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ENFORCEMENT = "enforcement"; + private AiGatewayBudgetEnforcement enforcement; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_TRACK_EXISTING = "track_existing"; + private Boolean trackExisting = false; + + public static final String JSON_PROPERTY_WARNING_THRESHOLD = "warning_threshold"; + private Double warningThreshold; + + public AiGatewayBudgetUpdateAttributes applyToCurrentPeriod(Boolean applyToCurrentPeriod) { + this.applyToCurrentPeriod = applyToCurrentPeriod; + return this; + } + + /** + * Whether a capacity change also applies to the active accounting period. Requires + * capacity_microcents. Unsupported for template budgets. + * + * @return applyToCurrentPeriod + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLY_TO_CURRENT_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApplyToCurrentPeriod() { + return applyToCurrentPeriod; + } + + public void setApplyToCurrentPeriod(Boolean applyToCurrentPeriod) { + this.applyToCurrentPeriod = applyToCurrentPeriod; + } + + public AiGatewayBudgetUpdateAttributes capacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + return this; + } + + /** + * Default capacity for future accounting periods, in microcents. minimum: 1 + * + * @return capacityMicrocents + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CAPACITY_MICROCENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getCapacityMicrocents() { + return capacityMicrocents; + } + + public void setCapacityMicrocents(Long capacityMicrocents) { + this.capacityMicrocents = capacityMicrocents; + } + + public AiGatewayBudgetUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the budget is 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 AiGatewayBudgetUpdateAttributes enforcement(AiGatewayBudgetEnforcement enforcement) { + this.enforcement = enforcement; + this.unparsed |= !enforcement.isValid(); + return this; + } + + /** + * Action taken when spend exceeds the budget. + * + * @return enforcement + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENFORCEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayBudgetEnforcement getEnforcement() { + return enforcement; + } + + public void setEnforcement(AiGatewayBudgetEnforcement enforcement) { + if (!enforcement.isValid()) { + this.unparsed = true; + } + this.enforcement = enforcement; + } + + public AiGatewayBudgetUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayBudgetUpdateAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Optional reason recorded with an active-period capacity adjustment. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public AiGatewayBudgetUpdateAttributes trackExisting(Boolean trackExisting) { + this.trackExisting = trackExisting; + return this; + } + + /** + * Initialize current-period spend from historical priced LLM Observability spans. Defaults to + * false. Unsupported for template budgets; failures can be retried with an update. + * + * @return trackExisting + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACK_EXISTING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTrackExisting() { + return trackExisting; + } + + public void setTrackExisting(Boolean trackExisting) { + this.trackExisting = trackExisting; + } + + public AiGatewayBudgetUpdateAttributes warningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + return this; + } + + /** + * Fraction of capacity at which to issue a warning. minimum: 0 maximum: 1 + * + * @return warningThreshold + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getWarningThreshold() { + return warningThreshold; + } + + public void setWarningThreshold(Double warningThreshold) { + this.warningThreshold = warningThreshold; + } + + /** + * 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 AiGatewayBudgetUpdateAttributes + */ + @JsonAnySetter + public AiGatewayBudgetUpdateAttributes 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 AiGatewayBudgetUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetUpdateAttributes aiGatewayBudgetUpdateAttributes = + (AiGatewayBudgetUpdateAttributes) o; + return Objects.equals( + this.applyToCurrentPeriod, aiGatewayBudgetUpdateAttributes.applyToCurrentPeriod) + && Objects.equals( + this.capacityMicrocents, aiGatewayBudgetUpdateAttributes.capacityMicrocents) + && Objects.equals(this.enabled, aiGatewayBudgetUpdateAttributes.enabled) + && Objects.equals(this.enforcement, aiGatewayBudgetUpdateAttributes.enforcement) + && Objects.equals(this.name, aiGatewayBudgetUpdateAttributes.name) + && Objects.equals(this.reason, aiGatewayBudgetUpdateAttributes.reason) + && Objects.equals(this.trackExisting, aiGatewayBudgetUpdateAttributes.trackExisting) + && Objects.equals(this.warningThreshold, aiGatewayBudgetUpdateAttributes.warningThreshold) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + applyToCurrentPeriod, + capacityMicrocents, + enabled, + enforcement, + name, + reason, + trackExisting, + warningThreshold, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetUpdateAttributes {\n"); + sb.append(" applyToCurrentPeriod: ") + .append(toIndentedString(applyToCurrentPeriod)) + .append("\n"); + sb.append(" capacityMicrocents: ").append(toIndentedString(capacityMicrocents)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" enforcement: ").append(toIndentedString(enforcement)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" trackExisting: ").append(toIndentedString(trackExisting)).append("\n"); + sb.append(" warningThreshold: ").append(toIndentedString(warningThreshold)).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/AiGatewayBudgetUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateData.java new file mode 100644 index 00000000000..47ec1671e9f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateData.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Data used to update an AI Gateway budget. */ +@JsonPropertyOrder({ + AiGatewayBudgetUpdateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayBudgetUpdateData.JSON_PROPERTY_ID, + AiGatewayBudgetUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayBudgetUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayBudgetType type; + + public AiGatewayBudgetUpdateData() {} + + @JsonCreator + public AiGatewayBudgetUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayBudgetUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayBudgetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayBudgetUpdateData attributes(AiGatewayBudgetUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Mutable attributes of an AI Gateway budget. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayBudgetUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayBudgetUpdateData id(UUID id) { + this.id = id; + return this; + } + + /** + * Resource identifier. Must match the budget ID in the path. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayBudgetUpdateData type(AiGatewayBudgetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway budget resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetType getType() { + return type; + } + + public void setType(AiGatewayBudgetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayBudgetUpdateData + */ + @JsonAnySetter + public AiGatewayBudgetUpdateData 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 AiGatewayBudgetUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetUpdateData aiGatewayBudgetUpdateData = (AiGatewayBudgetUpdateData) o; + return Objects.equals(this.attributes, aiGatewayBudgetUpdateData.attributes) + && Objects.equals(this.id, aiGatewayBudgetUpdateData.id) + && Objects.equals(this.type, aiGatewayBudgetUpdateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateRequest.java new file mode 100644 index 00000000000..a6808a13b92 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetUpdateRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update an AI Gateway budget. */ +@JsonPropertyOrder({AiGatewayBudgetUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayBudgetUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayBudgetUpdateData data; + + public AiGatewayBudgetUpdateRequest() {} + + @JsonCreator + public AiGatewayBudgetUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayBudgetUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayBudgetUpdateRequest data(AiGatewayBudgetUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to update an AI Gateway budget. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayBudgetUpdateData getData() { + return data; + } + + public void setData(AiGatewayBudgetUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayBudgetUpdateRequest + */ + @JsonAnySetter + public AiGatewayBudgetUpdateRequest 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 AiGatewayBudgetUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayBudgetUpdateRequest aiGatewayBudgetUpdateRequest = (AiGatewayBudgetUpdateRequest) o; + return Objects.equals(this.data, aiGatewayBudgetUpdateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayBudgetUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayBudgetUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetWindowPolicy.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetWindowPolicy.java new file mode 100644 index 00000000000..061de8aaa42 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayBudgetWindowPolicy.java @@ -0,0 +1,60 @@ +/* + * 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; + +/** UTC accounting period for a budget. */ +@JsonSerialize(using = AiGatewayBudgetWindowPolicy.AiGatewayBudgetWindowPolicySerializer.class) +public class AiGatewayBudgetWindowPolicy extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("DAILY", "WEEKLY", "MONTHLY")); + + public static final AiGatewayBudgetWindowPolicy DAILY = new AiGatewayBudgetWindowPolicy("DAILY"); + public static final AiGatewayBudgetWindowPolicy WEEKLY = + new AiGatewayBudgetWindowPolicy("WEEKLY"); + public static final AiGatewayBudgetWindowPolicy MONTHLY = + new AiGatewayBudgetWindowPolicy("MONTHLY"); + + AiGatewayBudgetWindowPolicy(String value) { + super(value, allowedValues); + } + + public static class AiGatewayBudgetWindowPolicySerializer + extends StdSerializer { + public AiGatewayBudgetWindowPolicySerializer(Class t) { + super(t); + } + + public AiGatewayBudgetWindowPolicySerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayBudgetWindowPolicy value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayBudgetWindowPolicy fromValue(String value) { + return new AiGatewayBudgetWindowPolicy(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponse.java new file mode 100644 index 00000000000..90e19640db2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponse.java @@ -0,0 +1,152 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the organization data capture configuration. */ +@JsonPropertyOrder({AiGatewayCaptureConfigurationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayCaptureConfigurationResponseData data; + + public AiGatewayCaptureConfigurationResponse() {} + + @JsonCreator + public AiGatewayCaptureConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayCaptureConfigurationResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayCaptureConfigurationResponse data( + AiGatewayCaptureConfigurationResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Organization data capture configuration, including its default mode and scoped overrides. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureConfigurationResponseData getData() { + return data; + } + + public void setData(AiGatewayCaptureConfigurationResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayCaptureConfigurationResponse + */ + @JsonAnySetter + public AiGatewayCaptureConfigurationResponse 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 AiGatewayCaptureConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureConfigurationResponse aiGatewayCaptureConfigurationResponse = + (AiGatewayCaptureConfigurationResponse) o; + return Objects.equals(this.data, aiGatewayCaptureConfigurationResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureConfigurationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseData.java new file mode 100644 index 00000000000..6b262a06f44 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseData.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization data capture configuration, including its default mode and scoped overrides. */ +@JsonPropertyOrder({ + AiGatewayCaptureConfigurationResponseData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayCaptureConfigurationResponseData.JSON_PROPERTY_ID, + AiGatewayCaptureConfigurationResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureConfigurationResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayCaptureConfigurationResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayCaptureConfigurationResponseDataType type = + AiGatewayCaptureConfigurationResponseDataType.DATA_CAPTURE_CONFIGURATIONS; + + public AiGatewayCaptureConfigurationResponseData() {} + + @JsonCreator + public AiGatewayCaptureConfigurationResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayCaptureConfigurationResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayCaptureConfigurationResponseDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayCaptureConfigurationResponseData attributes( + AiGatewayCaptureConfigurationResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Organization default mode, scoped overrides, and current configuration revision. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureConfigurationResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayCaptureConfigurationResponseDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayCaptureConfigurationResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the organization configuration resource, always organization. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayCaptureConfigurationResponseData type( + AiGatewayCaptureConfigurationResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Data capture configurations resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureConfigurationResponseDataType getType() { + return type; + } + + public void setType(AiGatewayCaptureConfigurationResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayCaptureConfigurationResponseData + */ + @JsonAnySetter + public AiGatewayCaptureConfigurationResponseData 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 AiGatewayCaptureConfigurationResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureConfigurationResponseData aiGatewayCaptureConfigurationResponseData = + (AiGatewayCaptureConfigurationResponseData) o; + return Objects.equals(this.attributes, aiGatewayCaptureConfigurationResponseData.attributes) + && Objects.equals(this.id, aiGatewayCaptureConfigurationResponseData.id) + && Objects.equals(this.type, aiGatewayCaptureConfigurationResponseData.type) + && Objects.equals( + this.additionalProperties, + aiGatewayCaptureConfigurationResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureConfigurationResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributes.java new file mode 100644 index 00000000000..6251154fc3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributes.java @@ -0,0 +1,299 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Organization default mode, scoped overrides, and current configuration revision. */ +@JsonPropertyOrder({ + AiGatewayCaptureConfigurationResponseDataAttributes.JSON_PROPERTY_CONFIGURATION_REVISION, + AiGatewayCaptureConfigurationResponseDataAttributes.JSON_PROPERTY_DEFAULT_METADATA_CAPTURE, + AiGatewayCaptureConfigurationResponseDataAttributes.JSON_PROPERTY_DEFAULT_MODE, + AiGatewayCaptureConfigurationResponseDataAttributes.JSON_PROPERTY_OVERRIDES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureConfigurationResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGURATION_REVISION = "configuration_revision"; + private String configurationRevision; + + public static final String JSON_PROPERTY_DEFAULT_METADATA_CAPTURE = "default_metadata_capture"; + private List defaultMetadataCapture = null; + + public static final String JSON_PROPERTY_DEFAULT_MODE = "default_mode"; + private AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode defaultMode; + + public static final String JSON_PROPERTY_OVERRIDES = "overrides"; + private List overrides = new ArrayList<>(); + + public AiGatewayCaptureConfigurationResponseDataAttributes() {} + + @JsonCreator + public AiGatewayCaptureConfigurationResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGURATION_REVISION) + String configurationRevision, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFAULT_MODE) + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode defaultMode, + @JsonProperty(required = true, value = JSON_PROPERTY_OVERRIDES) + List overrides) { + this.configurationRevision = configurationRevision; + this.defaultMode = defaultMode; + this.unparsed |= !defaultMode.isValid(); + this.overrides = overrides; + for (AiGatewayCaptureOverride item : overrides) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayCaptureConfigurationResponseDataAttributes configurationRevision( + String configurationRevision) { + this.configurationRevision = configurationRevision; + return this; + } + + /** + * Opaque revision of the organization default and all overrides. Writes require the revision + * returned by a current read or preview. + * + * @return configurationRevision + */ + @JsonProperty(JSON_PROPERTY_CONFIGURATION_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigurationRevision() { + return configurationRevision; + } + + public void setConfigurationRevision(String configurationRevision) { + this.configurationRevision = configurationRevision; + } + + public AiGatewayCaptureConfigurationResponseDataAttributes defaultMetadataCapture( + List defaultMetadataCapture) { + this.defaultMetadataCapture = defaultMetadataCapture; + return this; + } + + public AiGatewayCaptureConfigurationResponseDataAttributes addDefaultMetadataCaptureItem( + AiGatewayMetadataCaptureItem defaultMetadataCaptureItem) { + if (this.defaultMetadataCapture == null) { + this.defaultMetadataCapture = new ArrayList<>(); + } + this.defaultMetadataCapture.add(defaultMetadataCaptureItem); + this.unparsed |= !defaultMetadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return defaultMetadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDefaultMetadataCapture() { + return defaultMetadataCapture; + } + + public void setDefaultMetadataCapture(List defaultMetadataCapture) { + this.defaultMetadataCapture = defaultMetadataCapture; + } + + public AiGatewayCaptureConfigurationResponseDataAttributes defaultMode( + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode defaultMode) { + this.defaultMode = defaultMode; + this.unparsed |= !defaultMode.isValid(); + return this; + } + + /** + * Default capture mode for the organization. Change it in Org defaults. + * + * @return defaultMode + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode getDefaultMode() { + return defaultMode; + } + + public void setDefaultMode( + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode defaultMode) { + if (!defaultMode.isValid()) { + this.unparsed = true; + } + this.defaultMode = defaultMode; + } + + public AiGatewayCaptureConfigurationResponseDataAttributes overrides( + List overrides) { + this.overrides = overrides; + for (AiGatewayCaptureOverride item : overrides) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayCaptureConfigurationResponseDataAttributes addOverridesItem( + AiGatewayCaptureOverride overridesItem) { + this.overrides.add(overridesItem); + this.unparsed |= overridesItem.unparsed; + return this; + } + + /** + * Scoped overrides currently configured for the organization. + * + * @return overrides + */ + @JsonProperty(JSON_PROPERTY_OVERRIDES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getOverrides() { + return overrides; + } + + public void setOverrides(List overrides) { + this.overrides = overrides; + if (overrides != null) { + for (AiGatewayCaptureOverride item : overrides) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayCaptureConfigurationResponseDataAttributes + */ + @JsonAnySetter + public AiGatewayCaptureConfigurationResponseDataAttributes 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 AiGatewayCaptureConfigurationResponseDataAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureConfigurationResponseDataAttributes + aiGatewayCaptureConfigurationResponseDataAttributes = + (AiGatewayCaptureConfigurationResponseDataAttributes) o; + return Objects.equals( + this.configurationRevision, + aiGatewayCaptureConfigurationResponseDataAttributes.configurationRevision) + && Objects.equals( + this.defaultMetadataCapture, + aiGatewayCaptureConfigurationResponseDataAttributes.defaultMetadataCapture) + && Objects.equals( + this.defaultMode, aiGatewayCaptureConfigurationResponseDataAttributes.defaultMode) + && Objects.equals( + this.overrides, aiGatewayCaptureConfigurationResponseDataAttributes.overrides) + && Objects.equals( + this.additionalProperties, + aiGatewayCaptureConfigurationResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationRevision, + defaultMetadataCapture, + defaultMode, + overrides, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureConfigurationResponseDataAttributes {\n"); + sb.append(" configurationRevision: ") + .append(toIndentedString(configurationRevision)) + .append("\n"); + sb.append(" defaultMetadataCapture: ") + .append(toIndentedString(defaultMetadataCapture)) + .append("\n"); + sb.append(" defaultMode: ").append(toIndentedString(defaultMode)).append("\n"); + sb.append(" overrides: ").append(toIndentedString(overrides)).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/AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode.java new file mode 100644 index 00000000000..273100dbe13 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode.java @@ -0,0 +1,67 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Default capture mode for the organization. Change it in Org defaults. */ +@JsonSerialize( + using = + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode + .AiGatewayCaptureConfigurationResponseDataAttributesDefaultModeSerializer.class) +public class AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode METADATA_ONLY = + new AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode("metadata_only"); + public static final AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode FULL_CAPTURE = + new AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode("full_capture"); + + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureConfigurationResponseDataAttributesDefaultModeSerializer + extends StdSerializer { + public AiGatewayCaptureConfigurationResponseDataAttributesDefaultModeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureConfigurationResponseDataAttributesDefaultModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode fromValue( + String value) { + return new AiGatewayCaptureConfigurationResponseDataAttributesDefaultMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataType.java new file mode 100644 index 00000000000..62756c55ee8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureConfigurationResponseDataType.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; + +/** Data capture configurations resource type. */ +@JsonSerialize( + using = + AiGatewayCaptureConfigurationResponseDataType + .AiGatewayCaptureConfigurationResponseDataTypeSerializer.class) +public class AiGatewayCaptureConfigurationResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("data-capture-configurations")); + + public static final AiGatewayCaptureConfigurationResponseDataType DATA_CAPTURE_CONFIGURATIONS = + new AiGatewayCaptureConfigurationResponseDataType("data-capture-configurations"); + + AiGatewayCaptureConfigurationResponseDataType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureConfigurationResponseDataTypeSerializer + extends StdSerializer { + public AiGatewayCaptureConfigurationResponseDataTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureConfigurationResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureConfigurationResponseDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureConfigurationResponseDataType fromValue(String value) { + return new AiGatewayCaptureConfigurationResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequest.java new file mode 100644 index 00000000000..32fee691212 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for creating a scoped data capture override. */ +@JsonPropertyOrder({AiGatewayCaptureCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayCaptureCreateRequestData data; + + public AiGatewayCaptureCreateRequest() {} + + @JsonCreator + public AiGatewayCaptureCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayCaptureCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayCaptureCreateRequest data(AiGatewayCaptureCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * New data capture override with a client-generated UUID and its settings. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureCreateRequestData getData() { + return data; + } + + public void setData(AiGatewayCaptureCreateRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayCaptureCreateRequest + */ + @JsonAnySetter + public AiGatewayCaptureCreateRequest 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 AiGatewayCaptureCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureCreateRequest aiGatewayCaptureCreateRequest = (AiGatewayCaptureCreateRequest) o; + return Objects.equals(this.data, aiGatewayCaptureCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestData.java new file mode 100644 index 00000000000..3b1f526e939 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestData.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** New data capture override with a client-generated UUID and its settings. */ +@JsonPropertyOrder({ + AiGatewayCaptureCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayCaptureCreateRequestData.JSON_PROPERTY_ID, + AiGatewayCaptureCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayCaptureCreateRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayCaptureCreateRequestDataType type = + AiGatewayCaptureCreateRequestDataType.DATA_CAPTURE_OVERRIDES; + + public AiGatewayCaptureCreateRequestData() {} + + @JsonCreator + public AiGatewayCaptureCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayCaptureCreateRequestDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayCaptureCreateRequestDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayCaptureCreateRequestData attributes( + AiGatewayCaptureCreateRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Settings and configuration revision for creating the override. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureCreateRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayCaptureCreateRequestDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayCaptureCreateRequestData id(UUID id) { + this.id = id; + return this; + } + + /** + * Client-generated UUID for the override. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayCaptureCreateRequestData type(AiGatewayCaptureCreateRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Data capture overrides resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureCreateRequestDataType getType() { + return type; + } + + public void setType(AiGatewayCaptureCreateRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayCaptureCreateRequestData + */ + @JsonAnySetter + public AiGatewayCaptureCreateRequestData 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 AiGatewayCaptureCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureCreateRequestData aiGatewayCaptureCreateRequestData = + (AiGatewayCaptureCreateRequestData) o; + return Objects.equals(this.attributes, aiGatewayCaptureCreateRequestData.attributes) + && Objects.equals(this.id, aiGatewayCaptureCreateRequestData.id) + && Objects.equals(this.type, aiGatewayCaptureCreateRequestData.type) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureCreateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributes.java new file mode 100644 index 00000000000..bf3a9a9facd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributes.java @@ -0,0 +1,401 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Settings and configuration revision for creating the override. */ +@JsonPropertyOrder({ + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_CONFIGURATION_REVISION, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_CONFIRM_FULL_CAPTURE, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_METADATA_CAPTURE, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_MODE, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_NAME, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_OPERATION, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_REVISION, + AiGatewayCaptureCreateRequestDataAttributes.JSON_PROPERTY_SCOPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureCreateRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGURATION_REVISION = "configuration_revision"; + private String configurationRevision; + + public static final String JSON_PROPERTY_CONFIRM_FULL_CAPTURE = "confirm_full_capture"; + private Boolean confirmFullCapture; + + public static final String JSON_PROPERTY_METADATA_CAPTURE = "metadata_capture"; + private List metadataCapture = null; + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayCaptureCreateRequestDataAttributesMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPERATION = "operation"; + private AiGatewayCaptureCreateRequestDataAttributesOperation operation; + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private AiGatewayCaptureScope scope; + + public AiGatewayCaptureCreateRequestDataAttributes() {} + + @JsonCreator + public AiGatewayCaptureCreateRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGURATION_REVISION) + String configurationRevision, + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) + AiGatewayCaptureCreateRequestDataAttributesMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) AiGatewayCaptureScope scope) { + this.configurationRevision = configurationRevision; + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.name = name; + this.scope = scope; + this.unparsed |= scope.unparsed; + } + + public AiGatewayCaptureCreateRequestDataAttributes configurationRevision( + String configurationRevision) { + this.configurationRevision = configurationRevision; + return this; + } + + /** + * Opaque revision of the organization default and all overrides. Writes require the revision + * returned by a current read or preview. + * + * @return configurationRevision + */ + @JsonProperty(JSON_PROPERTY_CONFIGURATION_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigurationRevision() { + return configurationRevision; + } + + public void setConfigurationRevision(String configurationRevision) { + this.configurationRevision = configurationRevision; + } + + public AiGatewayCaptureCreateRequestDataAttributes confirmFullCapture( + Boolean confirmFullCapture) { + this.confirmFullCapture = confirmFullCapture; + return this; + } + + /** + * Set to true to confirm a change that can enable full capture, including a deletion + * that causes a full_capture override or the organization default to apply. + * + * @return confirmFullCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIRM_FULL_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getConfirmFullCapture() { + return confirmFullCapture; + } + + public void setConfirmFullCapture(Boolean confirmFullCapture) { + this.confirmFullCapture = confirmFullCapture; + } + + public AiGatewayCaptureCreateRequestDataAttributes metadataCapture( + List metadataCapture) { + this.metadataCapture = metadataCapture; + return this; + } + + public AiGatewayCaptureCreateRequestDataAttributes addMetadataCaptureItem( + AiGatewayMetadataCaptureItem metadataCaptureItem) { + if (this.metadataCapture == null) { + this.metadataCapture = new ArrayList<>(); + } + this.metadataCapture.add(metadataCaptureItem); + this.unparsed |= !metadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return metadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadataCapture() { + return metadataCapture; + } + + public void setMetadataCapture(List metadataCapture) { + this.metadataCapture = metadataCapture; + } + + public AiGatewayCaptureCreateRequestDataAttributes mode( + AiGatewayCaptureCreateRequestDataAttributesMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Capture mode for matching traffic. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureCreateRequestDataAttributesMode getMode() { + return mode; + } + + public void setMode(AiGatewayCaptureCreateRequestDataAttributesMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayCaptureCreateRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the override. Names need not be unique; identify overrides by id. + * + * @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 AiGatewayCaptureCreateRequestDataAttributes operation( + AiGatewayCaptureCreateRequestDataAttributesOperation operation) { + this.operation = operation; + this.unparsed |= !operation.isValid(); + return this; + } + + /** + * Proposed operation for preview. Write endpoints infer it from the HTTP method. + * + * @return operation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayCaptureCreateRequestDataAttributesOperation getOperation() { + return operation; + } + + public void setOperation(AiGatewayCaptureCreateRequestDataAttributesOperation operation) { + if (!operation.isValid()) { + this.unparsed = true; + } + this.operation = operation; + } + + public AiGatewayCaptureCreateRequestDataAttributes revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Current override revision, required for replacement or deletion. + * + * @return revision + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayCaptureCreateRequestDataAttributes scope(AiGatewayCaptureScope scope) { + this.scope = scope; + this.unparsed |= scope.unparsed; + return this; + } + + /** + * All selected filters combine with AND, with one value per filter. The model and + * provider tags apply to each actual direct or routed attempt, including fallback + * destinations. Routes are not selectable filters. At least one filter is required. If any + * matching override uses metadata_only, that mode applies. Otherwise, if any + * matching override uses full_capture, that mode applies. The organization default + * applies only when no override matches. Overrides have no priority or specificity ordering. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureScope getScope() { + return scope; + } + + public void setScope(AiGatewayCaptureScope scope) { + this.scope = scope; + if (scope != null) { + this.unparsed |= scope.unparsed; + } + } + + /** + * 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 AiGatewayCaptureCreateRequestDataAttributes + */ + @JsonAnySetter + public AiGatewayCaptureCreateRequestDataAttributes 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 AiGatewayCaptureCreateRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureCreateRequestDataAttributes aiGatewayCaptureCreateRequestDataAttributes = + (AiGatewayCaptureCreateRequestDataAttributes) o; + return Objects.equals( + this.configurationRevision, + aiGatewayCaptureCreateRequestDataAttributes.configurationRevision) + && Objects.equals( + this.confirmFullCapture, aiGatewayCaptureCreateRequestDataAttributes.confirmFullCapture) + && Objects.equals( + this.metadataCapture, aiGatewayCaptureCreateRequestDataAttributes.metadataCapture) + && Objects.equals(this.mode, aiGatewayCaptureCreateRequestDataAttributes.mode) + && Objects.equals(this.name, aiGatewayCaptureCreateRequestDataAttributes.name) + && Objects.equals(this.operation, aiGatewayCaptureCreateRequestDataAttributes.operation) + && Objects.equals(this.revision, aiGatewayCaptureCreateRequestDataAttributes.revision) + && Objects.equals(this.scope, aiGatewayCaptureCreateRequestDataAttributes.scope) + && Objects.equals( + this.additionalProperties, + aiGatewayCaptureCreateRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationRevision, + confirmFullCapture, + metadataCapture, + mode, + name, + operation, + revision, + scope, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureCreateRequestDataAttributes {\n"); + sb.append(" configurationRevision: ") + .append(toIndentedString(configurationRevision)) + .append("\n"); + sb.append(" confirmFullCapture: ").append(toIndentedString(confirmFullCapture)).append("\n"); + sb.append(" metadataCapture: ").append(toIndentedString(metadataCapture)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).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/AiGatewayCaptureCreateRequestDataAttributesMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesMode.java new file mode 100644 index 00000000000..7ad7fb763bd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesMode.java @@ -0,0 +1,65 @@ +/* + * 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; + +/** Capture mode for matching traffic. */ +@JsonSerialize( + using = + AiGatewayCaptureCreateRequestDataAttributesMode + .AiGatewayCaptureCreateRequestDataAttributesModeSerializer.class) +public class AiGatewayCaptureCreateRequestDataAttributesMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayCaptureCreateRequestDataAttributesMode METADATA_ONLY = + new AiGatewayCaptureCreateRequestDataAttributesMode("metadata_only"); + public static final AiGatewayCaptureCreateRequestDataAttributesMode FULL_CAPTURE = + new AiGatewayCaptureCreateRequestDataAttributesMode("full_capture"); + + AiGatewayCaptureCreateRequestDataAttributesMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureCreateRequestDataAttributesModeSerializer + extends StdSerializer { + public AiGatewayCaptureCreateRequestDataAttributesModeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureCreateRequestDataAttributesModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureCreateRequestDataAttributesMode value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureCreateRequestDataAttributesMode fromValue(String value) { + return new AiGatewayCaptureCreateRequestDataAttributesMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesOperation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesOperation.java new file mode 100644 index 00000000000..c3a54df5928 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataAttributesOperation.java @@ -0,0 +1,67 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Proposed operation for preview. Write endpoints infer it from the HTTP method. */ +@JsonSerialize( + using = + AiGatewayCaptureCreateRequestDataAttributesOperation + .AiGatewayCaptureCreateRequestDataAttributesOperationSerializer.class) +public class AiGatewayCaptureCreateRequestDataAttributesOperation extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("create", "replace", "delete")); + + public static final AiGatewayCaptureCreateRequestDataAttributesOperation CREATE = + new AiGatewayCaptureCreateRequestDataAttributesOperation("create"); + public static final AiGatewayCaptureCreateRequestDataAttributesOperation REPLACE = + new AiGatewayCaptureCreateRequestDataAttributesOperation("replace"); + public static final AiGatewayCaptureCreateRequestDataAttributesOperation DELETE = + new AiGatewayCaptureCreateRequestDataAttributesOperation("delete"); + + AiGatewayCaptureCreateRequestDataAttributesOperation(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureCreateRequestDataAttributesOperationSerializer + extends StdSerializer { + public AiGatewayCaptureCreateRequestDataAttributesOperationSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureCreateRequestDataAttributesOperationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureCreateRequestDataAttributesOperation value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureCreateRequestDataAttributesOperation fromValue(String value) { + return new AiGatewayCaptureCreateRequestDataAttributesOperation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataType.java new file mode 100644 index 00000000000..b071e45bae0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureCreateRequestDataType.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; + +/** Data capture overrides resource type. */ +@JsonSerialize( + using = + AiGatewayCaptureCreateRequestDataType.AiGatewayCaptureCreateRequestDataTypeSerializer.class) +public class AiGatewayCaptureCreateRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("data-capture-overrides")); + + public static final AiGatewayCaptureCreateRequestDataType DATA_CAPTURE_OVERRIDES = + new AiGatewayCaptureCreateRequestDataType("data-capture-overrides"); + + AiGatewayCaptureCreateRequestDataType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureCreateRequestDataTypeSerializer + extends StdSerializer { + public AiGatewayCaptureCreateRequestDataTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureCreateRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureCreateRequestDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureCreateRequestDataType fromValue(String value) { + return new AiGatewayCaptureCreateRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequest.java new file mode 100644 index 00000000000..473e2003320 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for deleting a scoped data capture override. */ +@JsonPropertyOrder({AiGatewayCaptureDeleteRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureDeleteRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayCaptureDeleteRequestData data; + + public AiGatewayCaptureDeleteRequest() {} + + @JsonCreator + public AiGatewayCaptureDeleteRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayCaptureDeleteRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayCaptureDeleteRequest data(AiGatewayCaptureDeleteRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Override identifier, revisions, and confirmation required for deletion. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureDeleteRequestData getData() { + return data; + } + + public void setData(AiGatewayCaptureDeleteRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayCaptureDeleteRequest + */ + @JsonAnySetter + public AiGatewayCaptureDeleteRequest 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 AiGatewayCaptureDeleteRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureDeleteRequest aiGatewayCaptureDeleteRequest = (AiGatewayCaptureDeleteRequest) o; + return Objects.equals(this.data, aiGatewayCaptureDeleteRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureDeleteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureDeleteRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestData.java new file mode 100644 index 00000000000..955f8780fa4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestData.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Override identifier, revisions, and confirmation required for deletion. */ +@JsonPropertyOrder({ + AiGatewayCaptureDeleteRequestData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayCaptureDeleteRequestData.JSON_PROPERTY_ID, + AiGatewayCaptureDeleteRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureDeleteRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayCaptureDeleteRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayCaptureDeleteRequestDataType type = + AiGatewayCaptureDeleteRequestDataType.DATA_CAPTURE_OVERRIDES; + + public AiGatewayCaptureDeleteRequestData() {} + + @JsonCreator + public AiGatewayCaptureDeleteRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayCaptureDeleteRequestDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayCaptureDeleteRequestDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayCaptureDeleteRequestData attributes( + AiGatewayCaptureDeleteRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Revisions and confirmation used to delete the override. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureDeleteRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayCaptureDeleteRequestDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayCaptureDeleteRequestData id(UUID id) { + this.id = id; + return this; + } + + /** + * UUID of the override to delete. Must match the id path parameter. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayCaptureDeleteRequestData type(AiGatewayCaptureDeleteRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Data capture overrides resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureDeleteRequestDataType getType() { + return type; + } + + public void setType(AiGatewayCaptureDeleteRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayCaptureDeleteRequestData + */ + @JsonAnySetter + public AiGatewayCaptureDeleteRequestData 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 AiGatewayCaptureDeleteRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureDeleteRequestData aiGatewayCaptureDeleteRequestData = + (AiGatewayCaptureDeleteRequestData) o; + return Objects.equals(this.attributes, aiGatewayCaptureDeleteRequestData.attributes) + && Objects.equals(this.id, aiGatewayCaptureDeleteRequestData.id) + && Objects.equals(this.type, aiGatewayCaptureDeleteRequestData.type) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureDeleteRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureDeleteRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributes.java new file mode 100644 index 00000000000..40aca0afa69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributes.java @@ -0,0 +1,349 @@ +/* + * 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; + +/** Revisions and confirmation used to delete the override. */ +@JsonPropertyOrder({ + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_CONFIGURATION_REVISION, + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_CONFIRM_FULL_CAPTURE, + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_MODE, + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_NAME, + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_OPERATION, + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_REVISION, + AiGatewayCaptureDeleteRequestDataAttributes.JSON_PROPERTY_SCOPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureDeleteRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGURATION_REVISION = "configuration_revision"; + private String configurationRevision; + + public static final String JSON_PROPERTY_CONFIRM_FULL_CAPTURE = "confirm_full_capture"; + private Boolean confirmFullCapture; + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayCaptureDeleteRequestDataAttributesMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPERATION = "operation"; + private AiGatewayCaptureDeleteRequestDataAttributesOperation operation; + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private AiGatewayCaptureScope scope; + + public AiGatewayCaptureDeleteRequestDataAttributes() {} + + @JsonCreator + public AiGatewayCaptureDeleteRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGURATION_REVISION) + String configurationRevision, + @JsonProperty(required = true, value = JSON_PROPERTY_REVISION) Long revision) { + this.configurationRevision = configurationRevision; + this.revision = revision; + } + + public AiGatewayCaptureDeleteRequestDataAttributes configurationRevision( + String configurationRevision) { + this.configurationRevision = configurationRevision; + return this; + } + + /** + * Opaque revision of the organization default and all overrides. Writes require the revision + * returned by a current read or preview. + * + * @return configurationRevision + */ + @JsonProperty(JSON_PROPERTY_CONFIGURATION_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigurationRevision() { + return configurationRevision; + } + + public void setConfigurationRevision(String configurationRevision) { + this.configurationRevision = configurationRevision; + } + + public AiGatewayCaptureDeleteRequestDataAttributes confirmFullCapture( + Boolean confirmFullCapture) { + this.confirmFullCapture = confirmFullCapture; + return this; + } + + /** + * Set to true to confirm a change that can enable full capture, including a deletion + * that causes a full_capture override or the organization default to apply. + * + * @return confirmFullCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIRM_FULL_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getConfirmFullCapture() { + return confirmFullCapture; + } + + public void setConfirmFullCapture(Boolean confirmFullCapture) { + this.confirmFullCapture = confirmFullCapture; + } + + public AiGatewayCaptureDeleteRequestDataAttributes mode( + AiGatewayCaptureDeleteRequestDataAttributesMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Capture mode for matching traffic. + * + * @return mode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayCaptureDeleteRequestDataAttributesMode getMode() { + return mode; + } + + public void setMode(AiGatewayCaptureDeleteRequestDataAttributesMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayCaptureDeleteRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the override. Names need not be unique; identify overrides by id. + * + * @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 AiGatewayCaptureDeleteRequestDataAttributes operation( + AiGatewayCaptureDeleteRequestDataAttributesOperation operation) { + this.operation = operation; + this.unparsed |= !operation.isValid(); + return this; + } + + /** + * Proposed operation for preview. Write endpoints infer it from the HTTP method. + * + * @return operation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayCaptureDeleteRequestDataAttributesOperation getOperation() { + return operation; + } + + public void setOperation(AiGatewayCaptureDeleteRequestDataAttributesOperation operation) { + if (!operation.isValid()) { + this.unparsed = true; + } + this.operation = operation; + } + + public AiGatewayCaptureDeleteRequestDataAttributes revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Current override revision, required for replacement or deletion. + * + * @return revision + */ + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayCaptureDeleteRequestDataAttributes scope(AiGatewayCaptureScope scope) { + this.scope = scope; + this.unparsed |= scope.unparsed; + return this; + } + + /** + * All selected filters combine with AND, with one value per filter. The model and + * provider tags apply to each actual direct or routed attempt, including fallback + * destinations. Routes are not selectable filters. At least one filter is required. If any + * matching override uses metadata_only, that mode applies. Otherwise, if any + * matching override uses full_capture, that mode applies. The organization default + * applies only when no override matches. Overrides have no priority or specificity ordering. + * + * @return scope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayCaptureScope getScope() { + return scope; + } + + public void setScope(AiGatewayCaptureScope scope) { + this.scope = scope; + if (scope != null) { + this.unparsed |= scope.unparsed; + } + } + + /** + * 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 AiGatewayCaptureDeleteRequestDataAttributes + */ + @JsonAnySetter + public AiGatewayCaptureDeleteRequestDataAttributes 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 AiGatewayCaptureDeleteRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureDeleteRequestDataAttributes aiGatewayCaptureDeleteRequestDataAttributes = + (AiGatewayCaptureDeleteRequestDataAttributes) o; + return Objects.equals( + this.configurationRevision, + aiGatewayCaptureDeleteRequestDataAttributes.configurationRevision) + && Objects.equals( + this.confirmFullCapture, aiGatewayCaptureDeleteRequestDataAttributes.confirmFullCapture) + && Objects.equals(this.mode, aiGatewayCaptureDeleteRequestDataAttributes.mode) + && Objects.equals(this.name, aiGatewayCaptureDeleteRequestDataAttributes.name) + && Objects.equals(this.operation, aiGatewayCaptureDeleteRequestDataAttributes.operation) + && Objects.equals(this.revision, aiGatewayCaptureDeleteRequestDataAttributes.revision) + && Objects.equals(this.scope, aiGatewayCaptureDeleteRequestDataAttributes.scope) + && Objects.equals( + this.additionalProperties, + aiGatewayCaptureDeleteRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationRevision, + confirmFullCapture, + mode, + name, + operation, + revision, + scope, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureDeleteRequestDataAttributes {\n"); + sb.append(" configurationRevision: ") + .append(toIndentedString(configurationRevision)) + .append("\n"); + sb.append(" confirmFullCapture: ").append(toIndentedString(confirmFullCapture)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).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/AiGatewayCaptureDeleteRequestDataAttributesMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesMode.java new file mode 100644 index 00000000000..0b3f7bf87c5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesMode.java @@ -0,0 +1,65 @@ +/* + * 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; + +/** Capture mode for matching traffic. */ +@JsonSerialize( + using = + AiGatewayCaptureDeleteRequestDataAttributesMode + .AiGatewayCaptureDeleteRequestDataAttributesModeSerializer.class) +public class AiGatewayCaptureDeleteRequestDataAttributesMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayCaptureDeleteRequestDataAttributesMode METADATA_ONLY = + new AiGatewayCaptureDeleteRequestDataAttributesMode("metadata_only"); + public static final AiGatewayCaptureDeleteRequestDataAttributesMode FULL_CAPTURE = + new AiGatewayCaptureDeleteRequestDataAttributesMode("full_capture"); + + AiGatewayCaptureDeleteRequestDataAttributesMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureDeleteRequestDataAttributesModeSerializer + extends StdSerializer { + public AiGatewayCaptureDeleteRequestDataAttributesModeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureDeleteRequestDataAttributesModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureDeleteRequestDataAttributesMode value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureDeleteRequestDataAttributesMode fromValue(String value) { + return new AiGatewayCaptureDeleteRequestDataAttributesMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesOperation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesOperation.java new file mode 100644 index 00000000000..6d14ca46a83 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataAttributesOperation.java @@ -0,0 +1,67 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Proposed operation for preview. Write endpoints infer it from the HTTP method. */ +@JsonSerialize( + using = + AiGatewayCaptureDeleteRequestDataAttributesOperation + .AiGatewayCaptureDeleteRequestDataAttributesOperationSerializer.class) +public class AiGatewayCaptureDeleteRequestDataAttributesOperation extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("create", "replace", "delete")); + + public static final AiGatewayCaptureDeleteRequestDataAttributesOperation CREATE = + new AiGatewayCaptureDeleteRequestDataAttributesOperation("create"); + public static final AiGatewayCaptureDeleteRequestDataAttributesOperation REPLACE = + new AiGatewayCaptureDeleteRequestDataAttributesOperation("replace"); + public static final AiGatewayCaptureDeleteRequestDataAttributesOperation DELETE = + new AiGatewayCaptureDeleteRequestDataAttributesOperation("delete"); + + AiGatewayCaptureDeleteRequestDataAttributesOperation(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureDeleteRequestDataAttributesOperationSerializer + extends StdSerializer { + public AiGatewayCaptureDeleteRequestDataAttributesOperationSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureDeleteRequestDataAttributesOperationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureDeleteRequestDataAttributesOperation value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureDeleteRequestDataAttributesOperation fromValue(String value) { + return new AiGatewayCaptureDeleteRequestDataAttributesOperation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataType.java new file mode 100644 index 00000000000..e80601e262a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureDeleteRequestDataType.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; + +/** Data capture overrides resource type. */ +@JsonSerialize( + using = + AiGatewayCaptureDeleteRequestDataType.AiGatewayCaptureDeleteRequestDataTypeSerializer.class) +public class AiGatewayCaptureDeleteRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("data-capture-overrides")); + + public static final AiGatewayCaptureDeleteRequestDataType DATA_CAPTURE_OVERRIDES = + new AiGatewayCaptureDeleteRequestDataType("data-capture-overrides"); + + AiGatewayCaptureDeleteRequestDataType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureDeleteRequestDataTypeSerializer + extends StdSerializer { + public AiGatewayCaptureDeleteRequestDataTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureDeleteRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureDeleteRequestDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureDeleteRequestDataType fromValue(String value) { + return new AiGatewayCaptureDeleteRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverride.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverride.java new file mode 100644 index 00000000000..ee8b6907bdf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverride.java @@ -0,0 +1,413 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Saved data capture override with its request filters, capture mode, revision, and timestamps. */ +@JsonPropertyOrder({ + AiGatewayCaptureOverride.JSON_PROPERTY_CREATED_AT, + AiGatewayCaptureOverride.JSON_PROPERTY_ID, + AiGatewayCaptureOverride.JSON_PROPERTY_METADATA_CAPTURE, + AiGatewayCaptureOverride.JSON_PROPERTY_MODE, + AiGatewayCaptureOverride.JSON_PROPERTY_NAME, + AiGatewayCaptureOverride.JSON_PROPERTY_REVISION, + AiGatewayCaptureOverride.JSON_PROPERTY_SCOPE, + AiGatewayCaptureOverride.JSON_PROPERTY_SCOPE_RESTRICTED, + AiGatewayCaptureOverride.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureOverride { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_METADATA_CAPTURE = "metadata_capture"; + private List metadataCapture = null; + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayCaptureOverrideMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private AiGatewayCaptureResponseScope scope; + + public static final String JSON_PROPERTY_SCOPE_RESTRICTED = "scope_restricted"; + private Boolean scopeRestricted; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayCaptureOverride() {} + + @JsonCreator + public AiGatewayCaptureOverride( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) AiGatewayCaptureOverrideMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REVISION) Long revision, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) + AiGatewayCaptureResponseScope scope, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE_RESTRICTED) + Boolean scopeRestricted, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.id = id; + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.name = name; + this.revision = revision; + this.scope = scope; + this.unparsed |= scope.unparsed; + this.scopeRestricted = scopeRestricted; + this.updatedAt = updatedAt; + } + + public AiGatewayCaptureOverride createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the override was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayCaptureOverride id(UUID id) { + this.id = id; + return this; + } + + /** + * UUID identifying the override within the organization. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayCaptureOverride metadataCapture( + List metadataCapture) { + this.metadataCapture = metadataCapture; + return this; + } + + public AiGatewayCaptureOverride addMetadataCaptureItem( + AiGatewayMetadataCaptureItem metadataCaptureItem) { + if (this.metadataCapture == null) { + this.metadataCapture = new ArrayList<>(); + } + this.metadataCapture.add(metadataCaptureItem); + this.unparsed |= !metadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return metadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadataCapture() { + return metadataCapture; + } + + public void setMetadataCapture(List metadataCapture) { + this.metadataCapture = metadataCapture; + } + + public AiGatewayCaptureOverride mode(AiGatewayCaptureOverrideMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Capture mode for matching traffic. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureOverrideMode getMode() { + return mode; + } + + public void setMode(AiGatewayCaptureOverrideMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayCaptureOverride name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the override. Names need not be unique; identify overrides by id. + * + * @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 AiGatewayCaptureOverride revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Current override revision, required for replacement or deletion. + * + * @return revision + */ + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayCaptureOverride scope(AiGatewayCaptureResponseScope scope) { + this.scope = scope; + this.unparsed |= scope.unparsed; + return this; + } + + /** + * Visible request filters. Provider and model tags are withheld when the caller cannot view them. + * An empty object or empty tags can represent a fully restricted scope; scope_restricted + * identifies redaction. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureResponseScope getScope() { + return scope; + } + + public void setScope(AiGatewayCaptureResponseScope scope) { + this.scope = scope; + if (scope != null) { + this.unparsed |= scope.unparsed; + } + } + + public AiGatewayCaptureOverride scopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + return this; + } + + /** + * Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an + * unrelated update to preserve their saved values. + * + * @return scopeRestricted + */ + @JsonProperty(JSON_PROPERTY_SCOPE_RESTRICTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getScopeRestricted() { + return scopeRestricted; + } + + public void setScopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + } + + public AiGatewayCaptureOverride updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the override was last modified. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayCaptureOverride + */ + @JsonAnySetter + public AiGatewayCaptureOverride 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 AiGatewayCaptureOverride object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureOverride aiGatewayCaptureOverride = (AiGatewayCaptureOverride) o; + return Objects.equals(this.createdAt, aiGatewayCaptureOverride.createdAt) + && Objects.equals(this.id, aiGatewayCaptureOverride.id) + && Objects.equals(this.metadataCapture, aiGatewayCaptureOverride.metadataCapture) + && Objects.equals(this.mode, aiGatewayCaptureOverride.mode) + && Objects.equals(this.name, aiGatewayCaptureOverride.name) + && Objects.equals(this.revision, aiGatewayCaptureOverride.revision) + && Objects.equals(this.scope, aiGatewayCaptureOverride.scope) + && Objects.equals(this.scopeRestricted, aiGatewayCaptureOverride.scopeRestricted) + && Objects.equals(this.updatedAt, aiGatewayCaptureOverride.updatedAt) + && Objects.equals(this.additionalProperties, aiGatewayCaptureOverride.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + id, + metadataCapture, + mode, + name, + revision, + scope, + scopeRestricted, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureOverride {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" metadataCapture: ").append(toIndentedString(metadataCapture)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" scopeRestricted: ").append(toIndentedString(scopeRestricted)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayCaptureOverrideMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideMode.java new file mode 100644 index 00000000000..6b6acbed1b2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideMode.java @@ -0,0 +1,59 @@ +/* + * 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; + +/** Capture mode for matching traffic. */ +@JsonSerialize(using = AiGatewayCaptureOverrideMode.AiGatewayCaptureOverrideModeSerializer.class) +public class AiGatewayCaptureOverrideMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayCaptureOverrideMode METADATA_ONLY = + new AiGatewayCaptureOverrideMode("metadata_only"); + public static final AiGatewayCaptureOverrideMode FULL_CAPTURE = + new AiGatewayCaptureOverrideMode("full_capture"); + + AiGatewayCaptureOverrideMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureOverrideModeSerializer + extends StdSerializer { + public AiGatewayCaptureOverrideModeSerializer(Class t) { + super(t); + } + + public AiGatewayCaptureOverrideModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureOverrideMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureOverrideMode fromValue(String value) { + return new AiGatewayCaptureOverrideMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponse.java new file mode 100644 index 00000000000..3bcd931b278 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a data capture override after creation or replacement. */ +@JsonPropertyOrder({AiGatewayCaptureOverrideResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureOverrideResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayCaptureOverrideResponseData data; + + public AiGatewayCaptureOverrideResponse() {} + + @JsonCreator + public AiGatewayCaptureOverrideResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayCaptureOverrideResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayCaptureOverrideResponse data(AiGatewayCaptureOverrideResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Saved data capture override with its identifier, mode, scope, and revision. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureOverrideResponseData getData() { + return data; + } + + public void setData(AiGatewayCaptureOverrideResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayCaptureOverrideResponse + */ + @JsonAnySetter + public AiGatewayCaptureOverrideResponse 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 AiGatewayCaptureOverrideResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureOverrideResponse aiGatewayCaptureOverrideResponse = + (AiGatewayCaptureOverrideResponse) o; + return Objects.equals(this.data, aiGatewayCaptureOverrideResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureOverrideResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureOverrideResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseData.java new file mode 100644 index 00000000000..1726cfb727b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseData.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Saved data capture override with its identifier, mode, scope, and revision. */ +@JsonPropertyOrder({ + AiGatewayCaptureOverrideResponseData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayCaptureOverrideResponseData.JSON_PROPERTY_ID, + AiGatewayCaptureOverrideResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureOverrideResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayCaptureOverrideResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayCaptureOverrideResponseDataType type = + AiGatewayCaptureOverrideResponseDataType.DATA_CAPTURE_OVERRIDES; + + public AiGatewayCaptureOverrideResponseData() {} + + @JsonCreator + public AiGatewayCaptureOverrideResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayCaptureOverrideResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayCaptureOverrideResponseDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayCaptureOverrideResponseData attributes( + AiGatewayCaptureOverrideResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Saved name, capture mode, request filters, and revision of the override. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureOverrideResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayCaptureOverrideResponseDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayCaptureOverrideResponseData id(UUID id) { + this.id = id; + return this; + } + + /** + * UUID of the saved override, used to retrieve it from the configuration or change it. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayCaptureOverrideResponseData type(AiGatewayCaptureOverrideResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Data capture overrides resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureOverrideResponseDataType getType() { + return type; + } + + public void setType(AiGatewayCaptureOverrideResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayCaptureOverrideResponseData + */ + @JsonAnySetter + public AiGatewayCaptureOverrideResponseData 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 AiGatewayCaptureOverrideResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureOverrideResponseData aiGatewayCaptureOverrideResponseData = + (AiGatewayCaptureOverrideResponseData) o; + return Objects.equals(this.attributes, aiGatewayCaptureOverrideResponseData.attributes) + && Objects.equals(this.id, aiGatewayCaptureOverrideResponseData.id) + && Objects.equals(this.type, aiGatewayCaptureOverrideResponseData.type) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureOverrideResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureOverrideResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributes.java new file mode 100644 index 00000000000..6dc04ea60a8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributes.java @@ -0,0 +1,326 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Saved name, capture mode, request filters, and revision of the override. */ +@JsonPropertyOrder({ + AiGatewayCaptureOverrideResponseDataAttributes.JSON_PROPERTY_METADATA_CAPTURE, + AiGatewayCaptureOverrideResponseDataAttributes.JSON_PROPERTY_MODE, + AiGatewayCaptureOverrideResponseDataAttributes.JSON_PROPERTY_NAME, + AiGatewayCaptureOverrideResponseDataAttributes.JSON_PROPERTY_REVISION, + AiGatewayCaptureOverrideResponseDataAttributes.JSON_PROPERTY_SCOPE, + AiGatewayCaptureOverrideResponseDataAttributes.JSON_PROPERTY_SCOPE_RESTRICTED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureOverrideResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_METADATA_CAPTURE = "metadata_capture"; + private List metadataCapture = null; + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayCaptureOverrideResponseDataAttributesMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private AiGatewayCaptureResponseScope scope; + + public static final String JSON_PROPERTY_SCOPE_RESTRICTED = "scope_restricted"; + private Boolean scopeRestricted; + + public AiGatewayCaptureOverrideResponseDataAttributes() {} + + @JsonCreator + public AiGatewayCaptureOverrideResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) + AiGatewayCaptureOverrideResponseDataAttributesMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REVISION) Long revision, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) + AiGatewayCaptureResponseScope scope, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE_RESTRICTED) + Boolean scopeRestricted) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.name = name; + this.revision = revision; + this.scope = scope; + this.unparsed |= scope.unparsed; + this.scopeRestricted = scopeRestricted; + } + + public AiGatewayCaptureOverrideResponseDataAttributes metadataCapture( + List metadataCapture) { + this.metadataCapture = metadataCapture; + return this; + } + + public AiGatewayCaptureOverrideResponseDataAttributes addMetadataCaptureItem( + AiGatewayMetadataCaptureItem metadataCaptureItem) { + if (this.metadataCapture == null) { + this.metadataCapture = new ArrayList<>(); + } + this.metadataCapture.add(metadataCaptureItem); + this.unparsed |= !metadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return metadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadataCapture() { + return metadataCapture; + } + + public void setMetadataCapture(List metadataCapture) { + this.metadataCapture = metadataCapture; + } + + public AiGatewayCaptureOverrideResponseDataAttributes mode( + AiGatewayCaptureOverrideResponseDataAttributesMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Capture mode for matching traffic. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureOverrideResponseDataAttributesMode getMode() { + return mode; + } + + public void setMode(AiGatewayCaptureOverrideResponseDataAttributesMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayCaptureOverrideResponseDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the override. Names need not be unique; identify overrides by id. + * + * @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 AiGatewayCaptureOverrideResponseDataAttributes revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Current override revision, required for replacement or deletion. + * + * @return revision + */ + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayCaptureOverrideResponseDataAttributes scope(AiGatewayCaptureResponseScope scope) { + this.scope = scope; + this.unparsed |= scope.unparsed; + return this; + } + + /** + * Visible request filters. Provider and model tags are withheld when the caller cannot view them. + * An empty object or empty tags can represent a fully restricted scope; scope_restricted + * identifies redaction. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureResponseScope getScope() { + return scope; + } + + public void setScope(AiGatewayCaptureResponseScope scope) { + this.scope = scope; + if (scope != null) { + this.unparsed |= scope.unparsed; + } + } + + public AiGatewayCaptureOverrideResponseDataAttributes scopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + return this; + } + + /** + * Whether provider or model scope metadata was withheld. Omit unchanged scope on replacement to + * preserve it. + * + * @return scopeRestricted + */ + @JsonProperty(JSON_PROPERTY_SCOPE_RESTRICTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getScopeRestricted() { + return scopeRestricted; + } + + public void setScopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + } + + /** + * 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 AiGatewayCaptureOverrideResponseDataAttributes + */ + @JsonAnySetter + public AiGatewayCaptureOverrideResponseDataAttributes 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 AiGatewayCaptureOverrideResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureOverrideResponseDataAttributes aiGatewayCaptureOverrideResponseDataAttributes = + (AiGatewayCaptureOverrideResponseDataAttributes) o; + return Objects.equals( + this.metadataCapture, aiGatewayCaptureOverrideResponseDataAttributes.metadataCapture) + && Objects.equals(this.mode, aiGatewayCaptureOverrideResponseDataAttributes.mode) + && Objects.equals(this.name, aiGatewayCaptureOverrideResponseDataAttributes.name) + && Objects.equals(this.revision, aiGatewayCaptureOverrideResponseDataAttributes.revision) + && Objects.equals(this.scope, aiGatewayCaptureOverrideResponseDataAttributes.scope) + && Objects.equals( + this.scopeRestricted, aiGatewayCaptureOverrideResponseDataAttributes.scopeRestricted) + && Objects.equals( + this.additionalProperties, + aiGatewayCaptureOverrideResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataCapture, mode, name, revision, scope, scopeRestricted, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureOverrideResponseDataAttributes {\n"); + sb.append(" metadataCapture: ").append(toIndentedString(metadataCapture)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" scopeRestricted: ").append(toIndentedString(scopeRestricted)).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/AiGatewayCaptureOverrideResponseDataAttributesMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributesMode.java new file mode 100644 index 00000000000..1ba6be3e61e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataAttributesMode.java @@ -0,0 +1,65 @@ +/* + * 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; + +/** Capture mode for matching traffic. */ +@JsonSerialize( + using = + AiGatewayCaptureOverrideResponseDataAttributesMode + .AiGatewayCaptureOverrideResponseDataAttributesModeSerializer.class) +public class AiGatewayCaptureOverrideResponseDataAttributesMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayCaptureOverrideResponseDataAttributesMode METADATA_ONLY = + new AiGatewayCaptureOverrideResponseDataAttributesMode("metadata_only"); + public static final AiGatewayCaptureOverrideResponseDataAttributesMode FULL_CAPTURE = + new AiGatewayCaptureOverrideResponseDataAttributesMode("full_capture"); + + AiGatewayCaptureOverrideResponseDataAttributesMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureOverrideResponseDataAttributesModeSerializer + extends StdSerializer { + public AiGatewayCaptureOverrideResponseDataAttributesModeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureOverrideResponseDataAttributesModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureOverrideResponseDataAttributesMode value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureOverrideResponseDataAttributesMode fromValue(String value) { + return new AiGatewayCaptureOverrideResponseDataAttributesMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataType.java new file mode 100644 index 00000000000..6c098d9621f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureOverrideResponseDataType.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; + +/** Data capture overrides resource type. */ +@JsonSerialize( + using = + AiGatewayCaptureOverrideResponseDataType.AiGatewayCaptureOverrideResponseDataTypeSerializer + .class) +public class AiGatewayCaptureOverrideResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("data-capture-overrides")); + + public static final AiGatewayCaptureOverrideResponseDataType DATA_CAPTURE_OVERRIDES = + new AiGatewayCaptureOverrideResponseDataType("data-capture-overrides"); + + AiGatewayCaptureOverrideResponseDataType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureOverrideResponseDataTypeSerializer + extends StdSerializer { + public AiGatewayCaptureOverrideResponseDataTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureOverrideResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureOverrideResponseDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureOverrideResponseDataType fromValue(String value) { + return new AiGatewayCaptureOverrideResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureResponseScope.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureResponseScope.java new file mode 100644 index 00000000000..190d197ea07 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureResponseScope.java @@ -0,0 +1,157 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * Visible request filters. Provider and model tags are withheld when the caller cannot view them. + * An empty object or empty tags can represent a fully restricted scope; scope_restricted identifies + * redaction. + */ +@JsonPropertyOrder({ + AiGatewayCaptureResponseScope.JSON_PROPERTY_TAGS, + AiGatewayCaptureResponseScope.JSON_PROPERTY_TEAM_ID, + AiGatewayCaptureResponseScope.JSON_PROPERTY_USER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureResponseScope { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = null; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private UUID teamId; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private UUID userId; + + public AiGatewayCaptureResponseScope tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayCaptureResponseScope putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Exact-match request tags with lowercase keys. The reserved model tag is the + * canonical model ID, and the reserved provider tag is the configured connection + * slug. The server sets both. Custom tags come from x-dd-tag headers. Keys and + * values must not have leading or trailing white space. Values are case-sensitive. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayCaptureResponseScope teamId(UUID teamId) { + this.teamId = teamId; + return this; + } + + /** + * UUID of a Datadog team. Matches the authorized team selected by the x-ai-gateway-team + * request header. Requests without this header do not match team-scoped overrides. + * Open-membership teams cannot scope overrides. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTeamId() { + return teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = teamId; + } + + public AiGatewayCaptureResponseScope userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * Authenticated Datadog user UUID in this organization. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + /** Return true if this AiGatewayCaptureResponseScope object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureResponseScope aiGatewayCaptureResponseScope = (AiGatewayCaptureResponseScope) o; + return Objects.equals(this.tags, aiGatewayCaptureResponseScope.tags) + && Objects.equals(this.teamId, aiGatewayCaptureResponseScope.teamId) + && Objects.equals(this.userId, aiGatewayCaptureResponseScope.userId); + } + + @Override + public int hashCode() { + return Objects.hash(tags, teamId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureResponseScope {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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/AiGatewayCaptureScope.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureScope.java new file mode 100644 index 00000000000..75587556142 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureScope.java @@ -0,0 +1,160 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * All selected filters combine with AND, with one value per filter. The model and + * provider tags apply to each actual direct or routed attempt, including fallback + * destinations. Routes are not selectable filters. At least one filter is required. If any matching + * override uses metadata_only, that mode applies. Otherwise, if any matching override + * uses full_capture, that mode applies. The organization default applies only when no + * override matches. Overrides have no priority or specificity ordering. + */ +@JsonPropertyOrder({ + AiGatewayCaptureScope.JSON_PROPERTY_TAGS, + AiGatewayCaptureScope.JSON_PROPERTY_TEAM_ID, + AiGatewayCaptureScope.JSON_PROPERTY_USER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureScope { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = null; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private UUID teamId; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private UUID userId; + + public AiGatewayCaptureScope tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayCaptureScope putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Exact-match request tags with lowercase keys. The reserved model tag is the + * canonical model ID, and the reserved provider tag is the configured connection + * slug. The server sets both. Custom tags come from x-dd-tag headers. Keys and + * values must not have leading or trailing white space. Values are case-sensitive. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayCaptureScope teamId(UUID teamId) { + this.teamId = teamId; + return this; + } + + /** + * UUID of a Datadog team. Matches the authorized team selected by the x-ai-gateway-team + * request header. Requests without this header do not match team-scoped overrides. + * Open-membership teams cannot scope overrides. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTeamId() { + return teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = teamId; + } + + public AiGatewayCaptureScope userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * Authenticated Datadog user UUID in this organization. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + /** Return true if this AiGatewayCaptureScope object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureScope aiGatewayCaptureScope = (AiGatewayCaptureScope) o; + return Objects.equals(this.tags, aiGatewayCaptureScope.tags) + && Objects.equals(this.teamId, aiGatewayCaptureScope.teamId) + && Objects.equals(this.userId, aiGatewayCaptureScope.userId); + } + + @Override + public int hashCode() { + return Objects.hash(tags, teamId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureScope {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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/AiGatewayCaptureUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequest.java new file mode 100644 index 00000000000..83b78032875 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for replacing a scoped data capture override. */ +@JsonPropertyOrder({AiGatewayCaptureUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayCaptureUpdateRequestData data; + + public AiGatewayCaptureUpdateRequest() {} + + @JsonCreator + public AiGatewayCaptureUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayCaptureUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayCaptureUpdateRequest data(AiGatewayCaptureUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Existing override identifier, replacement settings, and revisions required for the update. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureUpdateRequestData getData() { + return data; + } + + public void setData(AiGatewayCaptureUpdateRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayCaptureUpdateRequest + */ + @JsonAnySetter + public AiGatewayCaptureUpdateRequest 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 AiGatewayCaptureUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureUpdateRequest aiGatewayCaptureUpdateRequest = (AiGatewayCaptureUpdateRequest) o; + return Objects.equals(this.data, aiGatewayCaptureUpdateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestData.java new file mode 100644 index 00000000000..3fb48649262 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestData.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Existing override identifier, replacement settings, and revisions required for the update. */ +@JsonPropertyOrder({ + AiGatewayCaptureUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayCaptureUpdateRequestData.JSON_PROPERTY_ID, + AiGatewayCaptureUpdateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureUpdateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayCaptureUpdateRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayCaptureUpdateRequestDataType type = + AiGatewayCaptureUpdateRequestDataType.DATA_CAPTURE_OVERRIDES; + + public AiGatewayCaptureUpdateRequestData() {} + + @JsonCreator + public AiGatewayCaptureUpdateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayCaptureUpdateRequestDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayCaptureUpdateRequestDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayCaptureUpdateRequestData attributes( + AiGatewayCaptureUpdateRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Replacement settings and revisions for updating the override. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureUpdateRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayCaptureUpdateRequestDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayCaptureUpdateRequestData id(UUID id) { + this.id = id; + return this; + } + + /** + * UUID of the override to replace. Must match the id path parameter. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayCaptureUpdateRequestData type(AiGatewayCaptureUpdateRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Data capture overrides resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureUpdateRequestDataType getType() { + return type; + } + + public void setType(AiGatewayCaptureUpdateRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayCaptureUpdateRequestData + */ + @JsonAnySetter + public AiGatewayCaptureUpdateRequestData 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 AiGatewayCaptureUpdateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureUpdateRequestData aiGatewayCaptureUpdateRequestData = + (AiGatewayCaptureUpdateRequestData) o; + return Objects.equals(this.attributes, aiGatewayCaptureUpdateRequestData.attributes) + && Objects.equals(this.id, aiGatewayCaptureUpdateRequestData.id) + && Objects.equals(this.type, aiGatewayCaptureUpdateRequestData.type) + && Objects.equals( + this.additionalProperties, aiGatewayCaptureUpdateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureUpdateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributes.java new file mode 100644 index 00000000000..9b2656344ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributes.java @@ -0,0 +1,400 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Replacement settings and revisions for updating the override. */ +@JsonPropertyOrder({ + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_CONFIGURATION_REVISION, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_CONFIRM_FULL_CAPTURE, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_METADATA_CAPTURE, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_MODE, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_NAME, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_OPERATION, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_REVISION, + AiGatewayCaptureUpdateRequestDataAttributes.JSON_PROPERTY_SCOPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayCaptureUpdateRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGURATION_REVISION = "configuration_revision"; + private String configurationRevision; + + public static final String JSON_PROPERTY_CONFIRM_FULL_CAPTURE = "confirm_full_capture"; + private Boolean confirmFullCapture; + + public static final String JSON_PROPERTY_METADATA_CAPTURE = "metadata_capture"; + private List metadataCapture = null; + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayCaptureUpdateRequestDataAttributesMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPERATION = "operation"; + private AiGatewayCaptureUpdateRequestDataAttributesOperation operation; + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private AiGatewayCaptureScope scope; + + public AiGatewayCaptureUpdateRequestDataAttributes() {} + + @JsonCreator + public AiGatewayCaptureUpdateRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGURATION_REVISION) + String configurationRevision, + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) + AiGatewayCaptureUpdateRequestDataAttributesMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REVISION) Long revision) { + this.configurationRevision = configurationRevision; + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.name = name; + this.revision = revision; + } + + public AiGatewayCaptureUpdateRequestDataAttributes configurationRevision( + String configurationRevision) { + this.configurationRevision = configurationRevision; + return this; + } + + /** + * Opaque revision of the organization default and all overrides. Writes require the revision + * returned by a current read or preview. + * + * @return configurationRevision + */ + @JsonProperty(JSON_PROPERTY_CONFIGURATION_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigurationRevision() { + return configurationRevision; + } + + public void setConfigurationRevision(String configurationRevision) { + this.configurationRevision = configurationRevision; + } + + public AiGatewayCaptureUpdateRequestDataAttributes confirmFullCapture( + Boolean confirmFullCapture) { + this.confirmFullCapture = confirmFullCapture; + return this; + } + + /** + * Set to true to confirm a change that can enable full capture, including a deletion + * that causes a full_capture override or the organization default to apply. + * + * @return confirmFullCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIRM_FULL_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getConfirmFullCapture() { + return confirmFullCapture; + } + + public void setConfirmFullCapture(Boolean confirmFullCapture) { + this.confirmFullCapture = confirmFullCapture; + } + + public AiGatewayCaptureUpdateRequestDataAttributes metadataCapture( + List metadataCapture) { + this.metadataCapture = metadataCapture; + return this; + } + + public AiGatewayCaptureUpdateRequestDataAttributes addMetadataCaptureItem( + AiGatewayMetadataCaptureItem metadataCaptureItem) { + if (this.metadataCapture == null) { + this.metadataCapture = new ArrayList<>(); + } + this.metadataCapture.add(metadataCaptureItem); + this.unparsed |= !metadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return metadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadataCapture() { + return metadataCapture; + } + + public void setMetadataCapture(List metadataCapture) { + this.metadataCapture = metadataCapture; + } + + public AiGatewayCaptureUpdateRequestDataAttributes mode( + AiGatewayCaptureUpdateRequestDataAttributesMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Capture mode for matching traffic. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayCaptureUpdateRequestDataAttributesMode getMode() { + return mode; + } + + public void setMode(AiGatewayCaptureUpdateRequestDataAttributesMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayCaptureUpdateRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the override. Names need not be unique; identify overrides by id. + * + * @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 AiGatewayCaptureUpdateRequestDataAttributes operation( + AiGatewayCaptureUpdateRequestDataAttributesOperation operation) { + this.operation = operation; + this.unparsed |= !operation.isValid(); + return this; + } + + /** + * Proposed operation for preview. Write endpoints infer it from the HTTP method. + * + * @return operation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayCaptureUpdateRequestDataAttributesOperation getOperation() { + return operation; + } + + public void setOperation(AiGatewayCaptureUpdateRequestDataAttributesOperation operation) { + if (!operation.isValid()) { + this.unparsed = true; + } + this.operation = operation; + } + + public AiGatewayCaptureUpdateRequestDataAttributes revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Current override revision, required for replacement or deletion. + * + * @return revision + */ + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayCaptureUpdateRequestDataAttributes scope(AiGatewayCaptureScope scope) { + this.scope = scope; + this.unparsed |= scope.unparsed; + return this; + } + + /** + * All selected filters combine with AND, with one value per filter. The model and + * provider tags apply to each actual direct or routed attempt, including fallback + * destinations. Routes are not selectable filters. At least one filter is required. If any + * matching override uses metadata_only, that mode applies. Otherwise, if any + * matching override uses full_capture, that mode applies. The organization default + * applies only when no override matches. Overrides have no priority or specificity ordering. + * + * @return scope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayCaptureScope getScope() { + return scope; + } + + public void setScope(AiGatewayCaptureScope scope) { + this.scope = scope; + if (scope != null) { + this.unparsed |= scope.unparsed; + } + } + + /** + * 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 AiGatewayCaptureUpdateRequestDataAttributes + */ + @JsonAnySetter + public AiGatewayCaptureUpdateRequestDataAttributes 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 AiGatewayCaptureUpdateRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayCaptureUpdateRequestDataAttributes aiGatewayCaptureUpdateRequestDataAttributes = + (AiGatewayCaptureUpdateRequestDataAttributes) o; + return Objects.equals( + this.configurationRevision, + aiGatewayCaptureUpdateRequestDataAttributes.configurationRevision) + && Objects.equals( + this.confirmFullCapture, aiGatewayCaptureUpdateRequestDataAttributes.confirmFullCapture) + && Objects.equals( + this.metadataCapture, aiGatewayCaptureUpdateRequestDataAttributes.metadataCapture) + && Objects.equals(this.mode, aiGatewayCaptureUpdateRequestDataAttributes.mode) + && Objects.equals(this.name, aiGatewayCaptureUpdateRequestDataAttributes.name) + && Objects.equals(this.operation, aiGatewayCaptureUpdateRequestDataAttributes.operation) + && Objects.equals(this.revision, aiGatewayCaptureUpdateRequestDataAttributes.revision) + && Objects.equals(this.scope, aiGatewayCaptureUpdateRequestDataAttributes.scope) + && Objects.equals( + this.additionalProperties, + aiGatewayCaptureUpdateRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationRevision, + confirmFullCapture, + metadataCapture, + mode, + name, + operation, + revision, + scope, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayCaptureUpdateRequestDataAttributes {\n"); + sb.append(" configurationRevision: ") + .append(toIndentedString(configurationRevision)) + .append("\n"); + sb.append(" confirmFullCapture: ").append(toIndentedString(confirmFullCapture)).append("\n"); + sb.append(" metadataCapture: ").append(toIndentedString(metadataCapture)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).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/AiGatewayCaptureUpdateRequestDataAttributesMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesMode.java new file mode 100644 index 00000000000..2d105593cd1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesMode.java @@ -0,0 +1,65 @@ +/* + * 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; + +/** Capture mode for matching traffic. */ +@JsonSerialize( + using = + AiGatewayCaptureUpdateRequestDataAttributesMode + .AiGatewayCaptureUpdateRequestDataAttributesModeSerializer.class) +public class AiGatewayCaptureUpdateRequestDataAttributesMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayCaptureUpdateRequestDataAttributesMode METADATA_ONLY = + new AiGatewayCaptureUpdateRequestDataAttributesMode("metadata_only"); + public static final AiGatewayCaptureUpdateRequestDataAttributesMode FULL_CAPTURE = + new AiGatewayCaptureUpdateRequestDataAttributesMode("full_capture"); + + AiGatewayCaptureUpdateRequestDataAttributesMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureUpdateRequestDataAttributesModeSerializer + extends StdSerializer { + public AiGatewayCaptureUpdateRequestDataAttributesModeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureUpdateRequestDataAttributesModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureUpdateRequestDataAttributesMode value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureUpdateRequestDataAttributesMode fromValue(String value) { + return new AiGatewayCaptureUpdateRequestDataAttributesMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesOperation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesOperation.java new file mode 100644 index 00000000000..ac708b0a3e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataAttributesOperation.java @@ -0,0 +1,67 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Proposed operation for preview. Write endpoints infer it from the HTTP method. */ +@JsonSerialize( + using = + AiGatewayCaptureUpdateRequestDataAttributesOperation + .AiGatewayCaptureUpdateRequestDataAttributesOperationSerializer.class) +public class AiGatewayCaptureUpdateRequestDataAttributesOperation extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("create", "replace", "delete")); + + public static final AiGatewayCaptureUpdateRequestDataAttributesOperation CREATE = + new AiGatewayCaptureUpdateRequestDataAttributesOperation("create"); + public static final AiGatewayCaptureUpdateRequestDataAttributesOperation REPLACE = + new AiGatewayCaptureUpdateRequestDataAttributesOperation("replace"); + public static final AiGatewayCaptureUpdateRequestDataAttributesOperation DELETE = + new AiGatewayCaptureUpdateRequestDataAttributesOperation("delete"); + + AiGatewayCaptureUpdateRequestDataAttributesOperation(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureUpdateRequestDataAttributesOperationSerializer + extends StdSerializer { + public AiGatewayCaptureUpdateRequestDataAttributesOperationSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureUpdateRequestDataAttributesOperationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureUpdateRequestDataAttributesOperation value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureUpdateRequestDataAttributesOperation fromValue(String value) { + return new AiGatewayCaptureUpdateRequestDataAttributesOperation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataType.java new file mode 100644 index 00000000000..4bfef20d5b8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCaptureUpdateRequestDataType.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; + +/** Data capture overrides resource type. */ +@JsonSerialize( + using = + AiGatewayCaptureUpdateRequestDataType.AiGatewayCaptureUpdateRequestDataTypeSerializer.class) +public class AiGatewayCaptureUpdateRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("data-capture-overrides")); + + public static final AiGatewayCaptureUpdateRequestDataType DATA_CAPTURE_OVERRIDES = + new AiGatewayCaptureUpdateRequestDataType("data-capture-overrides"); + + AiGatewayCaptureUpdateRequestDataType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCaptureUpdateRequestDataTypeSerializer + extends StdSerializer { + public AiGatewayCaptureUpdateRequestDataTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayCaptureUpdateRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCaptureUpdateRequestDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCaptureUpdateRequestDataType fromValue(String value) { + return new AiGatewayCaptureUpdateRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayCustomProviderSupportedOperation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCustomProviderSupportedOperation.java new file mode 100644 index 00000000000..8192161b52a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayCustomProviderSupportedOperation.java @@ -0,0 +1,68 @@ +/* + * 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; + +/** Operation supported by a custom provider. */ +@JsonSerialize( + using = + AiGatewayCustomProviderSupportedOperation + .AiGatewayCustomProviderSupportedOperationSerializer.class) +public class AiGatewayCustomProviderSupportedOperation extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("OPENAI_CHAT_COMPLETIONS", "OPENAI_RESPONSES", "ANTHROPIC_MESSAGES")); + + public static final AiGatewayCustomProviderSupportedOperation OPENAI_CHAT_COMPLETIONS = + new AiGatewayCustomProviderSupportedOperation("OPENAI_CHAT_COMPLETIONS"); + public static final AiGatewayCustomProviderSupportedOperation OPENAI_RESPONSES = + new AiGatewayCustomProviderSupportedOperation("OPENAI_RESPONSES"); + public static final AiGatewayCustomProviderSupportedOperation ANTHROPIC_MESSAGES = + new AiGatewayCustomProviderSupportedOperation("ANTHROPIC_MESSAGES"); + + AiGatewayCustomProviderSupportedOperation(String value) { + super(value, allowedValues); + } + + public static class AiGatewayCustomProviderSupportedOperationSerializer + extends StdSerializer { + public AiGatewayCustomProviderSupportedOperationSerializer( + Class t) { + super(t); + } + + public AiGatewayCustomProviderSupportedOperationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayCustomProviderSupportedOperation value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayCustomProviderSupportedOperation fromValue(String value) { + return new AiGatewayCustomProviderSupportedOperation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayDataCaptureMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDataCaptureMode.java new file mode 100644 index 00000000000..007023f4ec5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDataCaptureMode.java @@ -0,0 +1,59 @@ +/* + * 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; + +/** Controls whether AI Gateway captures request and response content in addition to metadata. */ +@JsonSerialize(using = AiGatewayDataCaptureMode.AiGatewayDataCaptureModeSerializer.class) +public class AiGatewayDataCaptureMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metadata_only", "full_capture")); + + public static final AiGatewayDataCaptureMode METADATA_ONLY = + new AiGatewayDataCaptureMode("metadata_only"); + public static final AiGatewayDataCaptureMode FULL_CAPTURE = + new AiGatewayDataCaptureMode("full_capture"); + + AiGatewayDataCaptureMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayDataCaptureModeSerializer + extends StdSerializer { + public AiGatewayDataCaptureModeSerializer(Class t) { + super(t); + } + + public AiGatewayDataCaptureModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayDataCaptureMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayDataCaptureMode fromValue(String value) { + return new AiGatewayDataCaptureMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelAttributes.java new file mode 100644 index 00000000000..b5249725772 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelAttributes.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Model discovered from a provider integration account. */ +@JsonPropertyOrder({ + AiGatewayDiscoveredModelAttributes.JSON_PROPERTY_DISPLAY_NAME, + AiGatewayDiscoveredModelAttributes.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayDiscoveredModelAttributes.JSON_PROPERTY_SUPPORTED_OPERATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayDiscoveredModelAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = new ArrayList<>(); + + public AiGatewayDiscoveredModelAttributes() {} + + @JsonCreator + public AiGatewayDiscoveredModelAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_WIRE) String modelIdWire, + @JsonProperty(required = true, value = JSON_PROPERTY_SUPPORTED_OPERATIONS) + List supportedOperations) { + this.modelIdWire = modelIdWire; + this.supportedOperations = supportedOperations; + } + + public AiGatewayDiscoveredModelAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Human-readable model name. + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public AiGatewayDiscoveredModelAttributes modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayDiscoveredModelAttributes supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayDiscoveredModelAttributes addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + /** + * 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 AiGatewayDiscoveredModelAttributes + */ + @JsonAnySetter + public AiGatewayDiscoveredModelAttributes 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 AiGatewayDiscoveredModelAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayDiscoveredModelAttributes aiGatewayDiscoveredModelAttributes = + (AiGatewayDiscoveredModelAttributes) o; + return Objects.equals(this.displayName, aiGatewayDiscoveredModelAttributes.displayName) + && Objects.equals(this.modelIdWire, aiGatewayDiscoveredModelAttributes.modelIdWire) + && Objects.equals( + this.supportedOperations, aiGatewayDiscoveredModelAttributes.supportedOperations) + && Objects.equals( + this.additionalProperties, aiGatewayDiscoveredModelAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, modelIdWire, supportedOperations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayDiscoveredModelAttributes {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .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/AiGatewayDiscoveredModelListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelListResponse.java new file mode 100644 index 00000000000..bc96324a0e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelListResponse.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing models discovered from an integration account. */ +@JsonPropertyOrder({AiGatewayDiscoveredModelListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayDiscoveredModelListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayDiscoveredModelListResponse() {} + + @JsonCreator + public AiGatewayDiscoveredModelListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayDiscoveredModelResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayDiscoveredModelListResponse data(List data) { + this.data = data; + for (AiGatewayDiscoveredModelResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayDiscoveredModelListResponse addDataItem( + AiGatewayDiscoveredModelResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayDiscoveredModelResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayDiscoveredModelListResponse + */ + @JsonAnySetter + public AiGatewayDiscoveredModelListResponse 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 AiGatewayDiscoveredModelListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayDiscoveredModelListResponse aiGatewayDiscoveredModelListResponse = + (AiGatewayDiscoveredModelListResponse) o; + return Objects.equals(this.data, aiGatewayDiscoveredModelListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayDiscoveredModelListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayDiscoveredModelListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelResource.java new file mode 100644 index 00000000000..77a282a86c9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelResource.java @@ -0,0 +1,216 @@ +/* + * 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; + +/** Discovered provider model resource. */ +@JsonPropertyOrder({ + AiGatewayDiscoveredModelResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayDiscoveredModelResource.JSON_PROPERTY_ID, + AiGatewayDiscoveredModelResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayDiscoveredModelResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayDiscoveredModelAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayDiscoveredModelType type; + + public AiGatewayDiscoveredModelResource() {} + + @JsonCreator + public AiGatewayDiscoveredModelResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayDiscoveredModelAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayDiscoveredModelType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayDiscoveredModelResource attributes( + AiGatewayDiscoveredModelAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Model discovered from a provider integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayDiscoveredModelAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayDiscoveredModelAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayDiscoveredModelResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayDiscoveredModelResource type(AiGatewayDiscoveredModelType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Discovered provider model resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayDiscoveredModelType getType() { + return type; + } + + public void setType(AiGatewayDiscoveredModelType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayDiscoveredModelResource + */ + @JsonAnySetter + public AiGatewayDiscoveredModelResource 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 AiGatewayDiscoveredModelResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayDiscoveredModelResource aiGatewayDiscoveredModelResource = + (AiGatewayDiscoveredModelResource) o; + return Objects.equals(this.attributes, aiGatewayDiscoveredModelResource.attributes) + && Objects.equals(this.id, aiGatewayDiscoveredModelResource.id) + && Objects.equals(this.type, aiGatewayDiscoveredModelResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayDiscoveredModelResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayDiscoveredModelResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelType.java new file mode 100644 index 00000000000..e231c940d82 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayDiscoveredModelType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** Discovered provider model resource type. */ +@JsonSerialize(using = AiGatewayDiscoveredModelType.AiGatewayDiscoveredModelTypeSerializer.class) +public class AiGatewayDiscoveredModelType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("provider-models")); + + public static final AiGatewayDiscoveredModelType PROVIDER_MODELS = + new AiGatewayDiscoveredModelType("provider-models"); + + AiGatewayDiscoveredModelType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayDiscoveredModelTypeSerializer + extends StdSerializer { + public AiGatewayDiscoveredModelTypeSerializer(Class t) { + super(t); + } + + public AiGatewayDiscoveredModelTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayDiscoveredModelType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayDiscoveredModelType fromValue(String value) { + return new AiGatewayDiscoveredModelType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceAttributes.java new file mode 100644 index 00000000000..f123c314602 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceAttributes.java @@ -0,0 +1,230 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Organization-wide AI Gateway governance controls. */ +@JsonPropertyOrder({ + AiGatewayGovernanceAttributes.JSON_PROPERTY_DATA_CAPTURE_MODE, + AiGatewayGovernanceAttributes.JSON_PROPERTY_METADATA_CAPTURE, + AiGatewayGovernanceAttributes.JSON_PROPERTY_ZDR_MODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayGovernanceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA_CAPTURE_MODE = "data_capture_mode"; + private AiGatewayDataCaptureMode dataCaptureMode; + + public static final String JSON_PROPERTY_METADATA_CAPTURE = "metadata_capture"; + private List metadataCapture = null; + + public static final String JSON_PROPERTY_ZDR_MODE = "zdr_mode"; + private AiGatewayZDRMode zdrMode; + + public AiGatewayGovernanceAttributes() {} + + @JsonCreator + public AiGatewayGovernanceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_CAPTURE_MODE) + AiGatewayDataCaptureMode dataCaptureMode, + @JsonProperty(required = true, value = JSON_PROPERTY_ZDR_MODE) AiGatewayZDRMode zdrMode) { + this.dataCaptureMode = dataCaptureMode; + this.unparsed |= !dataCaptureMode.isValid(); + this.zdrMode = zdrMode; + this.unparsed |= !zdrMode.isValid(); + } + + public AiGatewayGovernanceAttributes dataCaptureMode(AiGatewayDataCaptureMode dataCaptureMode) { + this.dataCaptureMode = dataCaptureMode; + this.unparsed |= !dataCaptureMode.isValid(); + return this; + } + + /** + * Controls whether AI Gateway captures request and response content in addition to metadata. + * + * @return dataCaptureMode + */ + @JsonProperty(JSON_PROPERTY_DATA_CAPTURE_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayDataCaptureMode getDataCaptureMode() { + return dataCaptureMode; + } + + public void setDataCaptureMode(AiGatewayDataCaptureMode dataCaptureMode) { + if (!dataCaptureMode.isValid()) { + this.unparsed = true; + } + this.dataCaptureMode = dataCaptureMode; + } + + public AiGatewayGovernanceAttributes metadataCapture( + List metadataCapture) { + this.metadataCapture = metadataCapture; + return this; + } + + public AiGatewayGovernanceAttributes addMetadataCaptureItem( + AiGatewayMetadataCaptureItem metadataCaptureItem) { + if (this.metadataCapture == null) { + this.metadataCapture = new ArrayList<>(); + } + this.metadataCapture.add(metadataCaptureItem); + this.unparsed |= !metadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return metadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadataCapture() { + return metadataCapture; + } + + public void setMetadataCapture(List metadataCapture) { + this.metadataCapture = metadataCapture; + } + + public AiGatewayGovernanceAttributes zdrMode(AiGatewayZDRMode zdrMode) { + this.zdrMode = zdrMode; + this.unparsed |= !zdrMode.isValid(); + return this; + } + + /** + * Zero data retention requirement for the organization's requests. + * + * @return zdrMode + */ + @JsonProperty(JSON_PROPERTY_ZDR_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayZDRMode getZdrMode() { + return zdrMode; + } + + public void setZdrMode(AiGatewayZDRMode zdrMode) { + if (!zdrMode.isValid()) { + this.unparsed = true; + } + this.zdrMode = zdrMode; + } + + /** + * 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 AiGatewayGovernanceAttributes + */ + @JsonAnySetter + public AiGatewayGovernanceAttributes 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 AiGatewayGovernanceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayGovernanceAttributes aiGatewayGovernanceAttributes = (AiGatewayGovernanceAttributes) o; + return Objects.equals(this.dataCaptureMode, aiGatewayGovernanceAttributes.dataCaptureMode) + && Objects.equals(this.metadataCapture, aiGatewayGovernanceAttributes.metadataCapture) + && Objects.equals(this.zdrMode, aiGatewayGovernanceAttributes.zdrMode) + && Objects.equals( + this.additionalProperties, aiGatewayGovernanceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dataCaptureMode, metadataCapture, zdrMode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayGovernanceAttributes {\n"); + sb.append(" dataCaptureMode: ").append(toIndentedString(dataCaptureMode)).append("\n"); + sb.append(" metadataCapture: ").append(toIndentedString(metadataCapture)).append("\n"); + sb.append(" zdrMode: ").append(toIndentedString(zdrMode)).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/AiGatewayGovernanceReplaceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceAttributes.java new file mode 100644 index 00000000000..a380834e470 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceAttributes.java @@ -0,0 +1,232 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Organization-wide AI Gateway governance controls to replace. */ +@JsonPropertyOrder({ + AiGatewayGovernanceReplaceAttributes.JSON_PROPERTY_DATA_CAPTURE_MODE, + AiGatewayGovernanceReplaceAttributes.JSON_PROPERTY_METADATA_CAPTURE, + AiGatewayGovernanceReplaceAttributes.JSON_PROPERTY_ZDR_MODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayGovernanceReplaceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA_CAPTURE_MODE = "data_capture_mode"; + private AiGatewayDataCaptureMode dataCaptureMode; + + public static final String JSON_PROPERTY_METADATA_CAPTURE = "metadata_capture"; + private List metadataCapture = null; + + public static final String JSON_PROPERTY_ZDR_MODE = "zdr_mode"; + private AiGatewayZDRMode zdrMode; + + public AiGatewayGovernanceReplaceAttributes() {} + + @JsonCreator + public AiGatewayGovernanceReplaceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_CAPTURE_MODE) + AiGatewayDataCaptureMode dataCaptureMode) { + this.dataCaptureMode = dataCaptureMode; + this.unparsed |= !dataCaptureMode.isValid(); + } + + public AiGatewayGovernanceReplaceAttributes dataCaptureMode( + AiGatewayDataCaptureMode dataCaptureMode) { + this.dataCaptureMode = dataCaptureMode; + this.unparsed |= !dataCaptureMode.isValid(); + return this; + } + + /** + * Controls whether AI Gateway captures request and response content in addition to metadata. + * + * @return dataCaptureMode + */ + @JsonProperty(JSON_PROPERTY_DATA_CAPTURE_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayDataCaptureMode getDataCaptureMode() { + return dataCaptureMode; + } + + public void setDataCaptureMode(AiGatewayDataCaptureMode dataCaptureMode) { + if (!dataCaptureMode.isValid()) { + this.unparsed = true; + } + this.dataCaptureMode = dataCaptureMode; + } + + public AiGatewayGovernanceReplaceAttributes metadataCapture( + List metadataCapture) { + this.metadataCapture = metadataCapture; + return this; + } + + public AiGatewayGovernanceReplaceAttributes addMetadataCaptureItem( + AiGatewayMetadataCaptureItem metadataCaptureItem) { + if (this.metadataCapture == null) { + this.metadataCapture = new ArrayList<>(); + } + this.metadataCapture.add(metadataCaptureItem); + this.unparsed |= !metadataCaptureItem.isValid(); + return this; + } + + /** + * Items Metadata-only capture adds, each listed once. An item requires the items whose + * information it already reveals: tool_output_size, tool_names and + * conversation_shape require tool_usage, and input_size_by_role + * requires tool_output_size. A set that leaves out a required item is + * rejected. When several Metadata-only overrides match a request, it gets only the items all of + * them select. + * + * @return metadataCapture + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_CAPTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadataCapture() { + return metadataCapture; + } + + public void setMetadataCapture(List metadataCapture) { + this.metadataCapture = metadataCapture; + } + + public AiGatewayGovernanceReplaceAttributes zdrMode(AiGatewayZDRMode zdrMode) { + this.zdrMode = zdrMode; + this.unparsed |= !zdrMode.isValid(); + return this; + } + + /** + * Zero data retention requirement for the organization's requests. + * + * @return zdrMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ZDR_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayZDRMode getZdrMode() { + return zdrMode; + } + + public void setZdrMode(AiGatewayZDRMode zdrMode) { + if (!zdrMode.isValid()) { + this.unparsed = true; + } + this.zdrMode = zdrMode; + } + + /** + * 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 AiGatewayGovernanceReplaceAttributes + */ + @JsonAnySetter + public AiGatewayGovernanceReplaceAttributes 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 AiGatewayGovernanceReplaceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayGovernanceReplaceAttributes aiGatewayGovernanceReplaceAttributes = + (AiGatewayGovernanceReplaceAttributes) o; + return Objects.equals( + this.dataCaptureMode, aiGatewayGovernanceReplaceAttributes.dataCaptureMode) + && Objects.equals( + this.metadataCapture, aiGatewayGovernanceReplaceAttributes.metadataCapture) + && Objects.equals(this.zdrMode, aiGatewayGovernanceReplaceAttributes.zdrMode) + && Objects.equals( + this.additionalProperties, aiGatewayGovernanceReplaceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dataCaptureMode, metadataCapture, zdrMode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayGovernanceReplaceAttributes {\n"); + sb.append(" dataCaptureMode: ").append(toIndentedString(dataCaptureMode)).append("\n"); + sb.append(" metadataCapture: ").append(toIndentedString(metadataCapture)).append("\n"); + sb.append(" zdrMode: ").append(toIndentedString(zdrMode)).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/AiGatewayGovernanceReplaceData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceData.java new file mode 100644 index 00000000000..bd7f8677f37 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceData.java @@ -0,0 +1,215 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to replace the organization's AI Gateway governance controls. */ +@JsonPropertyOrder({ + AiGatewayGovernanceReplaceData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayGovernanceReplaceData.JSON_PROPERTY_ID, + AiGatewayGovernanceReplaceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayGovernanceReplaceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayGovernanceReplaceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayGovernanceType type; + + public AiGatewayGovernanceReplaceData() {} + + @JsonCreator + public AiGatewayGovernanceReplaceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayGovernanceReplaceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayGovernanceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayGovernanceReplaceData attributes( + AiGatewayGovernanceReplaceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Organization-wide AI Gateway governance controls to replace. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayGovernanceReplaceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayGovernanceReplaceAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayGovernanceReplaceData id(String id) { + this.id = id; + return this; + } + + /** + * Optional singleton governance resource identifier. When provided, it must be organization + * . + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayGovernanceReplaceData type(AiGatewayGovernanceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway governance resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayGovernanceType getType() { + return type; + } + + public void setType(AiGatewayGovernanceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayGovernanceReplaceData + */ + @JsonAnySetter + public AiGatewayGovernanceReplaceData 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 AiGatewayGovernanceReplaceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayGovernanceReplaceData aiGatewayGovernanceReplaceData = + (AiGatewayGovernanceReplaceData) o; + return Objects.equals(this.attributes, aiGatewayGovernanceReplaceData.attributes) + && Objects.equals(this.id, aiGatewayGovernanceReplaceData.id) + && Objects.equals(this.type, aiGatewayGovernanceReplaceData.type) + && Objects.equals( + this.additionalProperties, aiGatewayGovernanceReplaceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayGovernanceReplaceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceRequest.java new file mode 100644 index 00000000000..c90097ffb5e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceReplaceRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to replace the organization's AI Gateway governance controls. */ +@JsonPropertyOrder({AiGatewayGovernanceReplaceRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayGovernanceReplaceRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayGovernanceReplaceData data; + + public AiGatewayGovernanceReplaceRequest() {} + + @JsonCreator + public AiGatewayGovernanceReplaceRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayGovernanceReplaceData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayGovernanceReplaceRequest data(AiGatewayGovernanceReplaceData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to replace the organization's AI Gateway governance controls. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayGovernanceReplaceData getData() { + return data; + } + + public void setData(AiGatewayGovernanceReplaceData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayGovernanceReplaceRequest + */ + @JsonAnySetter + public AiGatewayGovernanceReplaceRequest 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 AiGatewayGovernanceReplaceRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayGovernanceReplaceRequest aiGatewayGovernanceReplaceRequest = + (AiGatewayGovernanceReplaceRequest) o; + return Objects.equals(this.data, aiGatewayGovernanceReplaceRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayGovernanceReplaceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayGovernanceReplaceRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResource.java new file mode 100644 index 00000000000..92404357813 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResource.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Organization-wide AI Gateway governance resource. */ +@JsonPropertyOrder({ + AiGatewayGovernanceResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayGovernanceResource.JSON_PROPERTY_ID, + AiGatewayGovernanceResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayGovernanceResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayGovernanceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayGovernanceType type; + + public AiGatewayGovernanceResource() {} + + @JsonCreator + public AiGatewayGovernanceResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayGovernanceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayGovernanceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayGovernanceResource attributes(AiGatewayGovernanceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Organization-wide AI Gateway governance controls. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayGovernanceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayGovernanceAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayGovernanceResource id(String id) { + this.id = id; + return this; + } + + /** + * Singleton governance resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayGovernanceResource type(AiGatewayGovernanceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway governance resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayGovernanceType getType() { + return type; + } + + public void setType(AiGatewayGovernanceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayGovernanceResource + */ + @JsonAnySetter + public AiGatewayGovernanceResource 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 AiGatewayGovernanceResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayGovernanceResource aiGatewayGovernanceResource = (AiGatewayGovernanceResource) o; + return Objects.equals(this.attributes, aiGatewayGovernanceResource.attributes) + && Objects.equals(this.id, aiGatewayGovernanceResource.id) + && Objects.equals(this.type, aiGatewayGovernanceResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayGovernanceResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayGovernanceResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResponse.java new file mode 100644 index 00000000000..d557798203c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the organization's AI Gateway governance controls. */ +@JsonPropertyOrder({AiGatewayGovernanceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayGovernanceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayGovernanceResource data; + + public AiGatewayGovernanceResponse() {} + + @JsonCreator + public AiGatewayGovernanceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayGovernanceResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayGovernanceResponse data(AiGatewayGovernanceResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Organization-wide AI Gateway governance resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayGovernanceResource getData() { + return data; + } + + public void setData(AiGatewayGovernanceResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayGovernanceResponse + */ + @JsonAnySetter + public AiGatewayGovernanceResponse 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 AiGatewayGovernanceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayGovernanceResponse aiGatewayGovernanceResponse = (AiGatewayGovernanceResponse) o; + return Objects.equals(this.data, aiGatewayGovernanceResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayGovernanceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayGovernanceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceType.java new file mode 100644 index 00000000000..1a29ec99c66 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayGovernanceType.java @@ -0,0 +1,56 @@ +/* + * 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; + +/** AI Gateway governance resource type. */ +@JsonSerialize(using = AiGatewayGovernanceType.AiGatewayGovernanceTypeSerializer.class) +public class AiGatewayGovernanceType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("governance")); + + public static final AiGatewayGovernanceType GOVERNANCE = + new AiGatewayGovernanceType("governance"); + + AiGatewayGovernanceType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayGovernanceTypeSerializer + extends StdSerializer { + public AiGatewayGovernanceTypeSerializer(Class t) { + super(t); + } + + public AiGatewayGovernanceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayGovernanceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayGovernanceType fromValue(String value) { + return new AiGatewayGovernanceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayKnownProvider.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayKnownProvider.java new file mode 100644 index 00000000000..1a8551e72c1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayKnownProvider.java @@ -0,0 +1,80 @@ +/* + * 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; + +/** Known provider implementation. */ +@JsonSerialize(using = AiGatewayKnownProvider.AiGatewayKnownProviderSerializer.class) +public class AiGatewayKnownProvider extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "custom", + "anthropic", + "openai", + "azure_openai", + "bedrock", + "gemini", + "baseten", + "fireworks", + "together", + "typesafe", + "azure_foundry")); + + public static final AiGatewayKnownProvider CUSTOM = new AiGatewayKnownProvider("custom"); + public static final AiGatewayKnownProvider ANTHROPIC = new AiGatewayKnownProvider("anthropic"); + public static final AiGatewayKnownProvider OPENAI = new AiGatewayKnownProvider("openai"); + public static final AiGatewayKnownProvider AZURE_OPENAI = + new AiGatewayKnownProvider("azure_openai"); + public static final AiGatewayKnownProvider BEDROCK = new AiGatewayKnownProvider("bedrock"); + public static final AiGatewayKnownProvider GEMINI = new AiGatewayKnownProvider("gemini"); + public static final AiGatewayKnownProvider BASETEN = new AiGatewayKnownProvider("baseten"); + public static final AiGatewayKnownProvider FIREWORKS = new AiGatewayKnownProvider("fireworks"); + public static final AiGatewayKnownProvider TOGETHER = new AiGatewayKnownProvider("together"); + public static final AiGatewayKnownProvider TYPESAFE = new AiGatewayKnownProvider("typesafe"); + public static final AiGatewayKnownProvider AZURE_FOUNDRY = + new AiGatewayKnownProvider("azure_foundry"); + + AiGatewayKnownProvider(String value) { + super(value, allowedValues); + } + + public static class AiGatewayKnownProviderSerializer + extends StdSerializer { + public AiGatewayKnownProviderSerializer(Class t) { + super(t); + } + + public AiGatewayKnownProviderSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayKnownProvider value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayKnownProvider fromValue(String value) { + return new AiGatewayKnownProvider(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayMaxReasoningLevel.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayMaxReasoningLevel.java new file mode 100644 index 00000000000..2bebc8518f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayMaxReasoningLevel.java @@ -0,0 +1,64 @@ +/* + * 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; + +/** Maximum reasoning level permitted by a model group. */ +@JsonSerialize(using = AiGatewayMaxReasoningLevel.AiGatewayMaxReasoningLevelSerializer.class) +public class AiGatewayMaxReasoningLevel extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("none", "minimal", "low", "medium", "high", "xhigh", "max")); + + public static final AiGatewayMaxReasoningLevel NONE = new AiGatewayMaxReasoningLevel("none"); + public static final AiGatewayMaxReasoningLevel MINIMAL = + new AiGatewayMaxReasoningLevel("minimal"); + public static final AiGatewayMaxReasoningLevel LOW = new AiGatewayMaxReasoningLevel("low"); + public static final AiGatewayMaxReasoningLevel MEDIUM = new AiGatewayMaxReasoningLevel("medium"); + public static final AiGatewayMaxReasoningLevel HIGH = new AiGatewayMaxReasoningLevel("high"); + public static final AiGatewayMaxReasoningLevel XHIGH = new AiGatewayMaxReasoningLevel("xhigh"); + public static final AiGatewayMaxReasoningLevel MAX = new AiGatewayMaxReasoningLevel("max"); + + AiGatewayMaxReasoningLevel(String value) { + super(value, allowedValues); + } + + public static class AiGatewayMaxReasoningLevelSerializer + extends StdSerializer { + public AiGatewayMaxReasoningLevelSerializer(Class t) { + super(t); + } + + public AiGatewayMaxReasoningLevelSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayMaxReasoningLevel value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayMaxReasoningLevel fromValue(String value) { + return new AiGatewayMaxReasoningLevel(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayMetadataCaptureItem.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayMetadataCaptureItem.java new file mode 100644 index 00000000000..1b33952d4dc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayMetadataCaptureItem.java @@ -0,0 +1,86 @@ +/* + * 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; + +/** + * An item Metadata-only capture can add to LLM Observability spans. Each is structure or a number, + * never conversation text. tool_usage adds tool call and result counts; + * tool_output_size adds estimated tool output tokens, total and average; tool_names + * adds each tool call and result with its name, ID and type; conversation_shape + * adds every message with its role and no text; input_size_by_role adds + * estimated input tokens per role; available_tools adds the names of the tools the + * request offered; generation_settings adds numeric and enumerated settings such as + * temperature and the finish reason. + */ +@JsonSerialize(using = AiGatewayMetadataCaptureItem.AiGatewayMetadataCaptureItemSerializer.class) +public class AiGatewayMetadataCaptureItem extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "tool_usage", + "tool_output_size", + "tool_names", + "conversation_shape", + "input_size_by_role", + "available_tools", + "generation_settings")); + + public static final AiGatewayMetadataCaptureItem TOOL_USAGE = + new AiGatewayMetadataCaptureItem("tool_usage"); + public static final AiGatewayMetadataCaptureItem TOOL_OUTPUT_SIZE = + new AiGatewayMetadataCaptureItem("tool_output_size"); + public static final AiGatewayMetadataCaptureItem TOOL_NAMES = + new AiGatewayMetadataCaptureItem("tool_names"); + public static final AiGatewayMetadataCaptureItem CONVERSATION_SHAPE = + new AiGatewayMetadataCaptureItem("conversation_shape"); + public static final AiGatewayMetadataCaptureItem INPUT_SIZE_BY_ROLE = + new AiGatewayMetadataCaptureItem("input_size_by_role"); + public static final AiGatewayMetadataCaptureItem AVAILABLE_TOOLS = + new AiGatewayMetadataCaptureItem("available_tools"); + public static final AiGatewayMetadataCaptureItem GENERATION_SETTINGS = + new AiGatewayMetadataCaptureItem("generation_settings"); + + AiGatewayMetadataCaptureItem(String value) { + super(value, allowedValues); + } + + public static class AiGatewayMetadataCaptureItemSerializer + extends StdSerializer { + public AiGatewayMetadataCaptureItemSerializer(Class t) { + super(t); + } + + public AiGatewayMetadataCaptureItemSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayMetadataCaptureItem value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayMetadataCaptureItem fromValue(String value) { + return new AiGatewayMetadataCaptureItem(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCapabilities.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCapabilities.java new file mode 100644 index 00000000000..6ac909ce2ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCapabilities.java @@ -0,0 +1,283 @@ +/* + * 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.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; + +/** Model features reported by the enrichment source. Omitted properties are unknown. */ +@JsonPropertyOrder({ + AiGatewayModelCapabilities.JSON_PROPERTY_ATTACHMENT, + AiGatewayModelCapabilities.JSON_PROPERTY_INTERLEAVED_REASONING, + AiGatewayModelCapabilities.JSON_PROPERTY_REASONING, + AiGatewayModelCapabilities.JSON_PROPERTY_STRUCTURED_OUTPUT, + AiGatewayModelCapabilities.JSON_PROPERTY_TEMPERATURE, + AiGatewayModelCapabilities.JSON_PROPERTY_TOOL_CALL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCapabilities { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTACHMENT = "attachment"; + private Boolean attachment; + + public static final String JSON_PROPERTY_INTERLEAVED_REASONING = "interleaved_reasoning"; + private Boolean interleavedReasoning; + + public static final String JSON_PROPERTY_REASONING = "reasoning"; + private Boolean reasoning; + + public static final String JSON_PROPERTY_STRUCTURED_OUTPUT = "structured_output"; + private Boolean structuredOutput; + + public static final String JSON_PROPERTY_TEMPERATURE = "temperature"; + private Boolean temperature; + + public static final String JSON_PROPERTY_TOOL_CALL = "tool_call"; + private Boolean toolCall; + + public AiGatewayModelCapabilities attachment(Boolean attachment) { + this.attachment = attachment; + return this; + } + + /** + * Whether attachment input is supported. + * + * @return attachment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTACHMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAttachment() { + return attachment; + } + + public void setAttachment(Boolean attachment) { + this.attachment = attachment; + } + + public AiGatewayModelCapabilities interleavedReasoning(Boolean interleavedReasoning) { + this.interleavedReasoning = interleavedReasoning; + return this; + } + + /** + * Whether reasoning can be interleaved with tool use. + * + * @return interleavedReasoning + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERLEAVED_REASONING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInterleavedReasoning() { + return interleavedReasoning; + } + + public void setInterleavedReasoning(Boolean interleavedReasoning) { + this.interleavedReasoning = interleavedReasoning; + } + + public AiGatewayModelCapabilities reasoning(Boolean reasoning) { + this.reasoning = reasoning; + return this; + } + + /** + * Whether reasoning is supported. + * + * @return reasoning + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASONING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getReasoning() { + return reasoning; + } + + public void setReasoning(Boolean reasoning) { + this.reasoning = reasoning; + } + + public AiGatewayModelCapabilities structuredOutput(Boolean structuredOutput) { + this.structuredOutput = structuredOutput; + return this; + } + + /** + * Whether structured output is supported. + * + * @return structuredOutput + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRUCTURED_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStructuredOutput() { + return structuredOutput; + } + + public void setStructuredOutput(Boolean structuredOutput) { + this.structuredOutput = structuredOutput; + } + + public AiGatewayModelCapabilities temperature(Boolean temperature) { + this.temperature = temperature; + return this; + } + + /** + * Whether temperature can be configured. + * + * @return temperature + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPERATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTemperature() { + return temperature; + } + + public void setTemperature(Boolean temperature) { + this.temperature = temperature; + } + + public AiGatewayModelCapabilities toolCall(Boolean toolCall) { + this.toolCall = toolCall; + return this; + } + + /** + * Whether tool calls are supported. + * + * @return toolCall + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOOL_CALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getToolCall() { + return toolCall; + } + + public void setToolCall(Boolean toolCall) { + this.toolCall = toolCall; + } + + /** + * 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 AiGatewayModelCapabilities + */ + @JsonAnySetter + public AiGatewayModelCapabilities 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 AiGatewayModelCapabilities object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCapabilities aiGatewayModelCapabilities = (AiGatewayModelCapabilities) o; + return Objects.equals(this.attachment, aiGatewayModelCapabilities.attachment) + && Objects.equals( + this.interleavedReasoning, aiGatewayModelCapabilities.interleavedReasoning) + && Objects.equals(this.reasoning, aiGatewayModelCapabilities.reasoning) + && Objects.equals(this.structuredOutput, aiGatewayModelCapabilities.structuredOutput) + && Objects.equals(this.temperature, aiGatewayModelCapabilities.temperature) + && Objects.equals(this.toolCall, aiGatewayModelCapabilities.toolCall) + && Objects.equals( + this.additionalProperties, aiGatewayModelCapabilities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + attachment, + interleavedReasoning, + reasoning, + structuredOutput, + temperature, + toolCall, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCapabilities {\n"); + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append(" interleavedReasoning: ") + .append(toIndentedString(interleavedReasoning)) + .append("\n"); + sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); + sb.append(" structuredOutput: ").append(toIndentedString(structuredOutput)).append("\n"); + sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); + sb.append(" toolCall: ").append(toIndentedString(toolCall)).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/AiGatewayModelCatalogEntryAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryAttributes.java new file mode 100644 index 00000000000..0628e67ad28 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryAttributes.java @@ -0,0 +1,406 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Model catalog entry configuration and metadata. */ +@JsonPropertyOrder({ + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_ENABLED, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_METADATA, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_MODEL_ID_CANONICAL, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_PROVIDER_ID, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_SOURCE, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_SUPPORTED_OPERATIONS, + AiGatewayModelCatalogEntryAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCatalogEntryAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private AiGatewayModelMetadata metadata; + + public static final String JSON_PROPERTY_MODEL_ID_CANONICAL = "model_id_canonical"; + private String modelIdCanonical; + + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private Long providerId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelSource source; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayModelCatalogEntryAttributes() {} + + @JsonCreator + public AiGatewayModelCatalogEntryAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_CANONICAL) + String modelIdCanonical, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_WIRE) String modelIdWire, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_ID) Long providerId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) AiGatewayModelSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_SUPPORTED_OPERATIONS) + List supportedOperations, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.enabled = enabled; + this.modelIdCanonical = modelIdCanonical; + this.modelIdWire = modelIdWire; + this.providerId = providerId; + this.source = source; + this.unparsed |= !source.isValid(); + this.supportedOperations = supportedOperations; + this.updatedAt = updatedAt; + } + + public AiGatewayModelCatalogEntryAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayModelCatalogEntryAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the resource is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public AiGatewayModelCatalogEntryAttributes metadata(AiGatewayModelMetadata metadata) { + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + return this; + } + + /** + * Optional, typed enrichment for a model catalog entry. Missing properties remain unknown. + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelMetadata getMetadata() { + return metadata; + } + + public void setMetadata(AiGatewayModelMetadata metadata) { + this.metadata = metadata; + if (metadata != null) { + this.unparsed |= metadata.unparsed; + } + } + + public AiGatewayModelCatalogEntryAttributes modelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + return this; + } + + /** + * Provider-independent model identifier. + * + * @return modelIdCanonical + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_CANONICAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdCanonical() { + return modelIdCanonical; + } + + public void setModelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + } + + public AiGatewayModelCatalogEntryAttributes modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelCatalogEntryAttributes providerId(Long providerId) { + this.providerId = providerId; + return this; + } + + /** + * Provider identifier. + * + * @return providerId + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getProviderId() { + return providerId; + } + + public void setProviderId(Long providerId) { + this.providerId = providerId; + } + + public AiGatewayModelCatalogEntryAttributes source(AiGatewayModelSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * How a model catalog entry is managed. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelSource getSource() { + return source; + } + + public void setSource(AiGatewayModelSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public AiGatewayModelCatalogEntryAttributes supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayModelCatalogEntryAttributes addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + public AiGatewayModelCatalogEntryAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayModelCatalogEntryAttributes + */ + @JsonAnySetter + public AiGatewayModelCatalogEntryAttributes 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 AiGatewayModelCatalogEntryAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCatalogEntryAttributes aiGatewayModelCatalogEntryAttributes = + (AiGatewayModelCatalogEntryAttributes) o; + return Objects.equals(this.createdAt, aiGatewayModelCatalogEntryAttributes.createdAt) + && Objects.equals(this.enabled, aiGatewayModelCatalogEntryAttributes.enabled) + && Objects.equals(this.metadata, aiGatewayModelCatalogEntryAttributes.metadata) + && Objects.equals( + this.modelIdCanonical, aiGatewayModelCatalogEntryAttributes.modelIdCanonical) + && Objects.equals(this.modelIdWire, aiGatewayModelCatalogEntryAttributes.modelIdWire) + && Objects.equals(this.providerId, aiGatewayModelCatalogEntryAttributes.providerId) + && Objects.equals(this.source, aiGatewayModelCatalogEntryAttributes.source) + && Objects.equals( + this.supportedOperations, aiGatewayModelCatalogEntryAttributes.supportedOperations) + && Objects.equals(this.updatedAt, aiGatewayModelCatalogEntryAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, aiGatewayModelCatalogEntryAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + enabled, + metadata, + modelIdCanonical, + modelIdWire, + providerId, + source, + supportedOperations, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCatalogEntryAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" modelIdCanonical: ").append(toIndentedString(modelIdCanonical)).append("\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayModelCatalogEntryIdentifier.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryIdentifier.java new file mode 100644 index 00000000000..24565ef5af6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryIdentifier.java @@ -0,0 +1,181 @@ +/* + * 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; + +/** Model catalog entry identifier. */ +@JsonPropertyOrder({ + AiGatewayModelCatalogEntryIdentifier.JSON_PROPERTY_ID, + AiGatewayModelCatalogEntryIdentifier.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCatalogEntryIdentifier { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelCatalogEntryType type; + + public AiGatewayModelCatalogEntryIdentifier() {} + + @JsonCreator + public AiGatewayModelCatalogEntryIdentifier( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelCatalogEntryType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelCatalogEntryIdentifier id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelCatalogEntryIdentifier type(AiGatewayModelCatalogEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model catalog entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryType getType() { + return type; + } + + public void setType(AiGatewayModelCatalogEntryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelCatalogEntryIdentifier + */ + @JsonAnySetter + public AiGatewayModelCatalogEntryIdentifier 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 AiGatewayModelCatalogEntryIdentifier object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCatalogEntryIdentifier aiGatewayModelCatalogEntryIdentifier = + (AiGatewayModelCatalogEntryIdentifier) o; + return Objects.equals(this.id, aiGatewayModelCatalogEntryIdentifier.id) + && Objects.equals(this.type, aiGatewayModelCatalogEntryIdentifier.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelCatalogEntryIdentifier.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCatalogEntryIdentifier {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryListResponse.java new file mode 100644 index 00000000000..07f9426920b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryListResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing model catalog entries. */ +@JsonPropertyOrder({AiGatewayModelCatalogEntryListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCatalogEntryListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayModelCatalogEntryListResponse() {} + + @JsonCreator + public AiGatewayModelCatalogEntryListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayModelCatalogEntryResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayModelCatalogEntryListResponse data( + List data) { + this.data = data; + for (AiGatewayModelCatalogEntryResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelCatalogEntryListResponse addDataItem( + AiGatewayModelCatalogEntryResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayModelCatalogEntryResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayModelCatalogEntryListResponse + */ + @JsonAnySetter + public AiGatewayModelCatalogEntryListResponse 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 AiGatewayModelCatalogEntryListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCatalogEntryListResponse aiGatewayModelCatalogEntryListResponse = + (AiGatewayModelCatalogEntryListResponse) o; + return Objects.equals(this.data, aiGatewayModelCatalogEntryListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelCatalogEntryListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCatalogEntryListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResource.java new file mode 100644 index 00000000000..170e6436632 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResource.java @@ -0,0 +1,216 @@ +/* + * 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; + +/** AI Gateway model catalog entry resource. */ +@JsonPropertyOrder({ + AiGatewayModelCatalogEntryResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelCatalogEntryResource.JSON_PROPERTY_ID, + AiGatewayModelCatalogEntryResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCatalogEntryResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelCatalogEntryAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelCatalogEntryType type; + + public AiGatewayModelCatalogEntryResource() {} + + @JsonCreator + public AiGatewayModelCatalogEntryResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelCatalogEntryAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelCatalogEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelCatalogEntryResource attributes( + AiGatewayModelCatalogEntryAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Model catalog entry configuration and metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelCatalogEntryAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelCatalogEntryResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelCatalogEntryResource type(AiGatewayModelCatalogEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model catalog entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryType getType() { + return type; + } + + public void setType(AiGatewayModelCatalogEntryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelCatalogEntryResource + */ + @JsonAnySetter + public AiGatewayModelCatalogEntryResource 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 AiGatewayModelCatalogEntryResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCatalogEntryResource aiGatewayModelCatalogEntryResource = + (AiGatewayModelCatalogEntryResource) o; + return Objects.equals(this.attributes, aiGatewayModelCatalogEntryResource.attributes) + && Objects.equals(this.id, aiGatewayModelCatalogEntryResource.id) + && Objects.equals(this.type, aiGatewayModelCatalogEntryResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelCatalogEntryResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCatalogEntryResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResponse.java new file mode 100644 index 00000000000..d22f2c0dae4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one model catalog entry. */ +@JsonPropertyOrder({AiGatewayModelCatalogEntryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCatalogEntryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelCatalogEntryResource data; + + public AiGatewayModelCatalogEntryResponse() {} + + @JsonCreator + public AiGatewayModelCatalogEntryResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayModelCatalogEntryResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelCatalogEntryResponse data(AiGatewayModelCatalogEntryResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway model catalog entry resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryResource getData() { + return data; + } + + public void setData(AiGatewayModelCatalogEntryResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelCatalogEntryResponse + */ + @JsonAnySetter + public AiGatewayModelCatalogEntryResponse 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 AiGatewayModelCatalogEntryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCatalogEntryResponse aiGatewayModelCatalogEntryResponse = + (AiGatewayModelCatalogEntryResponse) o; + return Objects.equals(this.data, aiGatewayModelCatalogEntryResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelCatalogEntryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCatalogEntryResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryType.java new file mode 100644 index 00000000000..9ff3b1c4a3b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCatalogEntryType.java @@ -0,0 +1,58 @@ +/* + * 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; + +/** Model catalog entry resource type. */ +@JsonSerialize( + using = AiGatewayModelCatalogEntryType.AiGatewayModelCatalogEntryTypeSerializer.class) +public class AiGatewayModelCatalogEntryType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("model-catalog-entries")); + + public static final AiGatewayModelCatalogEntryType MODEL_CATALOG_ENTRIES = + new AiGatewayModelCatalogEntryType("model-catalog-entries"); + + AiGatewayModelCatalogEntryType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelCatalogEntryTypeSerializer + extends StdSerializer { + public AiGatewayModelCatalogEntryTypeSerializer(Class t) { + super(t); + } + + public AiGatewayModelCatalogEntryTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelCatalogEntryType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelCatalogEntryType fromValue(String value) { + return new AiGatewayModelCatalogEntryType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateAttributes.java new file mode 100644 index 00000000000..c782e2bfab4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateAttributes.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to create a model catalog entry. */ +@JsonPropertyOrder({ + AiGatewayModelCreateAttributes.JSON_PROPERTY_MODEL_ID_CANONICAL, + AiGatewayModelCreateAttributes.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayModelCreateAttributes.JSON_PROPERTY_SUPPORTED_OPERATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODEL_ID_CANONICAL = "model_id_canonical"; + private String modelIdCanonical; + + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = null; + + public AiGatewayModelCreateAttributes() {} + + @JsonCreator + public AiGatewayModelCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_CANONICAL) + String modelIdCanonical, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_WIRE) String modelIdWire) { + this.modelIdCanonical = modelIdCanonical; + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelCreateAttributes modelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + return this; + } + + /** + * Provider-independent model identifier. + * + * @return modelIdCanonical + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_CANONICAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdCanonical() { + return modelIdCanonical; + } + + public void setModelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + } + + public AiGatewayModelCreateAttributes modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelCreateAttributes supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayModelCreateAttributes addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + if (this.supportedOperations == null) { + this.supportedOperations = new ArrayList<>(); + } + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + /** + * 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 AiGatewayModelCreateAttributes + */ + @JsonAnySetter + public AiGatewayModelCreateAttributes 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 AiGatewayModelCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCreateAttributes aiGatewayModelCreateAttributes = + (AiGatewayModelCreateAttributes) o; + return Objects.equals(this.modelIdCanonical, aiGatewayModelCreateAttributes.modelIdCanonical) + && Objects.equals(this.modelIdWire, aiGatewayModelCreateAttributes.modelIdWire) + && Objects.equals( + this.supportedOperations, aiGatewayModelCreateAttributes.supportedOperations) + && Objects.equals( + this.additionalProperties, aiGatewayModelCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(modelIdCanonical, modelIdWire, supportedOperations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCreateAttributes {\n"); + sb.append(" modelIdCanonical: ").append(toIndentedString(modelIdCanonical)).append("\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .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/AiGatewayModelCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateData.java new file mode 100644 index 00000000000..a0f908ba00b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create a model catalog entry. */ +@JsonPropertyOrder({ + AiGatewayModelCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelCatalogEntryType type; + + public AiGatewayModelCreateData() {} + + @JsonCreator + public AiGatewayModelCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelCatalogEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelCreateData attributes(AiGatewayModelCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create a model catalog entry. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelCreateData type(AiGatewayModelCatalogEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model catalog entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryType getType() { + return type; + } + + public void setType(AiGatewayModelCatalogEntryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelCreateData + */ + @JsonAnySetter + public AiGatewayModelCreateData 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 AiGatewayModelCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCreateData aiGatewayModelCreateData = (AiGatewayModelCreateData) o; + return Objects.equals(this.attributes, aiGatewayModelCreateData.attributes) + && Objects.equals(this.type, aiGatewayModelCreateData.type) + && Objects.equals(this.additionalProperties, aiGatewayModelCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateRequest.java new file mode 100644 index 00000000000..189e43ca7a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelCreateRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create a model catalog entry. */ +@JsonPropertyOrder({AiGatewayModelCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelCreateData data; + + public AiGatewayModelCreateRequest() {} + + @JsonCreator + public AiGatewayModelCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayModelCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelCreateRequest data(AiGatewayModelCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create a model catalog entry. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCreateData getData() { + return data; + } + + public void setData(AiGatewayModelCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelCreateRequest + */ + @JsonAnySetter + public AiGatewayModelCreateRequest 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 AiGatewayModelCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelCreateRequest aiGatewayModelCreateRequest = (AiGatewayModelCreateRequest) o; + return Objects.equals(this.data, aiGatewayModelCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupAttributes.java new file mode 100644 index 00000000000..90314c30f23 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupAttributes.java @@ -0,0 +1,523 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Complete AI Gateway model group configuration. */ +@JsonPropertyOrder({ + AiGatewayModelGroupAttributes.JSON_PROPERTY_ALLOW_FAST_MODE, + AiGatewayModelGroupAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayModelGroupAttributes.JSON_PROPERTY_MAX_REASONING_LEVEL, + AiGatewayModelGroupAttributes.JSON_PROPERTY_MODEL_IDS, + AiGatewayModelGroupAttributes.JSON_PROPERTY_MODELS, + AiGatewayModelGroupAttributes.JSON_PROPERTY_NAME, + AiGatewayModelGroupAttributes.JSON_PROPERTY_PROVIDER_IDS, + AiGatewayModelGroupAttributes.JSON_PROPERTY_PROVIDERS, + AiGatewayModelGroupAttributes.JSON_PROPERTY_REVISION, + AiGatewayModelGroupAttributes.JSON_PROPERTY_ROUTING_RULES, + AiGatewayModelGroupAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_FAST_MODE = "allow_fast_mode"; + private Boolean allowFastMode; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MAX_REASONING_LEVEL = "max_reasoning_level"; + private AiGatewayNullableMaxReasoningLevel maxReasoningLevel; + + public static final String JSON_PROPERTY_MODEL_IDS = "model_ids"; + private List modelIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_MODELS = "models"; + private List models = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROVIDER_IDS = "provider_ids"; + private List providerIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_PROVIDERS = "providers"; + private List providers = new ArrayList<>(); + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_ROUTING_RULES = "routing_rules"; + private List routingRules = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayModelGroupAttributes() {} + + @JsonCreator + public AiGatewayModelGroupAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ALLOW_FAST_MODE) Boolean allowFastMode, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAX_REASONING_LEVEL) + AiGatewayNullableMaxReasoningLevel maxReasoningLevel, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_IDS) List modelIds, + @JsonProperty(required = true, value = JSON_PROPERTY_MODELS) + List models, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_IDS) List providerIds, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDERS) + List providers, + @JsonProperty(required = true, value = JSON_PROPERTY_ROUTING_RULES) + List routingRules, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.allowFastMode = allowFastMode; + this.createdAt = createdAt; + this.maxReasoningLevel = maxReasoningLevel; + if (maxReasoningLevel != null) { + this.unparsed |= !maxReasoningLevel.isValid(); + } + this.modelIds = modelIds; + this.models = models; + for (AiGatewayModelGroupModel item : models) { + this.unparsed |= item.unparsed; + } + this.name = name; + this.providerIds = providerIds; + this.providers = providers; + for (AiGatewayModelGroupProvider item : providers) { + this.unparsed |= item.unparsed; + } + this.routingRules = routingRules; + for (AiGatewayModelGroupRoutingRule item : routingRules) { + this.unparsed |= item.unparsed; + } + this.updatedAt = updatedAt; + } + + public AiGatewayModelGroupAttributes allowFastMode(Boolean allowFastMode) { + this.allowFastMode = allowFastMode; + return this; + } + + /** + * Whether fast mode is allowed for models and routing rules in the group. + * + * @return allowFastMode + */ + @JsonProperty(JSON_PROPERTY_ALLOW_FAST_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAllowFastMode() { + return allowFastMode; + } + + public void setAllowFastMode(Boolean allowFastMode) { + this.allowFastMode = allowFastMode; + } + + public AiGatewayModelGroupAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayModelGroupAttributes maxReasoningLevel( + AiGatewayNullableMaxReasoningLevel maxReasoningLevel) { + this.maxReasoningLevel = maxReasoningLevel; + if (maxReasoningLevel != null) { + this.unparsed |= !maxReasoningLevel.isValid(); + } + return this; + } + + /** + * Maximum reasoning level permitted by a model group. + * + * @return maxReasoningLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_REASONING_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayNullableMaxReasoningLevel getMaxReasoningLevel() { + return maxReasoningLevel; + } + + public void setMaxReasoningLevel(AiGatewayNullableMaxReasoningLevel maxReasoningLevel) { + if (!maxReasoningLevel.isValid()) { + this.unparsed = true; + } + this.maxReasoningLevel = maxReasoningLevel; + } + + public AiGatewayModelGroupAttributes modelIds(List modelIds) { + this.modelIds = modelIds; + return this; + } + + public AiGatewayModelGroupAttributes addModelIdsItem(Long modelIdsItem) { + this.modelIds.add(modelIdsItem); + return this; + } + + /** + * All saved model catalog IDs, including selections whose provider metadata is hidden. Preserve + * these IDs independently of the visible catalog. + * + * @return modelIds + */ + @JsonProperty(JSON_PROPERTY_MODEL_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getModelIds() { + return modelIds; + } + + public void setModelIds(List modelIds) { + this.modelIds = modelIds; + } + + public AiGatewayModelGroupAttributes models(List models) { + this.models = models; + for (AiGatewayModelGroupModel item : models) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelGroupAttributes addModelsItem(AiGatewayModelGroupModel modelsItem) { + this.models.add(modelsItem); + this.unparsed |= modelsItem.unparsed; + return this; + } + + /** + * Metadata for saved model selections whose providers the caller can view. Missing metadata does + * not remove a saved ID. + * + * @return models + */ + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getModels() { + return models; + } + + public void setModels(List models) { + this.models = models; + if (models != null) { + for (AiGatewayModelGroupModel item : models) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayModelGroupAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayModelGroupAttributes providerIds(List providerIds) { + this.providerIds = providerIds; + return this; + } + + public AiGatewayModelGroupAttributes addProviderIdsItem(Long providerIdsItem) { + this.providerIds.add(providerIdsItem); + return this; + } + + /** + * All explicitly selected provider IDs, including hidden providers. Embedded provider metadata + * includes only viewable providers. + * + * @return providerIds + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProviderIds() { + return providerIds; + } + + public void setProviderIds(List providerIds) { + this.providerIds = providerIds; + } + + public AiGatewayModelGroupAttributes providers(List providers) { + this.providers = providers; + for (AiGatewayModelGroupProvider item : providers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelGroupAttributes addProvidersItem(AiGatewayModelGroupProvider providersItem) { + this.providers.add(providersItem); + this.unparsed |= providersItem.unparsed; + return this; + } + + /** + * Viewable explicitly selected providers, separate from individually selected models. Use + * provider_ids to retain all selections. + * + * @return providers + */ + @JsonProperty(JSON_PROPERTY_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProviders() { + return providers; + } + + public void setProviders(List providers) { + this.providers = providers; + if (providers != null) { + for (AiGatewayModelGroupProvider item : providers) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayModelGroupAttributes revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Revision of the organization-wide policy. Present for the default model group and absent for + * named policies. minimum: 0 + * + * @return revision + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayModelGroupAttributes routingRules( + List routingRules) { + this.routingRules = routingRules; + for (AiGatewayModelGroupRoutingRule item : routingRules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelGroupAttributes addRoutingRulesItem( + AiGatewayModelGroupRoutingRule routingRulesItem) { + this.routingRules.add(routingRulesItem); + this.unparsed |= routingRulesItem.unparsed; + return this; + } + + /** + * GetroutingRules + * + * @return routingRules + */ + @JsonProperty(JSON_PROPERTY_ROUTING_RULES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRoutingRules() { + return routingRules; + } + + public void setRoutingRules(List routingRules) { + this.routingRules = routingRules; + if (routingRules != null) { + for (AiGatewayModelGroupRoutingRule item : routingRules) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayModelGroupAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayModelGroupAttributes + */ + @JsonAnySetter + public AiGatewayModelGroupAttributes 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 AiGatewayModelGroupAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupAttributes aiGatewayModelGroupAttributes = (AiGatewayModelGroupAttributes) o; + return Objects.equals(this.allowFastMode, aiGatewayModelGroupAttributes.allowFastMode) + && Objects.equals(this.createdAt, aiGatewayModelGroupAttributes.createdAt) + && Objects.equals(this.maxReasoningLevel, aiGatewayModelGroupAttributes.maxReasoningLevel) + && Objects.equals(this.modelIds, aiGatewayModelGroupAttributes.modelIds) + && Objects.equals(this.models, aiGatewayModelGroupAttributes.models) + && Objects.equals(this.name, aiGatewayModelGroupAttributes.name) + && Objects.equals(this.providerIds, aiGatewayModelGroupAttributes.providerIds) + && Objects.equals(this.providers, aiGatewayModelGroupAttributes.providers) + && Objects.equals(this.revision, aiGatewayModelGroupAttributes.revision) + && Objects.equals(this.routingRules, aiGatewayModelGroupAttributes.routingRules) + && Objects.equals(this.updatedAt, aiGatewayModelGroupAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allowFastMode, + createdAt, + maxReasoningLevel, + modelIds, + models, + name, + providerIds, + providers, + revision, + routingRules, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupAttributes {\n"); + sb.append(" allowFastMode: ").append(toIndentedString(allowFastMode)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" maxReasoningLevel: ").append(toIndentedString(maxReasoningLevel)).append("\n"); + sb.append(" modelIds: ").append(toIndentedString(modelIds)).append("\n"); + sb.append(" models: ").append(toIndentedString(models)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerIds: ").append(toIndentedString(providerIds)).append("\n"); + sb.append(" providers: ").append(toIndentedString(providers)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" routingRules: ").append(toIndentedString(routingRules)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayModelGroupBinding.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupBinding.java new file mode 100644 index 00000000000..f74efc39843 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupBinding.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Initial access binding for an AI Gateway model group. */ +@JsonPropertyOrder({ + AiGatewayModelGroupBinding.JSON_PROPERTY_PRINCIPALS, + AiGatewayModelGroupBinding.JSON_PROPERTY_RELATION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupBinding { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRINCIPALS = "principals"; + private List principals = new ArrayList<>(); + + public static final String JSON_PROPERTY_RELATION = "relation"; + private AiGatewayModelGroupBindingRelation relation; + + public AiGatewayModelGroupBinding() {} + + @JsonCreator + public AiGatewayModelGroupBinding( + @JsonProperty(required = true, value = JSON_PROPERTY_PRINCIPALS) List principals, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATION) + AiGatewayModelGroupBindingRelation relation) { + this.principals = principals; + this.relation = relation; + this.unparsed |= !relation.isValid(); + } + + public AiGatewayModelGroupBinding principals(List principals) { + this.principals = principals; + return this; + } + + public AiGatewayModelGroupBinding addPrincipalsItem(String principalsItem) { + this.principals.add(principalsItem); + return this; + } + + /** + * Principals granted the relation. + * + * @return principals + */ + @JsonProperty(JSON_PROPERTY_PRINCIPALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPrincipals() { + return principals; + } + + public void setPrincipals(List principals) { + this.principals = principals; + } + + public AiGatewayModelGroupBinding relation(AiGatewayModelGroupBindingRelation relation) { + this.relation = relation; + this.unparsed |= !relation.isValid(); + return this; + } + + /** + * Access relation granted on a model group. + * + * @return relation + */ + @JsonProperty(JSON_PROPERTY_RELATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupBindingRelation getRelation() { + return relation; + } + + public void setRelation(AiGatewayModelGroupBindingRelation relation) { + if (!relation.isValid()) { + this.unparsed = true; + } + this.relation = relation; + } + + /** + * 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 AiGatewayModelGroupBinding + */ + @JsonAnySetter + public AiGatewayModelGroupBinding 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 AiGatewayModelGroupBinding object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupBinding aiGatewayModelGroupBinding = (AiGatewayModelGroupBinding) o; + return Objects.equals(this.principals, aiGatewayModelGroupBinding.principals) + && Objects.equals(this.relation, aiGatewayModelGroupBinding.relation) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupBinding.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(principals, relation, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupBinding {\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" relation: ").append(toIndentedString(relation)).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/AiGatewayModelGroupBindingRelation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupBindingRelation.java new file mode 100644 index 00000000000..b5e234492e4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupBindingRelation.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; + +/** Access relation granted on a model group. */ +@JsonSerialize( + using = AiGatewayModelGroupBindingRelation.AiGatewayModelGroupBindingRelationSerializer.class) +public class AiGatewayModelGroupBindingRelation extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("viewer", "runner", "editor")); + + public static final AiGatewayModelGroupBindingRelation VIEWER = + new AiGatewayModelGroupBindingRelation("viewer"); + public static final AiGatewayModelGroupBindingRelation RUNNER = + new AiGatewayModelGroupBindingRelation("runner"); + public static final AiGatewayModelGroupBindingRelation EDITOR = + new AiGatewayModelGroupBindingRelation("editor"); + + AiGatewayModelGroupBindingRelation(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelGroupBindingRelationSerializer + extends StdSerializer { + public AiGatewayModelGroupBindingRelationSerializer( + Class t) { + super(t); + } + + public AiGatewayModelGroupBindingRelationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelGroupBindingRelation value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelGroupBindingRelation fromValue(String value) { + return new AiGatewayModelGroupBindingRelation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateAttributes.java new file mode 100644 index 00000000000..8922ee653b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateAttributes.java @@ -0,0 +1,372 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to create an AI Gateway model group. */ +@JsonPropertyOrder({ + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_ALLOW_FAST_MODE, + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_BINDINGS, + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_MAX_REASONING_LEVEL, + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_MODEL_IDS, + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_NAME, + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_PROVIDER_IDS, + AiGatewayModelGroupCreateAttributes.JSON_PROPERTY_ROUTING_RULE_SLUGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_FAST_MODE = "allow_fast_mode"; + private Boolean allowFastMode = true; + + public static final String JSON_PROPERTY_BINDINGS = "bindings"; + private List bindings = null; + + public static final String JSON_PROPERTY_MAX_REASONING_LEVEL = "max_reasoning_level"; + private AiGatewayMaxReasoningLevel maxReasoningLevel; + + public static final String JSON_PROPERTY_MODEL_IDS = "model_ids"; + private List modelIds = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROVIDER_IDS = "provider_ids"; + private List providerIds = null; + + public static final String JSON_PROPERTY_ROUTING_RULE_SLUGS = "routing_rule_slugs"; + private List routingRuleSlugs = null; + + public AiGatewayModelGroupCreateAttributes() {} + + @JsonCreator + public AiGatewayModelGroupCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.name = name; + } + + public AiGatewayModelGroupCreateAttributes allowFastMode(Boolean allowFastMode) { + this.allowFastMode = allowFastMode; + return this; + } + + /** + * Whether fast mode is allowed for models and routing rules in the group. + * + * @return allowFastMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_FAST_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowFastMode() { + return allowFastMode; + } + + public void setAllowFastMode(Boolean allowFastMode) { + this.allowFastMode = allowFastMode; + } + + public AiGatewayModelGroupCreateAttributes bindings(List bindings) { + this.bindings = bindings; + if (bindings != null) { + for (AiGatewayModelGroupBinding item : bindings) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public AiGatewayModelGroupCreateAttributes addBindingsItem( + AiGatewayModelGroupBinding bindingsItem) { + if (this.bindings == null) { + this.bindings = new ArrayList<>(); + } + this.bindings.add(bindingsItem); + this.unparsed |= bindingsItem.unparsed; + return this; + } + + /** + * Optional initial model-group access bindings. + * + * @return bindings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BINDINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getBindings() { + return bindings; + } + + public void setBindings(List bindings) { + this.bindings = bindings; + if (bindings != null) { + for (AiGatewayModelGroupBinding item : bindings) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayModelGroupCreateAttributes maxReasoningLevel( + AiGatewayMaxReasoningLevel maxReasoningLevel) { + this.maxReasoningLevel = maxReasoningLevel; + this.unparsed |= !maxReasoningLevel.isValid(); + return this; + } + + /** + * Maximum reasoning level permitted by a model group. + * + * @return maxReasoningLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_REASONING_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayMaxReasoningLevel getMaxReasoningLevel() { + return maxReasoningLevel; + } + + public void setMaxReasoningLevel(AiGatewayMaxReasoningLevel maxReasoningLevel) { + if (!maxReasoningLevel.isValid()) { + this.unparsed = true; + } + this.maxReasoningLevel = maxReasoningLevel; + } + + public AiGatewayModelGroupCreateAttributes modelIds(List modelIds) { + this.modelIds = modelIds; + return this; + } + + public AiGatewayModelGroupCreateAttributes addModelIdsItem(Long modelIdsItem) { + if (this.modelIds == null) { + this.modelIds = new ArrayList<>(); + } + this.modelIds.add(modelIdsItem); + return this; + } + + /** + * Model catalog IDs to select. New selections require provider View. + * + * @return modelIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getModelIds() { + return modelIds; + } + + public void setModelIds(List modelIds) { + this.modelIds = modelIds; + } + + public AiGatewayModelGroupCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayModelGroupCreateAttributes providerIds(List providerIds) { + this.providerIds = providerIds; + return this; + } + + public AiGatewayModelGroupCreateAttributes addProviderIdsItem(Long providerIdsItem) { + if (this.providerIds == null) { + this.providerIds = new ArrayList<>(); + } + this.providerIds.add(providerIdsItem); + return this; + } + + /** + * Explicit provider selections, including current and future models. Omit to preserve selections + * on update; an empty array clears them. Null is invalid. New selections require provider View; + * saved hidden IDs can be retained or removed. + * + * @return providerIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getProviderIds() { + return providerIds; + } + + public void setProviderIds(List providerIds) { + this.providerIds = providerIds; + } + + public AiGatewayModelGroupCreateAttributes routingRuleSlugs(List routingRuleSlugs) { + this.routingRuleSlugs = routingRuleSlugs; + return this; + } + + public AiGatewayModelGroupCreateAttributes addRoutingRuleSlugsItem(String routingRuleSlugsItem) { + if (this.routingRuleSlugs == null) { + this.routingRuleSlugs = new ArrayList<>(); + } + this.routingRuleSlugs.add(routingRuleSlugsItem); + return this; + } + + /** + * Organization-unique routing rule slugs, such as coding-route. + * + * @return routingRuleSlugs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROUTING_RULE_SLUGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRoutingRuleSlugs() { + return routingRuleSlugs; + } + + public void setRoutingRuleSlugs(List routingRuleSlugs) { + this.routingRuleSlugs = routingRuleSlugs; + } + + /** + * 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 AiGatewayModelGroupCreateAttributes + */ + @JsonAnySetter + public AiGatewayModelGroupCreateAttributes 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 AiGatewayModelGroupCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupCreateAttributes aiGatewayModelGroupCreateAttributes = + (AiGatewayModelGroupCreateAttributes) o; + return Objects.equals(this.allowFastMode, aiGatewayModelGroupCreateAttributes.allowFastMode) + && Objects.equals(this.bindings, aiGatewayModelGroupCreateAttributes.bindings) + && Objects.equals( + this.maxReasoningLevel, aiGatewayModelGroupCreateAttributes.maxReasoningLevel) + && Objects.equals(this.modelIds, aiGatewayModelGroupCreateAttributes.modelIds) + && Objects.equals(this.name, aiGatewayModelGroupCreateAttributes.name) + && Objects.equals(this.providerIds, aiGatewayModelGroupCreateAttributes.providerIds) + && Objects.equals( + this.routingRuleSlugs, aiGatewayModelGroupCreateAttributes.routingRuleSlugs) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allowFastMode, + bindings, + maxReasoningLevel, + modelIds, + name, + providerIds, + routingRuleSlugs, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupCreateAttributes {\n"); + sb.append(" allowFastMode: ").append(toIndentedString(allowFastMode)).append("\n"); + sb.append(" bindings: ").append(toIndentedString(bindings)).append("\n"); + sb.append(" maxReasoningLevel: ").append(toIndentedString(maxReasoningLevel)).append("\n"); + sb.append(" modelIds: ").append(toIndentedString(modelIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerIds: ").append(toIndentedString(providerIds)).append("\n"); + sb.append(" routingRuleSlugs: ").append(toIndentedString(routingRuleSlugs)).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/AiGatewayModelGroupCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateData.java new file mode 100644 index 00000000000..f350cca66b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create an AI Gateway model group. */ +@JsonPropertyOrder({ + AiGatewayModelGroupCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelGroupCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelGroupCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelGroupType type; + + public AiGatewayModelGroupCreateData() {} + + @JsonCreator + public AiGatewayModelGroupCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelGroupCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayModelGroupType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelGroupCreateData attributes(AiGatewayModelGroupCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create an AI Gateway model group. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelGroupCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelGroupCreateData type(AiGatewayModelGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway model group resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupType getType() { + return type; + } + + public void setType(AiGatewayModelGroupType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelGroupCreateData + */ + @JsonAnySetter + public AiGatewayModelGroupCreateData 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 AiGatewayModelGroupCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupCreateData aiGatewayModelGroupCreateData = (AiGatewayModelGroupCreateData) o; + return Objects.equals(this.attributes, aiGatewayModelGroupCreateData.attributes) + && Objects.equals(this.type, aiGatewayModelGroupCreateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateRequest.java new file mode 100644 index 00000000000..3ffb051b8fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupCreateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create an AI Gateway model group. */ +@JsonPropertyOrder({AiGatewayModelGroupCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelGroupCreateData data; + + public AiGatewayModelGroupCreateRequest() {} + + @JsonCreator + public AiGatewayModelGroupCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayModelGroupCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelGroupCreateRequest data(AiGatewayModelGroupCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create an AI Gateway model group. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupCreateData getData() { + return data; + } + + public void setData(AiGatewayModelGroupCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelGroupCreateRequest + */ + @JsonAnySetter + public AiGatewayModelGroupCreateRequest 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 AiGatewayModelGroupCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupCreateRequest aiGatewayModelGroupCreateRequest = + (AiGatewayModelGroupCreateRequest) o; + return Objects.equals(this.data, aiGatewayModelGroupCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupListResponse.java new file mode 100644 index 00000000000..d25c4f7e4cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupListResponse.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing AI Gateway model groups. */ +@JsonPropertyOrder({AiGatewayModelGroupListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayModelGroupListResponse() {} + + @JsonCreator + public AiGatewayModelGroupListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayModelGroupResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayModelGroupListResponse data(List data) { + this.data = data; + for (AiGatewayModelGroupResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelGroupListResponse addDataItem(AiGatewayModelGroupResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayModelGroupResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayModelGroupListResponse + */ + @JsonAnySetter + public AiGatewayModelGroupListResponse 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 AiGatewayModelGroupListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupListResponse aiGatewayModelGroupListResponse = + (AiGatewayModelGroupListResponse) o; + return Objects.equals(this.data, aiGatewayModelGroupListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupModel.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupModel.java new file mode 100644 index 00000000000..1b311c8d72e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupModel.java @@ -0,0 +1,431 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Model catalog entry embedded in a model group. */ +@JsonPropertyOrder({ + AiGatewayModelGroupModel.JSON_PROPERTY_CREATED_AT, + AiGatewayModelGroupModel.JSON_PROPERTY_ENABLED, + AiGatewayModelGroupModel.JSON_PROPERTY_ID, + AiGatewayModelGroupModel.JSON_PROPERTY_METADATA, + AiGatewayModelGroupModel.JSON_PROPERTY_MODEL_ID_CANONICAL, + AiGatewayModelGroupModel.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayModelGroupModel.JSON_PROPERTY_PROVIDER_ID, + AiGatewayModelGroupModel.JSON_PROPERTY_SOURCE, + AiGatewayModelGroupModel.JSON_PROPERTY_SUPPORTED_OPERATIONS, + AiGatewayModelGroupModel.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupModel { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private AiGatewayModelMetadata metadata; + + public static final String JSON_PROPERTY_MODEL_ID_CANONICAL = "model_id_canonical"; + private String modelIdCanonical; + + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private Long providerId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelSource source; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayModelGroupModel() {} + + @JsonCreator + public AiGatewayModelGroupModel( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_CANONICAL) + String modelIdCanonical, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_WIRE) String modelIdWire, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_ID) Long providerId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) AiGatewayModelSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_SUPPORTED_OPERATIONS) + List supportedOperations, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.enabled = enabled; + this.id = id; + this.modelIdCanonical = modelIdCanonical; + this.modelIdWire = modelIdWire; + this.providerId = providerId; + this.source = source; + this.unparsed |= !source.isValid(); + this.supportedOperations = supportedOperations; + this.updatedAt = updatedAt; + } + + public AiGatewayModelGroupModel createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayModelGroupModel enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the resource is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public AiGatewayModelGroupModel id(String id) { + this.id = id; + return this; + } + + /** + * Model catalog entry identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelGroupModel metadata(AiGatewayModelMetadata metadata) { + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + return this; + } + + /** + * Optional, typed enrichment for a model catalog entry. Missing properties remain unknown. + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelMetadata getMetadata() { + return metadata; + } + + public void setMetadata(AiGatewayModelMetadata metadata) { + this.metadata = metadata; + if (metadata != null) { + this.unparsed |= metadata.unparsed; + } + } + + public AiGatewayModelGroupModel modelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + return this; + } + + /** + * Provider-independent model identifier. + * + * @return modelIdCanonical + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_CANONICAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdCanonical() { + return modelIdCanonical; + } + + public void setModelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + } + + public AiGatewayModelGroupModel modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelGroupModel providerId(Long providerId) { + this.providerId = providerId; + return this; + } + + /** + * Provider identifier. + * + * @return providerId + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getProviderId() { + return providerId; + } + + public void setProviderId(Long providerId) { + this.providerId = providerId; + } + + public AiGatewayModelGroupModel source(AiGatewayModelSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * How a model catalog entry is managed. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelSource getSource() { + return source; + } + + public void setSource(AiGatewayModelSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public AiGatewayModelGroupModel supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayModelGroupModel addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + public AiGatewayModelGroupModel updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayModelGroupModel + */ + @JsonAnySetter + public AiGatewayModelGroupModel 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 AiGatewayModelGroupModel object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupModel aiGatewayModelGroupModel = (AiGatewayModelGroupModel) o; + return Objects.equals(this.createdAt, aiGatewayModelGroupModel.createdAt) + && Objects.equals(this.enabled, aiGatewayModelGroupModel.enabled) + && Objects.equals(this.id, aiGatewayModelGroupModel.id) + && Objects.equals(this.metadata, aiGatewayModelGroupModel.metadata) + && Objects.equals(this.modelIdCanonical, aiGatewayModelGroupModel.modelIdCanonical) + && Objects.equals(this.modelIdWire, aiGatewayModelGroupModel.modelIdWire) + && Objects.equals(this.providerId, aiGatewayModelGroupModel.providerId) + && Objects.equals(this.source, aiGatewayModelGroupModel.source) + && Objects.equals(this.supportedOperations, aiGatewayModelGroupModel.supportedOperations) + && Objects.equals(this.updatedAt, aiGatewayModelGroupModel.updatedAt) + && Objects.equals(this.additionalProperties, aiGatewayModelGroupModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + enabled, + id, + metadata, + modelIdCanonical, + modelIdWire, + providerId, + source, + supportedOperations, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupModel {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" modelIdCanonical: ").append(toIndentedString(modelIdCanonical)).append("\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayModelGroupProvider.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupProvider.java new file mode 100644 index 00000000000..8ca64134bec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupProvider.java @@ -0,0 +1,174 @@ +/* + * 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; + +/** Explicitly selected provider. Its current and future models are covered. */ +@JsonPropertyOrder({ + AiGatewayModelGroupProvider.JSON_PROPERTY_ID, + AiGatewayModelGroupProvider.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupProvider { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public AiGatewayModelGroupProvider() {} + + @JsonCreator + public AiGatewayModelGroupProvider( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) Long id, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.id = id; + this.name = name; + } + + public AiGatewayModelGroupProvider id(Long id) { + this.id = id; + return this; + } + + /** + * Provider ID. minimum: 1 + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public AiGatewayModelGroupProvider name(String name) { + this.name = name; + return this; + } + + /** + * Provider display name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * 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 AiGatewayModelGroupProvider + */ + @JsonAnySetter + public AiGatewayModelGroupProvider 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 AiGatewayModelGroupProvider object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupProvider aiGatewayModelGroupProvider = (AiGatewayModelGroupProvider) o; + return Objects.equals(this.id, aiGatewayModelGroupProvider.id) + && Objects.equals(this.name, aiGatewayModelGroupProvider.name) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupProvider.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupProvider {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/AiGatewayModelGroupResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResource.java new file mode 100644 index 00000000000..e1f036a60d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResource.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** AI Gateway model group resource. */ +@JsonPropertyOrder({ + AiGatewayModelGroupResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelGroupResource.JSON_PROPERTY_ID, + AiGatewayModelGroupResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelGroupAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelGroupType type; + + public AiGatewayModelGroupResource() {} + + @JsonCreator + public AiGatewayModelGroupResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelGroupAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayModelGroupType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelGroupResource attributes(AiGatewayModelGroupAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Complete AI Gateway model group configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelGroupAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelGroupResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelGroupResource type(AiGatewayModelGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway model group resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupType getType() { + return type; + } + + public void setType(AiGatewayModelGroupType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelGroupResource + */ + @JsonAnySetter + public AiGatewayModelGroupResource 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 AiGatewayModelGroupResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupResource aiGatewayModelGroupResource = (AiGatewayModelGroupResource) o; + return Objects.equals(this.attributes, aiGatewayModelGroupResource.attributes) + && Objects.equals(this.id, aiGatewayModelGroupResource.id) + && Objects.equals(this.type, aiGatewayModelGroupResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResponse.java new file mode 100644 index 00000000000..9dfeae2da95 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one AI Gateway model group. */ +@JsonPropertyOrder({AiGatewayModelGroupResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelGroupResource data; + + public AiGatewayModelGroupResponse() {} + + @JsonCreator + public AiGatewayModelGroupResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayModelGroupResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelGroupResponse data(AiGatewayModelGroupResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway model group resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupResource getData() { + return data; + } + + public void setData(AiGatewayModelGroupResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelGroupResponse + */ + @JsonAnySetter + public AiGatewayModelGroupResponse 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 AiGatewayModelGroupResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupResponse aiGatewayModelGroupResponse = (AiGatewayModelGroupResponse) o; + return Objects.equals(this.data, aiGatewayModelGroupResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupRoutingRule.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupRoutingRule.java new file mode 100644 index 00000000000..075b5f13873 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupRoutingRule.java @@ -0,0 +1,145 @@ +/* + * 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; + +/** Routing rule in an AI Gateway model group. */ +@JsonPropertyOrder({AiGatewayModelGroupRoutingRule.JSON_PROPERTY_SLUG}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupRoutingRule { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public AiGatewayModelGroupRoutingRule() {} + + @JsonCreator + public AiGatewayModelGroupRoutingRule( + @JsonProperty(required = true, value = JSON_PROPERTY_SLUG) String slug) { + this.slug = slug; + } + + public AiGatewayModelGroupRoutingRule slug(String slug) { + this.slug = slug; + return this; + } + + /** + * Organization-unique routing rule slug. + * + * @return slug + */ + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + /** + * 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 AiGatewayModelGroupRoutingRule + */ + @JsonAnySetter + public AiGatewayModelGroupRoutingRule 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 AiGatewayModelGroupRoutingRule object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupRoutingRule aiGatewayModelGroupRoutingRule = + (AiGatewayModelGroupRoutingRule) o; + return Objects.equals(this.slug, aiGatewayModelGroupRoutingRule.slug) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupRoutingRule.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(slug, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupRoutingRule {\n"); + sb.append(" slug: ").append(toIndentedString(slug)).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/AiGatewayModelGroupType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupType.java new file mode 100644 index 00000000000..296654b06f7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** AI Gateway model group resource type. */ +@JsonSerialize(using = AiGatewayModelGroupType.AiGatewayModelGroupTypeSerializer.class) +public class AiGatewayModelGroupType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("model-groups")); + + public static final AiGatewayModelGroupType MODEL_GROUPS = + new AiGatewayModelGroupType("model-groups"); + + AiGatewayModelGroupType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelGroupTypeSerializer + extends StdSerializer { + public AiGatewayModelGroupTypeSerializer(Class t) { + super(t); + } + + public AiGatewayModelGroupTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelGroupType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelGroupType fromValue(String value) { + return new AiGatewayModelGroupType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateAttributes.java new file mode 100644 index 00000000000..4c132123ca7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateAttributes.java @@ -0,0 +1,362 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes used to update an AI Gateway model group. */ +@JsonPropertyOrder({ + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_ALLOW_FAST_MODE, + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_EXPECTED_REVISION, + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_MAX_REASONING_LEVEL, + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_MODEL_IDS, + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_NAME, + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_PROVIDER_IDS, + AiGatewayModelGroupUpdateAttributes.JSON_PROPERTY_ROUTING_RULE_SLUGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_FAST_MODE = "allow_fast_mode"; + private Boolean allowFastMode; + + public static final String JSON_PROPERTY_EXPECTED_REVISION = "expected_revision"; + private Long expectedRevision; + + public static final String JSON_PROPERTY_MAX_REASONING_LEVEL = "max_reasoning_level"; + private JsonNullable maxReasoningLevel = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_IDS = "model_ids"; + private List modelIds = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROVIDER_IDS = "provider_ids"; + private List providerIds = null; + + public static final String JSON_PROPERTY_ROUTING_RULE_SLUGS = "routing_rule_slugs"; + private List routingRuleSlugs = null; + + public AiGatewayModelGroupUpdateAttributes allowFastMode(Boolean allowFastMode) { + this.allowFastMode = allowFastMode; + return this; + } + + /** + * Whether fast mode is allowed for models and routing rules in the group. + * + * @return allowFastMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_FAST_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowFastMode() { + return allowFastMode; + } + + public void setAllowFastMode(Boolean allowFastMode) { + this.allowFastMode = allowFastMode; + } + + public AiGatewayModelGroupUpdateAttributes expectedRevision(Long expectedRevision) { + this.expectedRevision = expectedRevision; + return this; + } + + /** + * Required when updating the default model group. Must match its current revision; a stale + * revision returns HTTP 409. Omit for named policies. minimum: 0 + * + * @return expectedRevision + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPECTED_REVISION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getExpectedRevision() { + return expectedRevision; + } + + public void setExpectedRevision(Long expectedRevision) { + this.expectedRevision = expectedRevision; + } + + public AiGatewayModelGroupUpdateAttributes maxReasoningLevel( + AiGatewayNullableMaxReasoningLevel maxReasoningLevel) { + this.maxReasoningLevel = JsonNullable.of(maxReasoningLevel); + return this; + } + + /** + * Maximum reasoning level permitted by a model group. + * + * @return maxReasoningLevel + */ + @jakarta.annotation.Nullable + @JsonIgnore + public AiGatewayNullableMaxReasoningLevel getMaxReasoningLevel() { + return maxReasoningLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MAX_REASONING_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getMaxReasoningLevel_JsonNullable() { + return maxReasoningLevel; + } + + @JsonProperty(JSON_PROPERTY_MAX_REASONING_LEVEL) + public void setMaxReasoningLevel_JsonNullable( + JsonNullable maxReasoningLevel) { + this.maxReasoningLevel = maxReasoningLevel; + } + + public void setMaxReasoningLevel(AiGatewayNullableMaxReasoningLevel maxReasoningLevel) { + if (!maxReasoningLevel.isValid()) { + this.unparsed = true; + } + this.maxReasoningLevel = JsonNullable.of(maxReasoningLevel); + } + + public AiGatewayModelGroupUpdateAttributes modelIds(List modelIds) { + this.modelIds = modelIds; + return this; + } + + public AiGatewayModelGroupUpdateAttributes addModelIdsItem(Long modelIdsItem) { + if (this.modelIds == null) { + this.modelIds = new ArrayList<>(); + } + this.modelIds.add(modelIdsItem); + return this; + } + + /** + * Individually selected model catalog IDs. Replaces this selection only. Omit to preserve it; an + * empty array clears it. Null is invalid. Individual selections do not include future models. New + * selections require provider View; retaining or removing saved hidden selections requires only + * parent Edit. + * + * @return modelIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getModelIds() { + return modelIds; + } + + public void setModelIds(List modelIds) { + this.modelIds = modelIds; + } + + public AiGatewayModelGroupUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayModelGroupUpdateAttributes providerIds(List providerIds) { + this.providerIds = providerIds; + return this; + } + + public AiGatewayModelGroupUpdateAttributes addProviderIdsItem(Long providerIdsItem) { + if (this.providerIds == null) { + this.providerIds = new ArrayList<>(); + } + this.providerIds.add(providerIdsItem); + return this; + } + + /** + * Explicit provider selections, including current and future models. Omit to preserve selections + * on update; an empty array clears them. Null is invalid. New selections require provider View; + * saved hidden IDs can be retained or removed. + * + * @return providerIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getProviderIds() { + return providerIds; + } + + public void setProviderIds(List providerIds) { + this.providerIds = providerIds; + } + + public AiGatewayModelGroupUpdateAttributes routingRuleSlugs(List routingRuleSlugs) { + this.routingRuleSlugs = routingRuleSlugs; + return this; + } + + public AiGatewayModelGroupUpdateAttributes addRoutingRuleSlugsItem(String routingRuleSlugsItem) { + if (this.routingRuleSlugs == null) { + this.routingRuleSlugs = new ArrayList<>(); + } + this.routingRuleSlugs.add(routingRuleSlugsItem); + return this; + } + + /** + * Organization-unique routing rule slugs. Replaces route selections only. Omit to preserve them; + * an empty array clears them. Null is invalid. + * + * @return routingRuleSlugs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROUTING_RULE_SLUGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRoutingRuleSlugs() { + return routingRuleSlugs; + } + + public void setRoutingRuleSlugs(List routingRuleSlugs) { + this.routingRuleSlugs = routingRuleSlugs; + } + + /** + * 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 AiGatewayModelGroupUpdateAttributes + */ + @JsonAnySetter + public AiGatewayModelGroupUpdateAttributes 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 AiGatewayModelGroupUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupUpdateAttributes aiGatewayModelGroupUpdateAttributes = + (AiGatewayModelGroupUpdateAttributes) o; + return Objects.equals(this.allowFastMode, aiGatewayModelGroupUpdateAttributes.allowFastMode) + && Objects.equals( + this.expectedRevision, aiGatewayModelGroupUpdateAttributes.expectedRevision) + && Objects.equals( + this.maxReasoningLevel, aiGatewayModelGroupUpdateAttributes.maxReasoningLevel) + && Objects.equals(this.modelIds, aiGatewayModelGroupUpdateAttributes.modelIds) + && Objects.equals(this.name, aiGatewayModelGroupUpdateAttributes.name) + && Objects.equals(this.providerIds, aiGatewayModelGroupUpdateAttributes.providerIds) + && Objects.equals( + this.routingRuleSlugs, aiGatewayModelGroupUpdateAttributes.routingRuleSlugs) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allowFastMode, + expectedRevision, + maxReasoningLevel, + modelIds, + name, + providerIds, + routingRuleSlugs, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupUpdateAttributes {\n"); + sb.append(" allowFastMode: ").append(toIndentedString(allowFastMode)).append("\n"); + sb.append(" expectedRevision: ").append(toIndentedString(expectedRevision)).append("\n"); + sb.append(" maxReasoningLevel: ").append(toIndentedString(maxReasoningLevel)).append("\n"); + sb.append(" modelIds: ").append(toIndentedString(modelIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerIds: ").append(toIndentedString(providerIds)).append("\n"); + sb.append(" routingRuleSlugs: ").append(toIndentedString(routingRuleSlugs)).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/AiGatewayModelGroupUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateData.java new file mode 100644 index 00000000000..f68c1b9ed64 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to update an AI Gateway model group. */ +@JsonPropertyOrder({ + AiGatewayModelGroupUpdateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelGroupUpdateData.JSON_PROPERTY_ID, + AiGatewayModelGroupUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelGroupUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelGroupType type; + + public AiGatewayModelGroupUpdateData() {} + + @JsonCreator + public AiGatewayModelGroupUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelGroupUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayModelGroupType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelGroupUpdateData attributes(AiGatewayModelGroupUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to update an AI Gateway model group. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelGroupUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelGroupUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelGroupUpdateData type(AiGatewayModelGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway model group resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupType getType() { + return type; + } + + public void setType(AiGatewayModelGroupType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelGroupUpdateData + */ + @JsonAnySetter + public AiGatewayModelGroupUpdateData 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 AiGatewayModelGroupUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupUpdateData aiGatewayModelGroupUpdateData = (AiGatewayModelGroupUpdateData) o; + return Objects.equals(this.attributes, aiGatewayModelGroupUpdateData.attributes) + && Objects.equals(this.id, aiGatewayModelGroupUpdateData.id) + && Objects.equals(this.type, aiGatewayModelGroupUpdateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateRequest.java new file mode 100644 index 00000000000..1bc1e615d8b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelGroupUpdateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update an AI Gateway model group. */ +@JsonPropertyOrder({AiGatewayModelGroupUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelGroupUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelGroupUpdateData data; + + public AiGatewayModelGroupUpdateRequest() {} + + @JsonCreator + public AiGatewayModelGroupUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayModelGroupUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelGroupUpdateRequest data(AiGatewayModelGroupUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to update an AI Gateway model group. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelGroupUpdateData getData() { + return data; + } + + public void setData(AiGatewayModelGroupUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelGroupUpdateRequest + */ + @JsonAnySetter + public AiGatewayModelGroupUpdateRequest 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 AiGatewayModelGroupUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelGroupUpdateRequest aiGatewayModelGroupUpdateRequest = + (AiGatewayModelGroupUpdateRequest) o; + return Objects.equals(this.data, aiGatewayModelGroupUpdateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelGroupUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelGroupUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelInput.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelInput.java new file mode 100644 index 00000000000..2aee0a27715 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelInput.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Manually managed model definition supplied when creating a provider or catalog entry. */ +@JsonPropertyOrder({ + AiGatewayModelInput.JSON_PROPERTY_MODEL_ID_CANONICAL, + AiGatewayModelInput.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayModelInput.JSON_PROPERTY_SUPPORTED_OPERATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelInput { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODEL_ID_CANONICAL = "model_id_canonical"; + private String modelIdCanonical; + + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = null; + + public AiGatewayModelInput() {} + + @JsonCreator + public AiGatewayModelInput( + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_CANONICAL) + String modelIdCanonical, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_WIRE) String modelIdWire) { + this.modelIdCanonical = modelIdCanonical; + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelInput modelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + return this; + } + + /** + * Provider-independent model identifier. + * + * @return modelIdCanonical + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_CANONICAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdCanonical() { + return modelIdCanonical; + } + + public void setModelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + } + + public AiGatewayModelInput modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelInput supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayModelInput addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + if (this.supportedOperations == null) { + this.supportedOperations = new ArrayList<>(); + } + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + /** + * 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 AiGatewayModelInput + */ + @JsonAnySetter + public AiGatewayModelInput 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 AiGatewayModelInput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelInput aiGatewayModelInput = (AiGatewayModelInput) o; + return Objects.equals(this.modelIdCanonical, aiGatewayModelInput.modelIdCanonical) + && Objects.equals(this.modelIdWire, aiGatewayModelInput.modelIdWire) + && Objects.equals(this.supportedOperations, aiGatewayModelInput.supportedOperations) + && Objects.equals(this.additionalProperties, aiGatewayModelInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(modelIdCanonical, modelIdWire, supportedOperations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelInput {\n"); + sb.append(" modelIdCanonical: ").append(toIndentedString(modelIdCanonical)).append("\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .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/AiGatewayModelLimits.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelLimits.java new file mode 100644 index 00000000000..35be2407786 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelLimits.java @@ -0,0 +1,193 @@ +/* + * 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.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; + +/** Token limits reported by the enrichment source. */ +@JsonPropertyOrder({ + AiGatewayModelLimits.JSON_PROPERTY_CONTEXT_WINDOW_TOKENS, + AiGatewayModelLimits.JSON_PROPERTY_MAX_INPUT_TOKENS, + AiGatewayModelLimits.JSON_PROPERTY_MAX_OUTPUT_TOKENS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelLimits { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONTEXT_WINDOW_TOKENS = "context_window_tokens"; + private Long contextWindowTokens; + + public static final String JSON_PROPERTY_MAX_INPUT_TOKENS = "max_input_tokens"; + private Long maxInputTokens; + + public static final String JSON_PROPERTY_MAX_OUTPUT_TOKENS = "max_output_tokens"; + private Long maxOutputTokens; + + public AiGatewayModelLimits contextWindowTokens(Long contextWindowTokens) { + this.contextWindowTokens = contextWindowTokens; + return this; + } + + /** + * Total model context window in tokens. minimum: 0 + * + * @return contextWindowTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTEXT_WINDOW_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getContextWindowTokens() { + return contextWindowTokens; + } + + public void setContextWindowTokens(Long contextWindowTokens) { + this.contextWindowTokens = contextWindowTokens; + } + + public AiGatewayModelLimits maxInputTokens(Long maxInputTokens) { + this.maxInputTokens = maxInputTokens; + return this; + } + + /** + * Maximum input tokens when reported separately. minimum: 0 + * + * @return maxInputTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxInputTokens() { + return maxInputTokens; + } + + public void setMaxInputTokens(Long maxInputTokens) { + this.maxInputTokens = maxInputTokens; + } + + public AiGatewayModelLimits maxOutputTokens(Long maxOutputTokens) { + this.maxOutputTokens = maxOutputTokens; + return this; + } + + /** + * Maximum output tokens. minimum: 0 + * + * @return maxOutputTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxOutputTokens() { + return maxOutputTokens; + } + + public void setMaxOutputTokens(Long maxOutputTokens) { + this.maxOutputTokens = maxOutputTokens; + } + + /** + * 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 AiGatewayModelLimits + */ + @JsonAnySetter + public AiGatewayModelLimits 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 AiGatewayModelLimits object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelLimits aiGatewayModelLimits = (AiGatewayModelLimits) o; + return Objects.equals(this.contextWindowTokens, aiGatewayModelLimits.contextWindowTokens) + && Objects.equals(this.maxInputTokens, aiGatewayModelLimits.maxInputTokens) + && Objects.equals(this.maxOutputTokens, aiGatewayModelLimits.maxOutputTokens) + && Objects.equals(this.additionalProperties, aiGatewayModelLimits.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(contextWindowTokens, maxInputTokens, maxOutputTokens, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelLimits {\n"); + sb.append(" contextWindowTokens: ") + .append(toIndentedString(contextWindowTokens)) + .append("\n"); + sb.append(" maxInputTokens: ").append(toIndentedString(maxInputTokens)).append("\n"); + sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).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/AiGatewayModelMetadata.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadata.java new file mode 100644 index 00000000000..1e2a1a6ae19 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadata.java @@ -0,0 +1,637 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Optional, typed enrichment for a model catalog entry. Missing properties remain unknown. */ +@JsonPropertyOrder({ + AiGatewayModelMetadata.JSON_PROPERTY_CAPABILITIES, + AiGatewayModelMetadata.JSON_PROPERTY_DESCRIPTION, + AiGatewayModelMetadata.JSON_PROPERTY_DISPLAY_NAME, + AiGatewayModelMetadata.JSON_PROPERTY_FAMILY, + AiGatewayModelMetadata.JSON_PROPERTY_KIND, + AiGatewayModelMetadata.JSON_PROPERTY_KNOWLEDGE_CUTOFF, + AiGatewayModelMetadata.JSON_PROPERTY_LAST_UPDATED, + AiGatewayModelMetadata.JSON_PROPERTY_LIFECYCLE, + AiGatewayModelMetadata.JSON_PROPERTY_LIMITS, + AiGatewayModelMetadata.JSON_PROPERTY_MODALITIES, + AiGatewayModelMetadata.JSON_PROPERTY_OPEN_WEIGHTS, + AiGatewayModelMetadata.JSON_PROPERTY_REASONING, + AiGatewayModelMetadata.JSON_PROPERTY_REFERENCE_PRICING, + AiGatewayModelMetadata.JSON_PROPERTY_RELEASE_DATE, + AiGatewayModelMetadata.JSON_PROPERTY_SOURCE, + AiGatewayModelMetadata.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelMetadata { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CAPABILITIES = "capabilities"; + private AiGatewayModelCapabilities capabilities; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_FAMILY = "family"; + private String family; + + public static final String JSON_PROPERTY_KIND = "kind"; + private AiGatewayModelMetadataKind kind; + + public static final String JSON_PROPERTY_KNOWLEDGE_CUTOFF = "knowledge_cutoff"; + private String knowledgeCutoff; + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + private String lastUpdated; + + public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle"; + private AiGatewayModelMetadataLifecycle lifecycle; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private AiGatewayModelLimits limits; + + public static final String JSON_PROPERTY_MODALITIES = "modalities"; + private AiGatewayModelModalities modalities; + + public static final String JSON_PROPERTY_OPEN_WEIGHTS = "open_weights"; + private Boolean openWeights; + + public static final String JSON_PROPERTY_REASONING = "reasoning"; + private AiGatewayModelReasoning reasoning; + + public static final String JSON_PROPERTY_REFERENCE_PRICING = "reference_pricing"; + private List referencePricing = null; + + public static final String JSON_PROPERTY_RELEASE_DATE = "release_date"; + private String releaseDate; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelMetadataSource source; + + public static final String JSON_PROPERTY_STATUS = "status"; + private AiGatewayModelMetadataStatus status; + + public AiGatewayModelMetadata() {} + + @JsonCreator + public AiGatewayModelMetadata( + @JsonProperty(required = true, value = JSON_PROPERTY_CAPABILITIES) + AiGatewayModelCapabilities capabilities, + @JsonProperty(required = true, value = JSON_PROPERTY_LIMITS) AiGatewayModelLimits limits, + @JsonProperty(required = true, value = JSON_PROPERTY_MODALITIES) + AiGatewayModelModalities modalities, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + AiGatewayModelMetadataSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + AiGatewayModelMetadataStatus status) { + this.capabilities = capabilities; + this.unparsed |= capabilities.unparsed; + this.limits = limits; + this.unparsed |= limits.unparsed; + this.modalities = modalities; + this.unparsed |= modalities.unparsed; + this.source = source; + this.unparsed |= source.unparsed; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public AiGatewayModelMetadata capabilities(AiGatewayModelCapabilities capabilities) { + this.capabilities = capabilities; + this.unparsed |= capabilities.unparsed; + return this; + } + + /** + * Model features reported by the enrichment source. Omitted properties are unknown. + * + * @return capabilities + */ + @JsonProperty(JSON_PROPERTY_CAPABILITIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCapabilities getCapabilities() { + return capabilities; + } + + public void setCapabilities(AiGatewayModelCapabilities capabilities) { + this.capabilities = capabilities; + if (capabilities != null) { + this.unparsed |= capabilities.unparsed; + } + } + + public AiGatewayModelMetadata description(String description) { + this.description = description; + return this; + } + + /** + * Human-readable model description. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public AiGatewayModelMetadata displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Human-readable model name. + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public AiGatewayModelMetadata family(String family) { + this.family = family; + return this; + } + + /** + * Model family identifier. + * + * @return family + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAMILY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFamily() { + return family; + } + + public void setFamily(String family) { + this.family = family; + } + + public AiGatewayModelMetadata kind(AiGatewayModelMetadataKind kind) { + this.kind = kind; + this.unparsed |= !kind.isValid(); + return this; + } + + /** + * Primary model kind. Decision models return a choice or score instead of generated text. + * + * @return kind + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelMetadataKind getKind() { + return kind; + } + + public void setKind(AiGatewayModelMetadataKind kind) { + if (!kind.isValid()) { + this.unparsed = true; + } + this.kind = kind; + } + + public AiGatewayModelMetadata knowledgeCutoff(String knowledgeCutoff) { + this.knowledgeCutoff = knowledgeCutoff; + return this; + } + + /** + * Knowledge cutoff reported by the source. + * + * @return knowledgeCutoff + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_CUTOFF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKnowledgeCutoff() { + return knowledgeCutoff; + } + + public void setKnowledgeCutoff(String knowledgeCutoff) { + this.knowledgeCutoff = knowledgeCutoff; + } + + public AiGatewayModelMetadata lastUpdated(String lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Date the source record was last updated. + * + * @return lastUpdated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(String lastUpdated) { + this.lastUpdated = lastUpdated; + } + + public AiGatewayModelMetadata lifecycle(AiGatewayModelMetadataLifecycle lifecycle) { + this.lifecycle = lifecycle; + this.unparsed |= !lifecycle.isValid(); + return this; + } + + /** + * Model lifecycle state. + * + * @return lifecycle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIFECYCLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelMetadataLifecycle getLifecycle() { + return lifecycle; + } + + public void setLifecycle(AiGatewayModelMetadataLifecycle lifecycle) { + if (!lifecycle.isValid()) { + this.unparsed = true; + } + this.lifecycle = lifecycle; + } + + public AiGatewayModelMetadata limits(AiGatewayModelLimits limits) { + this.limits = limits; + this.unparsed |= limits.unparsed; + return this; + } + + /** + * Token limits reported by the enrichment source. + * + * @return limits + */ + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelLimits getLimits() { + return limits; + } + + public void setLimits(AiGatewayModelLimits limits) { + this.limits = limits; + if (limits != null) { + this.unparsed |= limits.unparsed; + } + } + + public AiGatewayModelMetadata modalities(AiGatewayModelModalities modalities) { + this.modalities = modalities; + this.unparsed |= modalities.unparsed; + return this; + } + + /** + * Supported model input and output modalities. + * + * @return modalities + */ + @JsonProperty(JSON_PROPERTY_MODALITIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelModalities getModalities() { + return modalities; + } + + public void setModalities(AiGatewayModelModalities modalities) { + this.modalities = modalities; + if (modalities != null) { + this.unparsed |= modalities.unparsed; + } + } + + public AiGatewayModelMetadata openWeights(Boolean openWeights) { + this.openWeights = openWeights; + return this; + } + + /** + * Whether model weights are openly available. + * + * @return openWeights + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPEN_WEIGHTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOpenWeights() { + return openWeights; + } + + public void setOpenWeights(Boolean openWeights) { + this.openWeights = openWeights; + } + + public AiGatewayModelMetadata reasoning(AiGatewayModelReasoning reasoning) { + this.reasoning = reasoning; + this.unparsed |= reasoning.unparsed; + return this; + } + + /** + * Supported reasoning controls. Absence means controls are unknown or unavailable. + * + * @return reasoning + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASONING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelReasoning getReasoning() { + return reasoning; + } + + public void setReasoning(AiGatewayModelReasoning reasoning) { + this.reasoning = reasoning; + if (reasoning != null) { + this.unparsed |= reasoning.unparsed; + } + } + + public AiGatewayModelMetadata referencePricing( + List referencePricing) { + this.referencePricing = referencePricing; + if (referencePricing != null) { + for (AiGatewayModelReferencePrice item : referencePricing) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public AiGatewayModelMetadata addReferencePricingItem( + AiGatewayModelReferencePrice referencePricingItem) { + if (this.referencePricing == null) { + this.referencePricing = new ArrayList<>(); + } + this.referencePricing.add(referencePricingItem); + this.unparsed |= referencePricingItem.unparsed; + return this; + } + + /** + * Provider-specific reference prices from the enrichment source. Omitted for shared + * canonical-model fallback matches. These do not determine gateway charges. + * + * @return referencePricing + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFERENCE_PRICING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReferencePricing() { + return referencePricing; + } + + public void setReferencePricing(List referencePricing) { + this.referencePricing = referencePricing; + if (referencePricing != null) { + for (AiGatewayModelReferencePrice item : referencePricing) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayModelMetadata releaseDate(String releaseDate) { + this.releaseDate = releaseDate; + return this; + } + + /** + * Model release date. + * + * @return releaseDate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELEASE_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReleaseDate() { + return releaseDate; + } + + public void setReleaseDate(String releaseDate) { + this.releaseDate = releaseDate; + } + + public AiGatewayModelMetadata source(AiGatewayModelMetadataSource source) { + this.source = source; + this.unparsed |= source.unparsed; + return this; + } + + /** + * Provenance for model metadata enrichment. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelMetadataSource getSource() { + return source; + } + + public void setSource(AiGatewayModelMetadataSource source) { + this.source = source; + if (source != null) { + this.unparsed |= source.unparsed; + } + } + + public AiGatewayModelMetadata status(AiGatewayModelMetadataStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Completeness of the matched source record. Partial also identifies metadata from a base model + * for a dated snapshot or from a shared canonical-model fallback. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelMetadataStatus getStatus() { + return status; + } + + public void setStatus(AiGatewayModelMetadataStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelMetadata + */ + @JsonAnySetter + public AiGatewayModelMetadata 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 AiGatewayModelMetadata object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelMetadata aiGatewayModelMetadata = (AiGatewayModelMetadata) o; + return Objects.equals(this.capabilities, aiGatewayModelMetadata.capabilities) + && Objects.equals(this.description, aiGatewayModelMetadata.description) + && Objects.equals(this.displayName, aiGatewayModelMetadata.displayName) + && Objects.equals(this.family, aiGatewayModelMetadata.family) + && Objects.equals(this.kind, aiGatewayModelMetadata.kind) + && Objects.equals(this.knowledgeCutoff, aiGatewayModelMetadata.knowledgeCutoff) + && Objects.equals(this.lastUpdated, aiGatewayModelMetadata.lastUpdated) + && Objects.equals(this.lifecycle, aiGatewayModelMetadata.lifecycle) + && Objects.equals(this.limits, aiGatewayModelMetadata.limits) + && Objects.equals(this.modalities, aiGatewayModelMetadata.modalities) + && Objects.equals(this.openWeights, aiGatewayModelMetadata.openWeights) + && Objects.equals(this.reasoning, aiGatewayModelMetadata.reasoning) + && Objects.equals(this.referencePricing, aiGatewayModelMetadata.referencePricing) + && Objects.equals(this.releaseDate, aiGatewayModelMetadata.releaseDate) + && Objects.equals(this.source, aiGatewayModelMetadata.source) + && Objects.equals(this.status, aiGatewayModelMetadata.status) + && Objects.equals(this.additionalProperties, aiGatewayModelMetadata.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + capabilities, + description, + displayName, + family, + kind, + knowledgeCutoff, + lastUpdated, + lifecycle, + limits, + modalities, + openWeights, + reasoning, + referencePricing, + releaseDate, + source, + status, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelMetadata {\n"); + sb.append(" capabilities: ").append(toIndentedString(capabilities)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" family: ").append(toIndentedString(family)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" knowledgeCutoff: ").append(toIndentedString(knowledgeCutoff)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" modalities: ").append(toIndentedString(modalities)).append("\n"); + sb.append(" openWeights: ").append(toIndentedString(openWeights)).append("\n"); + sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); + sb.append(" referencePricing: ").append(toIndentedString(referencePricing)).append("\n"); + sb.append(" releaseDate: ").append(toIndentedString(releaseDate)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataKind.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataKind.java new file mode 100644 index 00000000000..ad1802bf42e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataKind.java @@ -0,0 +1,66 @@ +/* + * 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; + +/** Primary model kind. Decision models return a choice or score instead of generated text. */ +@JsonSerialize(using = AiGatewayModelMetadataKind.AiGatewayModelMetadataKindSerializer.class) +public class AiGatewayModelMetadataKind extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("language", "embedding", "image", "audio", "decision", "reranking")); + + public static final AiGatewayModelMetadataKind LANGUAGE = + new AiGatewayModelMetadataKind("language"); + public static final AiGatewayModelMetadataKind EMBEDDING = + new AiGatewayModelMetadataKind("embedding"); + public static final AiGatewayModelMetadataKind IMAGE = new AiGatewayModelMetadataKind("image"); + public static final AiGatewayModelMetadataKind AUDIO = new AiGatewayModelMetadataKind("audio"); + public static final AiGatewayModelMetadataKind DECISION = + new AiGatewayModelMetadataKind("decision"); + public static final AiGatewayModelMetadataKind RERANKING = + new AiGatewayModelMetadataKind("reranking"); + + AiGatewayModelMetadataKind(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelMetadataKindSerializer + extends StdSerializer { + public AiGatewayModelMetadataKindSerializer(Class t) { + super(t); + } + + public AiGatewayModelMetadataKindSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelMetadataKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelMetadataKind fromValue(String value) { + return new AiGatewayModelMetadataKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataLifecycle.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataLifecycle.java new file mode 100644 index 00000000000..68011555c7e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataLifecycle.java @@ -0,0 +1,64 @@ +/* + * 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; + +/** Model lifecycle state. */ +@JsonSerialize( + using = AiGatewayModelMetadataLifecycle.AiGatewayModelMetadataLifecycleSerializer.class) +public class AiGatewayModelMetadataLifecycle extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("active", "alpha", "beta", "deprecated")); + + public static final AiGatewayModelMetadataLifecycle ACTIVE = + new AiGatewayModelMetadataLifecycle("active"); + public static final AiGatewayModelMetadataLifecycle ALPHA = + new AiGatewayModelMetadataLifecycle("alpha"); + public static final AiGatewayModelMetadataLifecycle BETA = + new AiGatewayModelMetadataLifecycle("beta"); + public static final AiGatewayModelMetadataLifecycle DEPRECATED = + new AiGatewayModelMetadataLifecycle("deprecated"); + + AiGatewayModelMetadataLifecycle(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelMetadataLifecycleSerializer + extends StdSerializer { + public AiGatewayModelMetadataLifecycleSerializer(Class t) { + super(t); + } + + public AiGatewayModelMetadataLifecycleSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelMetadataLifecycle value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelMetadataLifecycle fromValue(String value) { + return new AiGatewayModelMetadataLifecycle(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSource.java new file mode 100644 index 00000000000..602bbd72bbe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSource.java @@ -0,0 +1,294 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Provenance for model metadata enrichment. */ +@JsonPropertyOrder({ + AiGatewayModelMetadataSource.JSON_PROPERTY_MATCHED_BY, + AiGatewayModelMetadataSource.JSON_PROPERTY_MODEL_ID, + AiGatewayModelMetadataSource.JSON_PROPERTY_NAME, + AiGatewayModelMetadataSource.JSON_PROPERTY_OBSERVED_AT, + AiGatewayModelMetadataSource.JSON_PROPERTY_PROVIDER, + AiGatewayModelMetadataSource.JSON_PROPERTY_REVISION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelMetadataSource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MATCHED_BY = "matched_by"; + private AiGatewayModelMetadataSourceMatchedBy matchedBy; + + public static final String JSON_PROPERTY_MODEL_ID = "model_id"; + private String modelId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OBSERVED_AT = "observed_at"; + private OffsetDateTime observedAt; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private String provider; + + public static final String JSON_PROPERTY_REVISION = "revision"; + private String revision; + + public AiGatewayModelMetadataSource() {} + + @JsonCreator + public AiGatewayModelMetadataSource( + @JsonProperty(required = true, value = JSON_PROPERTY_MATCHED_BY) + AiGatewayModelMetadataSourceMatchedBy matchedBy, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID) String modelId, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER) String provider) { + this.matchedBy = matchedBy; + this.unparsed |= !matchedBy.isValid(); + this.modelId = modelId; + this.name = name; + this.provider = provider; + } + + public AiGatewayModelMetadataSource matchedBy(AiGatewayModelMetadataSourceMatchedBy matchedBy) { + this.matchedBy = matchedBy; + this.unparsed |= !matchedBy.isValid(); + return this; + } + + /** + * Identifier strategy used to match the gateway catalog entry. Date-suffix and shared + * canonical-model fallback matches produce partial metadata. + * + * @return matchedBy + */ + @JsonProperty(JSON_PROPERTY_MATCHED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelMetadataSourceMatchedBy getMatchedBy() { + return matchedBy; + } + + public void setMatchedBy(AiGatewayModelMetadataSourceMatchedBy matchedBy) { + if (!matchedBy.isValid()) { + this.unparsed = true; + } + this.matchedBy = matchedBy; + } + + public AiGatewayModelMetadataSource modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Model identifier in the metadata source provider catalog. + * + * @return modelId + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelId() { + return modelId; + } + + public void setModelId(String modelId) { + this.modelId = modelId; + } + + public AiGatewayModelMetadataSource name(String name) { + this.name = name; + return this; + } + + /** + * Metadata source name. + * + * @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 AiGatewayModelMetadataSource observedAt(OffsetDateTime observedAt) { + this.observedAt = observedAt; + return this; + } + + /** + * Last successful observation of this valid source record. Retained invalid entries keep their + * previous timestamp. + * + * @return observedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getObservedAt() { + return observedAt; + } + + public void setObservedAt(OffsetDateTime observedAt) { + this.observedAt = observedAt; + } + + public AiGatewayModelMetadataSource provider(String provider) { + this.provider = provider; + return this; + } + + /** + * Provider namespace in the metadata source, or canonical for a shared model record. + * + * @return provider + */ + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProvider() { + return provider; + } + + public void setProvider(String provider) { + this.provider = provider; + } + + public AiGatewayModelMetadataSource revision(String revision) { + this.revision = revision; + return this; + } + + /** + * SHA-256 content revision of the source snapshot that supplied this record. + * + * @return revision + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRevision() { + return revision; + } + + public void setRevision(String revision) { + this.revision = revision; + } + + /** + * 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 AiGatewayModelMetadataSource + */ + @JsonAnySetter + public AiGatewayModelMetadataSource 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 AiGatewayModelMetadataSource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelMetadataSource aiGatewayModelMetadataSource = (AiGatewayModelMetadataSource) o; + return Objects.equals(this.matchedBy, aiGatewayModelMetadataSource.matchedBy) + && Objects.equals(this.modelId, aiGatewayModelMetadataSource.modelId) + && Objects.equals(this.name, aiGatewayModelMetadataSource.name) + && Objects.equals(this.observedAt, aiGatewayModelMetadataSource.observedAt) + && Objects.equals(this.provider, aiGatewayModelMetadataSource.provider) + && Objects.equals(this.revision, aiGatewayModelMetadataSource.revision) + && Objects.equals( + this.additionalProperties, aiGatewayModelMetadataSource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + matchedBy, modelId, name, observedAt, provider, revision, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelMetadataSource {\n"); + sb.append(" matchedBy: ").append(toIndentedString(matchedBy)).append("\n"); + sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" observedAt: ").append(toIndentedString(observedAt)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).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/AiGatewayModelMetadataSourceMatchedBy.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSourceMatchedBy.java new file mode 100644 index 00000000000..eb2a6ef739c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataSourceMatchedBy.java @@ -0,0 +1,75 @@ +/* + * 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; + +/** + * Identifier strategy used to match the gateway catalog entry. Date-suffix and shared + * canonical-model fallback matches produce partial metadata. + */ +@JsonSerialize( + using = + AiGatewayModelMetadataSourceMatchedBy.AiGatewayModelMetadataSourceMatchedBySerializer.class) +public class AiGatewayModelMetadataSourceMatchedBy extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "override", "wire_id", "canonical_id", "wire_id_date_suffix", "canonical_model")); + + public static final AiGatewayModelMetadataSourceMatchedBy OVERRIDE = + new AiGatewayModelMetadataSourceMatchedBy("override"); + public static final AiGatewayModelMetadataSourceMatchedBy WIRE_ID = + new AiGatewayModelMetadataSourceMatchedBy("wire_id"); + public static final AiGatewayModelMetadataSourceMatchedBy CANONICAL_ID = + new AiGatewayModelMetadataSourceMatchedBy("canonical_id"); + public static final AiGatewayModelMetadataSourceMatchedBy WIRE_ID_DATE_SUFFIX = + new AiGatewayModelMetadataSourceMatchedBy("wire_id_date_suffix"); + public static final AiGatewayModelMetadataSourceMatchedBy CANONICAL_MODEL = + new AiGatewayModelMetadataSourceMatchedBy("canonical_model"); + + AiGatewayModelMetadataSourceMatchedBy(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelMetadataSourceMatchedBySerializer + extends StdSerializer { + public AiGatewayModelMetadataSourceMatchedBySerializer( + Class t) { + super(t); + } + + public AiGatewayModelMetadataSourceMatchedBySerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelMetadataSourceMatchedBy value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelMetadataSourceMatchedBy fromValue(String value) { + return new AiGatewayModelMetadataSourceMatchedBy(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataStatus.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataStatus.java new file mode 100644 index 00000000000..84b7dc06d9e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelMetadataStatus.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; + +/** + * Completeness of the matched source record. Partial also identifies metadata from a base model for + * a dated snapshot or from a shared canonical-model fallback. + */ +@JsonSerialize(using = AiGatewayModelMetadataStatus.AiGatewayModelMetadataStatusSerializer.class) +public class AiGatewayModelMetadataStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("available", "partial")); + + public static final AiGatewayModelMetadataStatus AVAILABLE = + new AiGatewayModelMetadataStatus("available"); + public static final AiGatewayModelMetadataStatus PARTIAL = + new AiGatewayModelMetadataStatus("partial"); + + AiGatewayModelMetadataStatus(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelMetadataStatusSerializer + extends StdSerializer { + public AiGatewayModelMetadataStatusSerializer(Class t) { + super(t); + } + + public AiGatewayModelMetadataStatusSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelMetadataStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelMetadataStatus fromValue(String value) { + return new AiGatewayModelMetadataStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelModalities.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelModalities.java new file mode 100644 index 00000000000..5453d91588a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelModalities.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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Supported model input and output modalities. */ +@JsonPropertyOrder({ + AiGatewayModelModalities.JSON_PROPERTY_INPUT, + AiGatewayModelModalities.JSON_PROPERTY_OUTPUT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelModalities { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INPUT = "input"; + private List input = null; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private List output = null; + + public AiGatewayModelModalities input(List input) { + this.input = input; + return this; + } + + public AiGatewayModelModalities addInputItem(String inputItem) { + if (this.input == null) { + this.input = new ArrayList<>(); + } + this.input.add(inputItem); + return this; + } + + /** + * Getinput + * + * @return input + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getInput() { + return input; + } + + public void setInput(List input) { + this.input = input; + } + + public AiGatewayModelModalities output(List output) { + this.output = output; + return this; + } + + public AiGatewayModelModalities addOutputItem(String outputItem) { + if (this.output == null) { + this.output = new ArrayList<>(); + } + this.output.add(outputItem); + return this; + } + + /** + * Getoutput + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOutput() { + return output; + } + + public void setOutput(List output) { + this.output = output; + } + + /** + * 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 AiGatewayModelModalities + */ + @JsonAnySetter + public AiGatewayModelModalities 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 AiGatewayModelModalities object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelModalities aiGatewayModelModalities = (AiGatewayModelModalities) o; + return Objects.equals(this.input, aiGatewayModelModalities.input) + && Objects.equals(this.output, aiGatewayModelModalities.output) + && Objects.equals(this.additionalProperties, aiGatewayModelModalities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelModalities {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).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/AiGatewayModelPricingAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingAttributes.java new file mode 100644 index 00000000000..dad8b07f896 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingAttributes.java @@ -0,0 +1,175 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a model pricing resource. */ +@JsonPropertyOrder({ + AiGatewayModelPricingAttributes.JSON_PROPERTY_EFFECTIVE_SOURCE, + AiGatewayModelPricingAttributes.JSON_PROPERTY_PRICING_CONFIG +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EFFECTIVE_SOURCE = "effective_source"; + private AiGatewayModelPricingEffectiveSource effectiveSource; + + public static final String JSON_PROPERTY_PRICING_CONFIG = "pricing_config"; + private AiGatewayModelPricingConfig pricingConfig; + + public AiGatewayModelPricingAttributes effectiveSource( + AiGatewayModelPricingEffectiveSource effectiveSource) { + this.effectiveSource = effectiveSource; + this.unparsed |= !effectiveSource.isValid(); + return this; + } + + /** + * Effective source of the model pricing data. + * + * @return effectiveSource + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EFFECTIVE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelPricingEffectiveSource getEffectiveSource() { + return effectiveSource; + } + + public void setEffectiveSource(AiGatewayModelPricingEffectiveSource effectiveSource) { + if (!effectiveSource.isValid()) { + this.unparsed = true; + } + this.effectiveSource = effectiveSource; + } + + public AiGatewayModelPricingAttributes pricingConfig(AiGatewayModelPricingConfig pricingConfig) { + this.pricingConfig = pricingConfig; + this.unparsed |= pricingConfig.unparsed; + return this; + } + + /** + * Pricing configuration for a model. + * + * @return pricingConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRICING_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelPricingConfig getPricingConfig() { + return pricingConfig; + } + + public void setPricingConfig(AiGatewayModelPricingConfig pricingConfig) { + this.pricingConfig = pricingConfig; + if (pricingConfig != null) { + this.unparsed |= pricingConfig.unparsed; + } + } + + /** + * 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 AiGatewayModelPricingAttributes + */ + @JsonAnySetter + public AiGatewayModelPricingAttributes 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 AiGatewayModelPricingAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingAttributes aiGatewayModelPricingAttributes = + (AiGatewayModelPricingAttributes) o; + return Objects.equals(this.effectiveSource, aiGatewayModelPricingAttributes.effectiveSource) + && Objects.equals(this.pricingConfig, aiGatewayModelPricingAttributes.pricingConfig) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(effectiveSource, pricingConfig, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingAttributes {\n"); + sb.append(" effectiveSource: ").append(toIndentedString(effectiveSource)).append("\n"); + sb.append(" pricingConfig: ").append(toIndentedString(pricingConfig)).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/AiGatewayModelPricingCatalogRequestConfig.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestConfig.java new file mode 100644 index 00000000000..0dc9d376cff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestConfig.java @@ -0,0 +1,159 @@ +/* + * 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.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.Objects; + +/** Catalog pricing configuration with optional manual rate overrides. */ +@JsonPropertyOrder({ + AiGatewayModelPricingCatalogRequestConfig.JSON_PROPERTY_OVERRIDES, + AiGatewayModelPricingCatalogRequestConfig.JSON_PROPERTY_SOURCE, + AiGatewayModelPricingCatalogRequestConfig.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingCatalogRequestConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OVERRIDES = "overrides"; + private AiGatewayModelPricingRates overrides; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelPricingCatalogRequestSource source; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public AiGatewayModelPricingCatalogRequestConfig() {} + + @JsonCreator + public AiGatewayModelPricingCatalogRequestConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + AiGatewayModelPricingCatalogRequestSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.source = source; + this.unparsed |= source.unparsed; + this.version = version; + } + + public AiGatewayModelPricingCatalogRequestConfig overrides(AiGatewayModelPricingRates overrides) { + this.overrides = overrides; + this.unparsed |= overrides.unparsed; + return this; + } + + /** + * Pricing rates for a model. + * + * @return overrides + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERRIDES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelPricingRates getOverrides() { + return overrides; + } + + public void setOverrides(AiGatewayModelPricingRates overrides) { + this.overrides = overrides; + if (overrides != null) { + this.unparsed |= overrides.unparsed; + } + } + + public AiGatewayModelPricingCatalogRequestConfig source( + AiGatewayModelPricingCatalogRequestSource source) { + this.source = source; + this.unparsed |= source.unparsed; + return this; + } + + /** + * Source for a catalog pricing configuration. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingCatalogRequestSource getSource() { + return source; + } + + public void setSource(AiGatewayModelPricingCatalogRequestSource source) { + this.source = source; + if (source != null) { + this.unparsed |= source.unparsed; + } + } + + public AiGatewayModelPricingCatalogRequestConfig version(Long version) { + this.version = version; + return this; + } + + /** + * Pricing configuration version. The only supported version is 1. minimum: 1 + * maximum: 1 + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** Return true if this AiGatewayModelPricingCatalogRequestConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingCatalogRequestConfig aiGatewayModelPricingCatalogRequestConfig = + (AiGatewayModelPricingCatalogRequestConfig) o; + return Objects.equals(this.overrides, aiGatewayModelPricingCatalogRequestConfig.overrides) + && Objects.equals(this.source, aiGatewayModelPricingCatalogRequestConfig.source) + && Objects.equals(this.version, aiGatewayModelPricingCatalogRequestConfig.version); + } + + @Override + public int hashCode() { + return Objects.hash(overrides, source, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingCatalogRequestConfig {\n"); + sb.append(" overrides: ").append(toIndentedString(overrides)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/AiGatewayModelPricingCatalogRequestSource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestSource.java new file mode 100644 index 00000000000..b4f4bb6de4b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestSource.java @@ -0,0 +1,127 @@ +/* + * 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.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.Objects; + +/** Source for a catalog pricing configuration. */ +@JsonPropertyOrder({ + AiGatewayModelPricingCatalogRequestSource.JSON_PROPERTY_PROVIDER_ID, + AiGatewayModelPricingCatalogRequestSource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingCatalogRequestSource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private String providerId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelPricingCatalogRequestSourceType type; + + public AiGatewayModelPricingCatalogRequestSource() {} + + @JsonCreator + public AiGatewayModelPricingCatalogRequestSource( + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_ID) String providerId, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelPricingCatalogRequestSourceType type) { + this.providerId = providerId; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelPricingCatalogRequestSource providerId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Pricing catalog provider identifier. + * + * @return providerId + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public AiGatewayModelPricingCatalogRequestSource type( + AiGatewayModelPricingCatalogRequestSourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Catalog pricing source type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingCatalogRequestSourceType getType() { + return type; + } + + public void setType(AiGatewayModelPricingCatalogRequestSourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** Return true if this AiGatewayModelPricingCatalogRequestSource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingCatalogRequestSource aiGatewayModelPricingCatalogRequestSource = + (AiGatewayModelPricingCatalogRequestSource) o; + return Objects.equals(this.providerId, aiGatewayModelPricingCatalogRequestSource.providerId) + && Objects.equals(this.type, aiGatewayModelPricingCatalogRequestSource.type); + } + + @Override + public int hashCode() { + return Objects.hash(providerId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingCatalogRequestSource {\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/AiGatewayModelPricingCatalogRequestSourceType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestSourceType.java new file mode 100644 index 00000000000..ca975740bbc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCatalogRequestSourceType.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; + +/** Catalog pricing source type. */ +@JsonSerialize( + using = + AiGatewayModelPricingCatalogRequestSourceType + .AiGatewayModelPricingCatalogRequestSourceTypeSerializer.class) +public class AiGatewayModelPricingCatalogRequestSourceType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("catalog")); + + public static final AiGatewayModelPricingCatalogRequestSourceType CATALOG = + new AiGatewayModelPricingCatalogRequestSourceType("catalog"); + + AiGatewayModelPricingCatalogRequestSourceType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelPricingCatalogRequestSourceTypeSerializer + extends StdSerializer { + public AiGatewayModelPricingCatalogRequestSourceTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayModelPricingCatalogRequestSourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelPricingCatalogRequestSourceType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelPricingCatalogRequestSourceType fromValue(String value) { + return new AiGatewayModelPricingCatalogRequestSourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingConfig.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingConfig.java new file mode 100644 index 00000000000..66360159608 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingConfig.java @@ -0,0 +1,243 @@ +/* + * 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; + +/** Pricing configuration for a model. */ +@JsonPropertyOrder({ + AiGatewayModelPricingConfig.JSON_PROPERTY_OVERRIDES, + AiGatewayModelPricingConfig.JSON_PROPERTY_RATES, + AiGatewayModelPricingConfig.JSON_PROPERTY_SOURCE, + AiGatewayModelPricingConfig.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OVERRIDES = "overrides"; + private AiGatewayModelPricingRates overrides; + + public static final String JSON_PROPERTY_RATES = "rates"; + private AiGatewayModelPricingRates rates; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelPricingSource source; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public AiGatewayModelPricingConfig() {} + + @JsonCreator + public AiGatewayModelPricingConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + AiGatewayModelPricingSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.source = source; + this.unparsed |= source.unparsed; + this.version = version; + } + + public AiGatewayModelPricingConfig overrides(AiGatewayModelPricingRates overrides) { + this.overrides = overrides; + this.unparsed |= overrides.unparsed; + return this; + } + + /** + * Pricing rates for a model. + * + * @return overrides + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERRIDES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelPricingRates getOverrides() { + return overrides; + } + + public void setOverrides(AiGatewayModelPricingRates overrides) { + this.overrides = overrides; + if (overrides != null) { + this.unparsed |= overrides.unparsed; + } + } + + public AiGatewayModelPricingConfig rates(AiGatewayModelPricingRates rates) { + this.rates = rates; + this.unparsed |= rates.unparsed; + return this; + } + + /** + * Pricing rates for a model. + * + * @return rates + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelPricingRates getRates() { + return rates; + } + + public void setRates(AiGatewayModelPricingRates rates) { + this.rates = rates; + if (rates != null) { + this.unparsed |= rates.unparsed; + } + } + + public AiGatewayModelPricingConfig source(AiGatewayModelPricingSource source) { + this.source = source; + this.unparsed |= source.unparsed; + return this; + } + + /** + * Source information for a model's pricing. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingSource getSource() { + return source; + } + + public void setSource(AiGatewayModelPricingSource source) { + this.source = source; + if (source != null) { + this.unparsed |= source.unparsed; + } + } + + public AiGatewayModelPricingConfig version(Long version) { + this.version = version; + return this; + } + + /** + * Pricing configuration version. The only supported version is 1. minimum: 1 + * maximum: 1 + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * 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 AiGatewayModelPricingConfig + */ + @JsonAnySetter + public AiGatewayModelPricingConfig 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 AiGatewayModelPricingConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingConfig aiGatewayModelPricingConfig = (AiGatewayModelPricingConfig) o; + return Objects.equals(this.overrides, aiGatewayModelPricingConfig.overrides) + && Objects.equals(this.rates, aiGatewayModelPricingConfig.rates) + && Objects.equals(this.source, aiGatewayModelPricingConfig.source) + && Objects.equals(this.version, aiGatewayModelPricingConfig.version) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(overrides, rates, source, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingConfig {\n"); + sb.append(" overrides: ").append(toIndentedString(overrides)).append("\n"); + sb.append(" rates: ").append(toIndentedString(rates)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/AiGatewayModelPricingCustomRequestConfig.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestConfig.java new file mode 100644 index 00000000000..85534480b3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestConfig.java @@ -0,0 +1,162 @@ +/* + * 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.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.Objects; + +/** Custom pricing configuration. All four rates are required. */ +@JsonPropertyOrder({ + AiGatewayModelPricingCustomRequestConfig.JSON_PROPERTY_RATES, + AiGatewayModelPricingCustomRequestConfig.JSON_PROPERTY_SOURCE, + AiGatewayModelPricingCustomRequestConfig.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingCustomRequestConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RATES = "rates"; + private AiGatewayModelPricingRequiredRates rates; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelPricingCustomRequestSource source; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public AiGatewayModelPricingCustomRequestConfig() {} + + @JsonCreator + public AiGatewayModelPricingCustomRequestConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_RATES) + AiGatewayModelPricingRequiredRates rates, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + AiGatewayModelPricingCustomRequestSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.rates = rates; + this.unparsed |= rates.unparsed; + this.source = source; + this.unparsed |= source.unparsed; + this.version = version; + } + + public AiGatewayModelPricingCustomRequestConfig rates(AiGatewayModelPricingRequiredRates rates) { + this.rates = rates; + this.unparsed |= rates.unparsed; + return this; + } + + /** + * Complete set of rates required for custom pricing. + * + * @return rates + */ + @JsonProperty(JSON_PROPERTY_RATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingRequiredRates getRates() { + return rates; + } + + public void setRates(AiGatewayModelPricingRequiredRates rates) { + this.rates = rates; + if (rates != null) { + this.unparsed |= rates.unparsed; + } + } + + public AiGatewayModelPricingCustomRequestConfig source( + AiGatewayModelPricingCustomRequestSource source) { + this.source = source; + this.unparsed |= source.unparsed; + return this; + } + + /** + * Source for a custom pricing configuration. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingCustomRequestSource getSource() { + return source; + } + + public void setSource(AiGatewayModelPricingCustomRequestSource source) { + this.source = source; + if (source != null) { + this.unparsed |= source.unparsed; + } + } + + public AiGatewayModelPricingCustomRequestConfig version(Long version) { + this.version = version; + return this; + } + + /** + * Pricing configuration version. The only supported version is 1. minimum: 1 + * maximum: 1 + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** Return true if this AiGatewayModelPricingCustomRequestConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingCustomRequestConfig aiGatewayModelPricingCustomRequestConfig = + (AiGatewayModelPricingCustomRequestConfig) o; + return Objects.equals(this.rates, aiGatewayModelPricingCustomRequestConfig.rates) + && Objects.equals(this.source, aiGatewayModelPricingCustomRequestConfig.source) + && Objects.equals(this.version, aiGatewayModelPricingCustomRequestConfig.version); + } + + @Override + public int hashCode() { + return Objects.hash(rates, source, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingCustomRequestConfig {\n"); + sb.append(" rates: ").append(toIndentedString(rates)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/AiGatewayModelPricingCustomRequestSource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestSource.java new file mode 100644 index 00000000000..8413ffb52ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestSource.java @@ -0,0 +1,98 @@ +/* + * 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.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.Objects; + +/** Source for a custom pricing configuration. */ +@JsonPropertyOrder({AiGatewayModelPricingCustomRequestSource.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingCustomRequestSource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelPricingCustomRequestSourceType type = + AiGatewayModelPricingCustomRequestSourceType.CUSTOM; + + public AiGatewayModelPricingCustomRequestSource() {} + + @JsonCreator + public AiGatewayModelPricingCustomRequestSource( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelPricingCustomRequestSourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelPricingCustomRequestSource type( + AiGatewayModelPricingCustomRequestSourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Custom pricing source type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingCustomRequestSourceType getType() { + return type; + } + + public void setType(AiGatewayModelPricingCustomRequestSourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** Return true if this AiGatewayModelPricingCustomRequestSource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingCustomRequestSource aiGatewayModelPricingCustomRequestSource = + (AiGatewayModelPricingCustomRequestSource) o; + return Objects.equals(this.type, aiGatewayModelPricingCustomRequestSource.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingCustomRequestSource {\n"); + sb.append(" type: ").append(toIndentedString(type)).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/AiGatewayModelPricingCustomRequestSourceType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestSourceType.java new file mode 100644 index 00000000000..c51ef59a566 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingCustomRequestSourceType.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; + +/** Custom pricing source type. */ +@JsonSerialize( + using = + AiGatewayModelPricingCustomRequestSourceType + .AiGatewayModelPricingCustomRequestSourceTypeSerializer.class) +public class AiGatewayModelPricingCustomRequestSourceType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("custom")); + + public static final AiGatewayModelPricingCustomRequestSourceType CUSTOM = + new AiGatewayModelPricingCustomRequestSourceType("custom"); + + AiGatewayModelPricingCustomRequestSourceType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelPricingCustomRequestSourceTypeSerializer + extends StdSerializer { + public AiGatewayModelPricingCustomRequestSourceTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayModelPricingCustomRequestSourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelPricingCustomRequestSourceType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelPricingCustomRequestSourceType fromValue(String value) { + return new AiGatewayModelPricingCustomRequestSourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingEffectiveSource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingEffectiveSource.java new file mode 100644 index 00000000000..a5750219403 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingEffectiveSource.java @@ -0,0 +1,64 @@ +/* + * 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; + +/** Effective source of the model pricing data. */ +@JsonSerialize( + using = + AiGatewayModelPricingEffectiveSource.AiGatewayModelPricingEffectiveSourceSerializer.class) +public class AiGatewayModelPricingEffectiveSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("catalog_auto", "model_override", "unknown")); + + public static final AiGatewayModelPricingEffectiveSource CATALOG_AUTO = + new AiGatewayModelPricingEffectiveSource("catalog_auto"); + public static final AiGatewayModelPricingEffectiveSource MODEL_OVERRIDE = + new AiGatewayModelPricingEffectiveSource("model_override"); + public static final AiGatewayModelPricingEffectiveSource UNKNOWN = + new AiGatewayModelPricingEffectiveSource("unknown"); + + AiGatewayModelPricingEffectiveSource(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelPricingEffectiveSourceSerializer + extends StdSerializer { + public AiGatewayModelPricingEffectiveSourceSerializer( + Class t) { + super(t); + } + + public AiGatewayModelPricingEffectiveSourceSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelPricingEffectiveSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelPricingEffectiveSource fromValue(String value) { + return new AiGatewayModelPricingEffectiveSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRates.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRates.java new file mode 100644 index 00000000000..9bb679a930a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRates.java @@ -0,0 +1,175 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Pricing rates for a model. */ +@JsonPropertyOrder({ + AiGatewayModelPricingRates.JSON_PROPERTY_CACHE_READ_COST_PER_MTOK, + AiGatewayModelPricingRates.JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK, + AiGatewayModelPricingRates.JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK, + AiGatewayModelPricingRates.JSON_PROPERTY_OUTPUT_COST_PER_MTOK +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingRates { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CACHE_READ_COST_PER_MTOK = "cache_read_cost_per_mtok"; + private Double cacheReadCostPerMtok; + + public static final String JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK = "cache_write_cost_per_mtok"; + private Double cacheWriteCostPerMtok; + + public static final String JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK = + "non_cached_input_cost_per_mtok"; + private Double nonCachedInputCostPerMtok; + + public static final String JSON_PROPERTY_OUTPUT_COST_PER_MTOK = "output_cost_per_mtok"; + private Double outputCostPerMtok; + + public AiGatewayModelPricingRates cacheReadCostPerMtok(Double cacheReadCostPerMtok) { + this.cacheReadCostPerMtok = cacheReadCostPerMtok; + return this; + } + + /** + * Cost per million tokens for cache reads. minimum: 0 + * + * @return cacheReadCostPerMtok + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CACHE_READ_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getCacheReadCostPerMtok() { + return cacheReadCostPerMtok; + } + + public void setCacheReadCostPerMtok(Double cacheReadCostPerMtok) { + this.cacheReadCostPerMtok = cacheReadCostPerMtok; + } + + public AiGatewayModelPricingRates cacheWriteCostPerMtok(Double cacheWriteCostPerMtok) { + this.cacheWriteCostPerMtok = cacheWriteCostPerMtok; + return this; + } + + /** + * Cost per million tokens for cache writes. minimum: 0 + * + * @return cacheWriteCostPerMtok + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getCacheWriteCostPerMtok() { + return cacheWriteCostPerMtok; + } + + public void setCacheWriteCostPerMtok(Double cacheWriteCostPerMtok) { + this.cacheWriteCostPerMtok = cacheWriteCostPerMtok; + } + + public AiGatewayModelPricingRates nonCachedInputCostPerMtok(Double nonCachedInputCostPerMtok) { + this.nonCachedInputCostPerMtok = nonCachedInputCostPerMtok; + return this; + } + + /** + * Cost per million tokens for non-cached input. minimum: 0 + * + * @return nonCachedInputCostPerMtok + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getNonCachedInputCostPerMtok() { + return nonCachedInputCostPerMtok; + } + + public void setNonCachedInputCostPerMtok(Double nonCachedInputCostPerMtok) { + this.nonCachedInputCostPerMtok = nonCachedInputCostPerMtok; + } + + public AiGatewayModelPricingRates outputCostPerMtok(Double outputCostPerMtok) { + this.outputCostPerMtok = outputCostPerMtok; + return this; + } + + /** + * Cost per million tokens for output. minimum: 0 + * + * @return outputCostPerMtok + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getOutputCostPerMtok() { + return outputCostPerMtok; + } + + public void setOutputCostPerMtok(Double outputCostPerMtok) { + this.outputCostPerMtok = outputCostPerMtok; + } + + /** Return true if this AiGatewayModelPricingRates object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingRates aiGatewayModelPricingRates = (AiGatewayModelPricingRates) o; + return Objects.equals( + this.cacheReadCostPerMtok, aiGatewayModelPricingRates.cacheReadCostPerMtok) + && Objects.equals( + this.cacheWriteCostPerMtok, aiGatewayModelPricingRates.cacheWriteCostPerMtok) + && Objects.equals( + this.nonCachedInputCostPerMtok, aiGatewayModelPricingRates.nonCachedInputCostPerMtok) + && Objects.equals(this.outputCostPerMtok, aiGatewayModelPricingRates.outputCostPerMtok); + } + + @Override + public int hashCode() { + return Objects.hash( + cacheReadCostPerMtok, cacheWriteCostPerMtok, nonCachedInputCostPerMtok, outputCostPerMtok); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingRates {\n"); + sb.append(" cacheReadCostPerMtok: ") + .append(toIndentedString(cacheReadCostPerMtok)) + .append("\n"); + sb.append(" cacheWriteCostPerMtok: ") + .append(toIndentedString(cacheWriteCostPerMtok)) + .append("\n"); + sb.append(" nonCachedInputCostPerMtok: ") + .append(toIndentedString(nonCachedInputCostPerMtok)) + .append("\n"); + sb.append(" outputCostPerMtok: ").append(toIndentedString(outputCostPerMtok)).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/AiGatewayModelPricingRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequest.java new file mode 100644 index 00000000000..34a2f910530 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for setting model pricing. */ +@JsonPropertyOrder({AiGatewayModelPricingRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelPricingRequestData data; + + public AiGatewayModelPricingRequest() {} + + @JsonCreator + public AiGatewayModelPricingRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayModelPricingRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelPricingRequest data(AiGatewayModelPricingRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for a model pricing request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingRequestData getData() { + return data; + } + + public void setData(AiGatewayModelPricingRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelPricingRequest + */ + @JsonAnySetter + public AiGatewayModelPricingRequest 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 AiGatewayModelPricingRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingRequest aiGatewayModelPricingRequest = (AiGatewayModelPricingRequest) o; + return Objects.equals(this.data, aiGatewayModelPricingRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestAttributes.java new file mode 100644 index 00000000000..715863861c3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestAttributes.java @@ -0,0 +1,152 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for a model pricing request. */ +@JsonPropertyOrder({AiGatewayModelPricingRequestAttributes.JSON_PROPERTY_PRICING_CONFIG}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRICING_CONFIG = "pricing_config"; + private AiGatewayModelPricingRequestConfig pricingConfig; + + public AiGatewayModelPricingRequestAttributes() {} + + @JsonCreator + public AiGatewayModelPricingRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PRICING_CONFIG) + AiGatewayModelPricingRequestConfig pricingConfig) { + this.pricingConfig = pricingConfig; + this.unparsed |= pricingConfig.unparsed; + } + + public AiGatewayModelPricingRequestAttributes pricingConfig( + AiGatewayModelPricingRequestConfig pricingConfig) { + this.pricingConfig = pricingConfig; + this.unparsed |= pricingConfig.unparsed; + return this; + } + + /** + * Pricing configuration accepted when setting model pricing. + * + * @return pricingConfig + */ + @JsonProperty(JSON_PROPERTY_PRICING_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingRequestConfig getPricingConfig() { + return pricingConfig; + } + + public void setPricingConfig(AiGatewayModelPricingRequestConfig pricingConfig) { + this.pricingConfig = pricingConfig; + if (pricingConfig != null) { + this.unparsed |= pricingConfig.unparsed; + } + } + + /** + * 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 AiGatewayModelPricingRequestAttributes + */ + @JsonAnySetter + public AiGatewayModelPricingRequestAttributes 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 AiGatewayModelPricingRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingRequestAttributes aiGatewayModelPricingRequestAttributes = + (AiGatewayModelPricingRequestAttributes) o; + return Objects.equals(this.pricingConfig, aiGatewayModelPricingRequestAttributes.pricingConfig) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pricingConfig, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingRequestAttributes {\n"); + sb.append(" pricingConfig: ").append(toIndentedString(pricingConfig)).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/AiGatewayModelPricingRequestConfig.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestConfig.java new file mode 100644 index 00000000000..9ce6962becd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestConfig.java @@ -0,0 +1,310 @@ +/* + * 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.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +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.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = AiGatewayModelPricingRequestConfig.AiGatewayModelPricingRequestConfigDeserializer.class) +@JsonSerialize( + using = AiGatewayModelPricingRequestConfig.AiGatewayModelPricingRequestConfigSerializer.class) +public class AiGatewayModelPricingRequestConfig extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(AiGatewayModelPricingRequestConfig.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class AiGatewayModelPricingRequestConfigSerializer + extends StdSerializer { + public AiGatewayModelPricingRequestConfigSerializer( + Class t) { + super(t); + } + + public AiGatewayModelPricingRequestConfigSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelPricingRequestConfig value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class AiGatewayModelPricingRequestConfigDeserializer + extends StdDeserializer { + public AiGatewayModelPricingRequestConfigDeserializer() { + this(AiGatewayModelPricingRequestConfig.class); + } + + public AiGatewayModelPricingRequestConfigDeserializer(Class vc) { + super(vc); + } + + @Override + public AiGatewayModelPricingRequestConfig 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 AiGatewayModelPricingCustomRequestConfig + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AiGatewayModelPricingCustomRequestConfig.class.equals(Integer.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(Long.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(Float.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(Double.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(Boolean.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AiGatewayModelPricingCustomRequestConfig.class.equals(Integer.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AiGatewayModelPricingCustomRequestConfig.class.equals(Float.class) + || AiGatewayModelPricingCustomRequestConfig.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (AiGatewayModelPricingCustomRequestConfig.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AiGatewayModelPricingCustomRequestConfig.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(AiGatewayModelPricingCustomRequestConfig.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 (!((AiGatewayModelPricingCustomRequestConfig) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, "Input data matches schema 'AiGatewayModelPricingCustomRequestConfig'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'AiGatewayModelPricingCustomRequestConfig'", + e); + } + + // deserialize AiGatewayModelPricingCatalogRequestConfig + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AiGatewayModelPricingCatalogRequestConfig.class.equals(Integer.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(Long.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(Float.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(Double.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(Boolean.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AiGatewayModelPricingCatalogRequestConfig.class.equals(Integer.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AiGatewayModelPricingCatalogRequestConfig.class.equals(Float.class) + || AiGatewayModelPricingCatalogRequestConfig.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (AiGatewayModelPricingCatalogRequestConfig.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AiGatewayModelPricingCatalogRequestConfig.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(AiGatewayModelPricingCatalogRequestConfig.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 (!((AiGatewayModelPricingCatalogRequestConfig) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, "Input data matches schema 'AiGatewayModelPricingCatalogRequestConfig'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'AiGatewayModelPricingCatalogRequestConfig'", + e); + } + + AiGatewayModelPricingRequestConfig ret = new AiGatewayModelPricingRequestConfig(); + 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 AiGatewayModelPricingRequestConfig getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "AiGatewayModelPricingRequestConfig cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public AiGatewayModelPricingRequestConfig() { + super("oneOf", Boolean.FALSE); + } + + public AiGatewayModelPricingRequestConfig(AiGatewayModelPricingCustomRequestConfig o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AiGatewayModelPricingRequestConfig(AiGatewayModelPricingCatalogRequestConfig o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "AiGatewayModelPricingCustomRequestConfig", + new GenericType() {}); + schemas.put( + "AiGatewayModelPricingCatalogRequestConfig", + new GenericType() {}); + JSON.registerDescendants( + AiGatewayModelPricingRequestConfig.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return AiGatewayModelPricingRequestConfig.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AiGatewayModelPricingCustomRequestConfig, + * AiGatewayModelPricingCatalogRequestConfig + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + AiGatewayModelPricingCustomRequestConfig.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + AiGatewayModelPricingCatalogRequestConfig.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be AiGatewayModelPricingCustomRequestConfig," + + " AiGatewayModelPricingCatalogRequestConfig"); + } + + /** + * Get the actual instance, which can be the following: AiGatewayModelPricingCustomRequestConfig, + * AiGatewayModelPricingCatalogRequestConfig + * + * @return The actual instance (AiGatewayModelPricingCustomRequestConfig, + * AiGatewayModelPricingCatalogRequestConfig) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AiGatewayModelPricingCustomRequestConfig`. If the actual instance + * is not `AiGatewayModelPricingCustomRequestConfig`, the ClassCastException will be thrown. + * + * @return The actual instance of `AiGatewayModelPricingCustomRequestConfig` + * @throws ClassCastException if the instance is not `AiGatewayModelPricingCustomRequestConfig` + */ + public AiGatewayModelPricingCustomRequestConfig getAiGatewayModelPricingCustomRequestConfig() + throws ClassCastException { + return (AiGatewayModelPricingCustomRequestConfig) super.getActualInstance(); + } + + /** + * Get the actual instance of `AiGatewayModelPricingCatalogRequestConfig`. If the actual instance + * is not `AiGatewayModelPricingCatalogRequestConfig`, the ClassCastException will be thrown. + * + * @return The actual instance of `AiGatewayModelPricingCatalogRequestConfig` + * @throws ClassCastException if the instance is not `AiGatewayModelPricingCatalogRequestConfig` + */ + public AiGatewayModelPricingCatalogRequestConfig getAiGatewayModelPricingCatalogRequestConfig() + throws ClassCastException { + return (AiGatewayModelPricingCatalogRequestConfig) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestData.java new file mode 100644 index 00000000000..33ebe6cc58c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequestData.java @@ -0,0 +1,215 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for a model pricing request. */ +@JsonPropertyOrder({ + AiGatewayModelPricingRequestData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelPricingRequestData.JSON_PROPERTY_ID, + AiGatewayModelPricingRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelPricingRequestAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelPricingType type; + + public AiGatewayModelPricingRequestData() {} + + @JsonCreator + public AiGatewayModelPricingRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelPricingRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayModelPricingType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelPricingRequestData attributes( + AiGatewayModelPricingRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for a model pricing request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelPricingRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelPricingRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelPricingRequestData type(AiGatewayModelPricingType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model pricing resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingType getType() { + return type; + } + + public void setType(AiGatewayModelPricingType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelPricingRequestData + */ + @JsonAnySetter + public AiGatewayModelPricingRequestData 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 AiGatewayModelPricingRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingRequestData aiGatewayModelPricingRequestData = + (AiGatewayModelPricingRequestData) o; + return Objects.equals(this.attributes, aiGatewayModelPricingRequestData.attributes) + && Objects.equals(this.id, aiGatewayModelPricingRequestData.id) + && Objects.equals(this.type, aiGatewayModelPricingRequestData.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequiredRates.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequiredRates.java new file mode 100644 index 00000000000..9e02aca642b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingRequiredRates.java @@ -0,0 +1,194 @@ +/* + * 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.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.Objects; + +/** Complete set of rates required for custom pricing. */ +@JsonPropertyOrder({ + AiGatewayModelPricingRequiredRates.JSON_PROPERTY_CACHE_READ_COST_PER_MTOK, + AiGatewayModelPricingRequiredRates.JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK, + AiGatewayModelPricingRequiredRates.JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK, + AiGatewayModelPricingRequiredRates.JSON_PROPERTY_OUTPUT_COST_PER_MTOK +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingRequiredRates { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CACHE_READ_COST_PER_MTOK = "cache_read_cost_per_mtok"; + private Double cacheReadCostPerMtok; + + public static final String JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK = "cache_write_cost_per_mtok"; + private Double cacheWriteCostPerMtok; + + public static final String JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK = + "non_cached_input_cost_per_mtok"; + private Double nonCachedInputCostPerMtok; + + public static final String JSON_PROPERTY_OUTPUT_COST_PER_MTOK = "output_cost_per_mtok"; + private Double outputCostPerMtok; + + public AiGatewayModelPricingRequiredRates() {} + + @JsonCreator + public AiGatewayModelPricingRequiredRates( + @JsonProperty(required = true, value = JSON_PROPERTY_CACHE_READ_COST_PER_MTOK) + Double cacheReadCostPerMtok, + @JsonProperty(required = true, value = JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK) + Double cacheWriteCostPerMtok, + @JsonProperty(required = true, value = JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK) + Double nonCachedInputCostPerMtok, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT_COST_PER_MTOK) + Double outputCostPerMtok) { + this.cacheReadCostPerMtok = cacheReadCostPerMtok; + this.cacheWriteCostPerMtok = cacheWriteCostPerMtok; + this.nonCachedInputCostPerMtok = nonCachedInputCostPerMtok; + this.outputCostPerMtok = outputCostPerMtok; + } + + public AiGatewayModelPricingRequiredRates cacheReadCostPerMtok(Double cacheReadCostPerMtok) { + this.cacheReadCostPerMtok = cacheReadCostPerMtok; + return this; + } + + /** + * Cost per million tokens for cache reads. minimum: 0 + * + * @return cacheReadCostPerMtok + */ + @JsonProperty(JSON_PROPERTY_CACHE_READ_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getCacheReadCostPerMtok() { + return cacheReadCostPerMtok; + } + + public void setCacheReadCostPerMtok(Double cacheReadCostPerMtok) { + this.cacheReadCostPerMtok = cacheReadCostPerMtok; + } + + public AiGatewayModelPricingRequiredRates cacheWriteCostPerMtok(Double cacheWriteCostPerMtok) { + this.cacheWriteCostPerMtok = cacheWriteCostPerMtok; + return this; + } + + /** + * Cost per million tokens for cache writes. minimum: 0 + * + * @return cacheWriteCostPerMtok + */ + @JsonProperty(JSON_PROPERTY_CACHE_WRITE_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getCacheWriteCostPerMtok() { + return cacheWriteCostPerMtok; + } + + public void setCacheWriteCostPerMtok(Double cacheWriteCostPerMtok) { + this.cacheWriteCostPerMtok = cacheWriteCostPerMtok; + } + + public AiGatewayModelPricingRequiredRates nonCachedInputCostPerMtok( + Double nonCachedInputCostPerMtok) { + this.nonCachedInputCostPerMtok = nonCachedInputCostPerMtok; + return this; + } + + /** + * Cost per million tokens for non-cached input. minimum: 0 + * + * @return nonCachedInputCostPerMtok + */ + @JsonProperty(JSON_PROPERTY_NON_CACHED_INPUT_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getNonCachedInputCostPerMtok() { + return nonCachedInputCostPerMtok; + } + + public void setNonCachedInputCostPerMtok(Double nonCachedInputCostPerMtok) { + this.nonCachedInputCostPerMtok = nonCachedInputCostPerMtok; + } + + public AiGatewayModelPricingRequiredRates outputCostPerMtok(Double outputCostPerMtok) { + this.outputCostPerMtok = outputCostPerMtok; + return this; + } + + /** + * Cost per million tokens for output. minimum: 0 + * + * @return outputCostPerMtok + */ + @JsonProperty(JSON_PROPERTY_OUTPUT_COST_PER_MTOK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getOutputCostPerMtok() { + return outputCostPerMtok; + } + + public void setOutputCostPerMtok(Double outputCostPerMtok) { + this.outputCostPerMtok = outputCostPerMtok; + } + + /** Return true if this AiGatewayModelPricingRequiredRates object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingRequiredRates aiGatewayModelPricingRequiredRates = + (AiGatewayModelPricingRequiredRates) o; + return Objects.equals( + this.cacheReadCostPerMtok, aiGatewayModelPricingRequiredRates.cacheReadCostPerMtok) + && Objects.equals( + this.cacheWriteCostPerMtok, aiGatewayModelPricingRequiredRates.cacheWriteCostPerMtok) + && Objects.equals( + this.nonCachedInputCostPerMtok, + aiGatewayModelPricingRequiredRates.nonCachedInputCostPerMtok) + && Objects.equals( + this.outputCostPerMtok, aiGatewayModelPricingRequiredRates.outputCostPerMtok); + } + + @Override + public int hashCode() { + return Objects.hash( + cacheReadCostPerMtok, cacheWriteCostPerMtok, nonCachedInputCostPerMtok, outputCostPerMtok); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingRequiredRates {\n"); + sb.append(" cacheReadCostPerMtok: ") + .append(toIndentedString(cacheReadCostPerMtok)) + .append("\n"); + sb.append(" cacheWriteCostPerMtok: ") + .append(toIndentedString(cacheWriteCostPerMtok)) + .append("\n"); + sb.append(" nonCachedInputCostPerMtok: ") + .append(toIndentedString(nonCachedInputCostPerMtok)) + .append("\n"); + sb.append(" outputCostPerMtok: ").append(toIndentedString(outputCostPerMtok)).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/AiGatewayModelPricingResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponse.java new file mode 100644 index 00000000000..7b76c7b45f9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing model pricing information. */ +@JsonPropertyOrder({AiGatewayModelPricingResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelPricingResponseData data; + + public AiGatewayModelPricingResponse() {} + + @JsonCreator + public AiGatewayModelPricingResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayModelPricingResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelPricingResponse data(AiGatewayModelPricingResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for a model pricing response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingResponseData getData() { + return data; + } + + public void setData(AiGatewayModelPricingResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelPricingResponse + */ + @JsonAnySetter + public AiGatewayModelPricingResponse 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 AiGatewayModelPricingResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingResponse aiGatewayModelPricingResponse = (AiGatewayModelPricingResponse) o; + return Objects.equals(this.data, aiGatewayModelPricingResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponseData.java new file mode 100644 index 00000000000..3e962433ec1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingResponseData.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for a model pricing response. */ +@JsonPropertyOrder({ + AiGatewayModelPricingResponseData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelPricingResponseData.JSON_PROPERTY_ID, + AiGatewayModelPricingResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelPricingAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelPricingType type; + + public AiGatewayModelPricingResponseData() {} + + @JsonCreator + public AiGatewayModelPricingResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelPricingAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayModelPricingType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelPricingResponseData attributes(AiGatewayModelPricingAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a model pricing resource. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelPricingAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelPricingResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelPricingResponseData type(AiGatewayModelPricingType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model pricing resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingType getType() { + return type; + } + + public void setType(AiGatewayModelPricingType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelPricingResponseData + */ + @JsonAnySetter + public AiGatewayModelPricingResponseData 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 AiGatewayModelPricingResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingResponseData aiGatewayModelPricingResponseData = + (AiGatewayModelPricingResponseData) o; + return Objects.equals(this.attributes, aiGatewayModelPricingResponseData.attributes) + && Objects.equals(this.id, aiGatewayModelPricingResponseData.id) + && Objects.equals(this.type, aiGatewayModelPricingResponseData.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSource.java new file mode 100644 index 00000000000..fe074bc0e2c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSource.java @@ -0,0 +1,179 @@ +/* + * 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; + +/** Source information for a model's pricing. */ +@JsonPropertyOrder({ + AiGatewayModelPricingSource.JSON_PROPERTY_PROVIDER_ID, + AiGatewayModelPricingSource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelPricingSource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private String providerId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelPricingSourceType type; + + public AiGatewayModelPricingSource() {} + + @JsonCreator + public AiGatewayModelPricingSource( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelPricingSourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelPricingSource providerId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Pricing catalog provider identifier. + * + * @return providerId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public AiGatewayModelPricingSource type(AiGatewayModelPricingSourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Source type for the pricing configuration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelPricingSourceType getType() { + return type; + } + + public void setType(AiGatewayModelPricingSourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelPricingSource + */ + @JsonAnySetter + public AiGatewayModelPricingSource 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 AiGatewayModelPricingSource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelPricingSource aiGatewayModelPricingSource = (AiGatewayModelPricingSource) o; + return Objects.equals(this.providerId, aiGatewayModelPricingSource.providerId) + && Objects.equals(this.type, aiGatewayModelPricingSource.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelPricingSource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(providerId, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelPricingSource {\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).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/AiGatewayModelPricingSourceType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSourceType.java new file mode 100644 index 00000000000..65574a687a1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingSourceType.java @@ -0,0 +1,60 @@ +/* + * 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; + +/** Source type for the pricing configuration. */ +@JsonSerialize( + using = AiGatewayModelPricingSourceType.AiGatewayModelPricingSourceTypeSerializer.class) +public class AiGatewayModelPricingSourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("catalog", "custom")); + + public static final AiGatewayModelPricingSourceType CATALOG = + new AiGatewayModelPricingSourceType("catalog"); + public static final AiGatewayModelPricingSourceType CUSTOM = + new AiGatewayModelPricingSourceType("custom"); + + AiGatewayModelPricingSourceType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelPricingSourceTypeSerializer + extends StdSerializer { + public AiGatewayModelPricingSourceTypeSerializer(Class t) { + super(t); + } + + public AiGatewayModelPricingSourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelPricingSourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelPricingSourceType fromValue(String value) { + return new AiGatewayModelPricingSourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingType.java new file mode 100644 index 00000000000..4e8ff990590 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelPricingType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** Model pricing resource type. */ +@JsonSerialize(using = AiGatewayModelPricingType.AiGatewayModelPricingTypeSerializer.class) +public class AiGatewayModelPricingType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("model-pricing")); + + public static final AiGatewayModelPricingType MODEL_PRICING = + new AiGatewayModelPricingType("model-pricing"); + + AiGatewayModelPricingType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelPricingTypeSerializer + extends StdSerializer { + public AiGatewayModelPricingTypeSerializer(Class t) { + super(t); + } + + public AiGatewayModelPricingTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelPricingType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelPricingType fromValue(String value) { + return new AiGatewayModelPricingType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoning.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoning.java new file mode 100644 index 00000000000..f8b0fe3d810 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoning.java @@ -0,0 +1,163 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Supported reasoning controls. Absence means controls are unknown or unavailable. */ +@JsonPropertyOrder({AiGatewayModelReasoning.JSON_PROPERTY_CONTROLS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelReasoning { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONTROLS = "controls"; + private List controls = new ArrayList<>(); + + public AiGatewayModelReasoning() {} + + @JsonCreator + public AiGatewayModelReasoning( + @JsonProperty(required = true, value = JSON_PROPERTY_CONTROLS) + List controls) { + this.controls = controls; + for (AiGatewayModelReasoningControl item : controls) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayModelReasoning controls(List controls) { + this.controls = controls; + for (AiGatewayModelReasoningControl item : controls) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelReasoning addControlsItem(AiGatewayModelReasoningControl controlsItem) { + this.controls.add(controlsItem); + this.unparsed |= controlsItem.unparsed; + return this; + } + + /** + * Getcontrols + * + * @return controls + */ + @JsonProperty(JSON_PROPERTY_CONTROLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getControls() { + return controls; + } + + public void setControls(List controls) { + this.controls = controls; + if (controls != null) { + for (AiGatewayModelReasoningControl item : controls) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayModelReasoning + */ + @JsonAnySetter + public AiGatewayModelReasoning 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 AiGatewayModelReasoning object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelReasoning aiGatewayModelReasoning = (AiGatewayModelReasoning) o; + return Objects.equals(this.controls, aiGatewayModelReasoning.controls) + && Objects.equals(this.additionalProperties, aiGatewayModelReasoning.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(controls, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelReasoning {\n"); + sb.append(" controls: ").append(toIndentedString(controls)).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/AiGatewayModelReasoningControl.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoningControl.java new file mode 100644 index 00000000000..71370a9bd14 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoningControl.java @@ -0,0 +1,244 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** One supported mechanism for configuring model reasoning. */ +@JsonPropertyOrder({ + AiGatewayModelReasoningControl.JSON_PROPERTY_EFFORT_LEVELS, + AiGatewayModelReasoningControl.JSON_PROPERTY_MAX_BUDGET_TOKENS, + AiGatewayModelReasoningControl.JSON_PROPERTY_MIN_BUDGET_TOKENS, + AiGatewayModelReasoningControl.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelReasoningControl { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EFFORT_LEVELS = "effort_levels"; + private List effortLevels = null; + + public static final String JSON_PROPERTY_MAX_BUDGET_TOKENS = "max_budget_tokens"; + private Long maxBudgetTokens; + + public static final String JSON_PROPERTY_MIN_BUDGET_TOKENS = "min_budget_tokens"; + private Long minBudgetTokens; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelReasoningControlType type; + + public AiGatewayModelReasoningControl() {} + + @JsonCreator + public AiGatewayModelReasoningControl( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelReasoningControlType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelReasoningControl effortLevels(List effortLevels) { + this.effortLevels = effortLevels; + return this; + } + + public AiGatewayModelReasoningControl addEffortLevelsItem(String effortLevelsItem) { + if (this.effortLevels == null) { + this.effortLevels = new ArrayList<>(); + } + this.effortLevels.add(effortLevelsItem); + return this; + } + + /** + * Supported effort values in provider order for an effort control. + * + * @return effortLevels + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EFFORT_LEVELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEffortLevels() { + return effortLevels; + } + + public void setEffortLevels(List effortLevels) { + this.effortLevels = effortLevels; + } + + public AiGatewayModelReasoningControl maxBudgetTokens(Long maxBudgetTokens) { + this.maxBudgetTokens = maxBudgetTokens; + return this; + } + + /** + * Maximum reasoning-token budget. minimum: 0 + * + * @return maxBudgetTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_BUDGET_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxBudgetTokens() { + return maxBudgetTokens; + } + + public void setMaxBudgetTokens(Long maxBudgetTokens) { + this.maxBudgetTokens = maxBudgetTokens; + } + + public AiGatewayModelReasoningControl minBudgetTokens(Long minBudgetTokens) { + this.minBudgetTokens = minBudgetTokens; + return this; + } + + /** + * Minimum reasoning-token budget. minimum: -1 + * + * @return minBudgetTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN_BUDGET_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMinBudgetTokens() { + return minBudgetTokens; + } + + public void setMinBudgetTokens(Long minBudgetTokens) { + this.minBudgetTokens = minBudgetTokens; + } + + public AiGatewayModelReasoningControl type(AiGatewayModelReasoningControlType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Reasoning-control mechanism. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelReasoningControlType getType() { + return type; + } + + public void setType(AiGatewayModelReasoningControlType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelReasoningControl + */ + @JsonAnySetter + public AiGatewayModelReasoningControl 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 AiGatewayModelReasoningControl object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelReasoningControl aiGatewayModelReasoningControl = + (AiGatewayModelReasoningControl) o; + return Objects.equals(this.effortLevels, aiGatewayModelReasoningControl.effortLevels) + && Objects.equals(this.maxBudgetTokens, aiGatewayModelReasoningControl.maxBudgetTokens) + && Objects.equals(this.minBudgetTokens, aiGatewayModelReasoningControl.minBudgetTokens) + && Objects.equals(this.type, aiGatewayModelReasoningControl.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelReasoningControl.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(effortLevels, maxBudgetTokens, minBudgetTokens, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelReasoningControl {\n"); + sb.append(" effortLevels: ").append(toIndentedString(effortLevels)).append("\n"); + sb.append(" maxBudgetTokens: ").append(toIndentedString(maxBudgetTokens)).append("\n"); + sb.append(" minBudgetTokens: ").append(toIndentedString(minBudgetTokens)).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/AiGatewayModelReasoningControlType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoningControlType.java new file mode 100644 index 00000000000..c3fabefc855 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReasoningControlType.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; + +/** Reasoning-control mechanism. */ +@JsonSerialize( + using = AiGatewayModelReasoningControlType.AiGatewayModelReasoningControlTypeSerializer.class) +public class AiGatewayModelReasoningControlType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("toggle", "effort", "budget_tokens")); + + public static final AiGatewayModelReasoningControlType TOGGLE = + new AiGatewayModelReasoningControlType("toggle"); + public static final AiGatewayModelReasoningControlType EFFORT = + new AiGatewayModelReasoningControlType("effort"); + public static final AiGatewayModelReasoningControlType BUDGET_TOKENS = + new AiGatewayModelReasoningControlType("budget_tokens"); + + AiGatewayModelReasoningControlType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelReasoningControlTypeSerializer + extends StdSerializer { + public AiGatewayModelReasoningControlTypeSerializer( + Class t) { + super(t); + } + + public AiGatewayModelReasoningControlTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelReasoningControlType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelReasoningControlType fromValue(String value) { + return new AiGatewayModelReasoningControlType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReferencePrice.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReferencePrice.java new file mode 100644 index 00000000000..ac536d4ca06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelReferencePrice.java @@ -0,0 +1,354 @@ +/* + * 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; + +/** + * Informational source pricing, not gateway billing configuration. Prices can differ by provider, + * mode, and input length. + */ +@JsonPropertyOrder({ + AiGatewayModelReferencePrice.JSON_PROPERTY_AMOUNT, + AiGatewayModelReferencePrice.JSON_PROPERTY_COMPONENT, + AiGatewayModelReferencePrice.JSON_PROPERTY_CONTEXT_MAX_TOKENS, + AiGatewayModelReferencePrice.JSON_PROPERTY_CONTEXT_MIN_TOKENS, + AiGatewayModelReferencePrice.JSON_PROPERTY_CURRENCY, + AiGatewayModelReferencePrice.JSON_PROPERTY_MODE, + AiGatewayModelReferencePrice.JSON_PROPERTY_SERVICE_TIER, + AiGatewayModelReferencePrice.JSON_PROPERTY_UNIT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelReferencePrice { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_COMPONENT = "component"; + private String component; + + public static final String JSON_PROPERTY_CONTEXT_MAX_TOKENS = "context_max_tokens"; + private Long contextMaxTokens; + + public static final String JSON_PROPERTY_CONTEXT_MIN_TOKENS = "context_min_tokens"; + private Long contextMinTokens; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_MODE = "mode"; + private String mode; + + public static final String JSON_PROPERTY_SERVICE_TIER = "service_tier"; + private String serviceTier; + + public static final String JSON_PROPERTY_UNIT = "unit"; + private String unit; + + public AiGatewayModelReferencePrice() {} + + @JsonCreator + public AiGatewayModelReferencePrice( + @JsonProperty(required = true, value = JSON_PROPERTY_AMOUNT) String amount, + @JsonProperty(required = true, value = JSON_PROPERTY_COMPONENT) String component, + @JsonProperty(required = true, value = JSON_PROPERTY_CONTEXT_MIN_TOKENS) + Long contextMinTokens, + @JsonProperty(required = true, value = JSON_PROPERTY_CURRENCY) String currency, + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) String mode, + @JsonProperty(required = true, value = JSON_PROPERTY_UNIT) String unit) { + this.amount = amount; + this.component = component; + this.contextMinTokens = contextMinTokens; + this.currency = currency; + this.mode = mode; + this.unit = unit; + } + + public AiGatewayModelReferencePrice amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Exact decimal amount per unit, zero or greater, represented as a string to preserve precision. + * Supports fixed decimal and exponent notation. + * + * @return amount + */ + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public AiGatewayModelReferencePrice component(String component) { + this.component = component; + return this; + } + + /** + * Token category priced, such as input, output, cache_read, or cache_write. + * + * @return component + */ + @JsonProperty(JSON_PROPERTY_COMPONENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getComponent() { + return component; + } + + public void setComponent(String component) { + this.component = component; + } + + public AiGatewayModelReferencePrice contextMaxTokens(Long contextMaxTokens) { + this.contextMaxTokens = contextMaxTokens; + return this; + } + + /** + * Largest input length covered by this price. Omitted when there is no upper bound. minimum: 1 + * + * @return contextMaxTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTEXT_MAX_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getContextMaxTokens() { + return contextMaxTokens; + } + + public void setContextMaxTokens(Long contextMaxTokens) { + this.contextMaxTokens = contextMaxTokens; + } + + public AiGatewayModelReferencePrice contextMinTokens(Long contextMinTokens) { + this.contextMinTokens = contextMinTokens; + return this; + } + + /** + * Input length above which this price applies. Zero identifies the base tier. minimum: 0 + * + * @return contextMinTokens + */ + @JsonProperty(JSON_PROPERTY_CONTEXT_MIN_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getContextMinTokens() { + return contextMinTokens; + } + + public void setContextMinTokens(Long contextMinTokens) { + this.contextMinTokens = contextMinTokens; + } + + public AiGatewayModelReferencePrice currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Currency of the price. The only supported value is USD. + * + * @return currency + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public AiGatewayModelReferencePrice mode(String mode) { + this.mode = mode; + return this; + } + + /** + * Source mode name. Standard is the base mode; other values, such as fast, are source-defined. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public AiGatewayModelReferencePrice serviceTier(String serviceTier) { + this.serviceTier = serviceTier; + return this; + } + + /** + * Provider service tier explicitly associated with this mode by the source. Omitted when unknown. + * + * @return serviceTier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceTier() { + return serviceTier; + } + + public void setServiceTier(String serviceTier) { + this.serviceTier = serviceTier; + } + + public AiGatewayModelReferencePrice unit(String unit) { + this.unit = unit; + return this; + } + + /** + * Unit of the quoted amount. The only supported value is million_tokens. + * + * @return unit + */ + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + /** + * 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 AiGatewayModelReferencePrice + */ + @JsonAnySetter + public AiGatewayModelReferencePrice 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 AiGatewayModelReferencePrice object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelReferencePrice aiGatewayModelReferencePrice = (AiGatewayModelReferencePrice) o; + return Objects.equals(this.amount, aiGatewayModelReferencePrice.amount) + && Objects.equals(this.component, aiGatewayModelReferencePrice.component) + && Objects.equals(this.contextMaxTokens, aiGatewayModelReferencePrice.contextMaxTokens) + && Objects.equals(this.contextMinTokens, aiGatewayModelReferencePrice.contextMinTokens) + && Objects.equals(this.currency, aiGatewayModelReferencePrice.currency) + && Objects.equals(this.mode, aiGatewayModelReferencePrice.mode) + && Objects.equals(this.serviceTier, aiGatewayModelReferencePrice.serviceTier) + && Objects.equals(this.unit, aiGatewayModelReferencePrice.unit) + && Objects.equals( + this.additionalProperties, aiGatewayModelReferencePrice.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + amount, + component, + contextMaxTokens, + contextMinTokens, + currency, + mode, + serviceTier, + unit, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelReferencePrice {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" component: ").append(toIndentedString(component)).append("\n"); + sb.append(" contextMaxTokens: ").append(toIndentedString(contextMaxTokens)).append("\n"); + sb.append(" contextMinTokens: ").append(toIndentedString(contextMinTokens)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" serviceTier: ").append(toIndentedString(serviceTier)).append("\n"); + sb.append(" unit: ").append(toIndentedString(unit)).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/AiGatewayModelSource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelSource.java new file mode 100644 index 00000000000..1ae4079a0af --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelSource.java @@ -0,0 +1,56 @@ +/* + * 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; + +/** How a model catalog entry is managed. */ +@JsonSerialize(using = AiGatewayModelSource.AiGatewayModelSourceSerializer.class) +public class AiGatewayModelSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("discovered", "manual")); + + public static final AiGatewayModelSource DISCOVERED = new AiGatewayModelSource("discovered"); + public static final AiGatewayModelSource MANUAL = new AiGatewayModelSource("manual"); + + AiGatewayModelSource(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelSourceSerializer extends StdSerializer { + public AiGatewayModelSourceSerializer(Class t) { + super(t); + } + + public AiGatewayModelSourceSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelSource fromValue(String value) { + return new AiGatewayModelSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateAttributes.java new file mode 100644 index 00000000000..20e7c665b90 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateAttributes.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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to update a model catalog entry. */ +@JsonPropertyOrder({ + AiGatewayModelUpdateAttributes.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayModelUpdateAttributes.JSON_PROPERTY_SUPPORTED_OPERATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = null; + + public AiGatewayModelUpdateAttributes modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayModelUpdateAttributes supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayModelUpdateAttributes addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + if (this.supportedOperations == null) { + this.supportedOperations = new ArrayList<>(); + } + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + /** + * 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 AiGatewayModelUpdateAttributes + */ + @JsonAnySetter + public AiGatewayModelUpdateAttributes 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 AiGatewayModelUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelUpdateAttributes aiGatewayModelUpdateAttributes = + (AiGatewayModelUpdateAttributes) o; + return Objects.equals(this.modelIdWire, aiGatewayModelUpdateAttributes.modelIdWire) + && Objects.equals( + this.supportedOperations, aiGatewayModelUpdateAttributes.supportedOperations) + && Objects.equals( + this.additionalProperties, aiGatewayModelUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(modelIdWire, supportedOperations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelUpdateAttributes {\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .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/AiGatewayModelUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateData.java new file mode 100644 index 00000000000..38d71a75204 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to update a model catalog entry. */ +@JsonPropertyOrder({ + AiGatewayModelUpdateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelUpdateData.JSON_PROPERTY_ID, + AiGatewayModelUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelCatalogEntryType type; + + public AiGatewayModelUpdateData() {} + + @JsonCreator + public AiGatewayModelUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelCatalogEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelUpdateData attributes(AiGatewayModelUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to update a model catalog entry. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelUpdateData type(AiGatewayModelCatalogEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model catalog entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryType getType() { + return type; + } + + public void setType(AiGatewayModelCatalogEntryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelUpdateData + */ + @JsonAnySetter + public AiGatewayModelUpdateData 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 AiGatewayModelUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelUpdateData aiGatewayModelUpdateData = (AiGatewayModelUpdateData) o; + return Objects.equals(this.attributes, aiGatewayModelUpdateData.attributes) + && Objects.equals(this.id, aiGatewayModelUpdateData.id) + && Objects.equals(this.type, aiGatewayModelUpdateData.type) + && Objects.equals(this.additionalProperties, aiGatewayModelUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateRequest.java new file mode 100644 index 00000000000..f24de705108 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelUpdateRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update a model catalog entry. */ +@JsonPropertyOrder({AiGatewayModelUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelUpdateData data; + + public AiGatewayModelUpdateRequest() {} + + @JsonCreator + public AiGatewayModelUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayModelUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelUpdateRequest data(AiGatewayModelUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to update a model catalog entry. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelUpdateData getData() { + return data; + } + + public void setData(AiGatewayModelUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelUpdateRequest + */ + @JsonAnySetter + public AiGatewayModelUpdateRequest 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 AiGatewayModelUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelUpdateRequest aiGatewayModelUpdateRequest = (AiGatewayModelUpdateRequest) o; + return Objects.equals(this.data, aiGatewayModelUpdateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateAttributes.java new file mode 100644 index 00000000000..f65c0ae5f8b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateAttributes.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to create several model catalog entries. */ +@JsonPropertyOrder({AiGatewayModelsBulkCreateAttributes.JSON_PROPERTY_MODELS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelsBulkCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODELS = "models"; + private List models = new ArrayList<>(); + + public AiGatewayModelsBulkCreateAttributes() {} + + @JsonCreator + public AiGatewayModelsBulkCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODELS) + List models) { + this.models = models; + for (AiGatewayModelCreateAttributes item : models) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayModelsBulkCreateAttributes models(List models) { + this.models = models; + for (AiGatewayModelCreateAttributes item : models) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelsBulkCreateAttributes addModelsItem( + AiGatewayModelCreateAttributes modelsItem) { + this.models.add(modelsItem); + this.unparsed |= modelsItem.unparsed; + return this; + } + + /** + * Getmodels + * + * @return models + */ + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getModels() { + return models; + } + + public void setModels(List models) { + this.models = models; + if (models != null) { + for (AiGatewayModelCreateAttributes item : models) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayModelsBulkCreateAttributes + */ + @JsonAnySetter + public AiGatewayModelsBulkCreateAttributes 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 AiGatewayModelsBulkCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelsBulkCreateAttributes aiGatewayModelsBulkCreateAttributes = + (AiGatewayModelsBulkCreateAttributes) o; + return Objects.equals(this.models, aiGatewayModelsBulkCreateAttributes.models) + && Objects.equals( + this.additionalProperties, aiGatewayModelsBulkCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(models, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelsBulkCreateAttributes {\n"); + sb.append(" models: ").append(toIndentedString(models)).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/AiGatewayModelsBulkCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateData.java new file mode 100644 index 00000000000..da317a18400 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateData.java @@ -0,0 +1,186 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create several model catalog entries. */ +@JsonPropertyOrder({ + AiGatewayModelsBulkCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelsBulkCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelsBulkCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelsBulkCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelCatalogEntryType type; + + public AiGatewayModelsBulkCreateData() {} + + @JsonCreator + public AiGatewayModelsBulkCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelsBulkCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelCatalogEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelsBulkCreateData attributes(AiGatewayModelsBulkCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create several model catalog entries. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelsBulkCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelsBulkCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelsBulkCreateData type(AiGatewayModelCatalogEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Model catalog entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelCatalogEntryType getType() { + return type; + } + + public void setType(AiGatewayModelCatalogEntryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelsBulkCreateData + */ + @JsonAnySetter + public AiGatewayModelsBulkCreateData 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 AiGatewayModelsBulkCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelsBulkCreateData aiGatewayModelsBulkCreateData = (AiGatewayModelsBulkCreateData) o; + return Objects.equals(this.attributes, aiGatewayModelsBulkCreateData.attributes) + && Objects.equals(this.type, aiGatewayModelsBulkCreateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelsBulkCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelsBulkCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateRequest.java new file mode 100644 index 00000000000..1a21525c213 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsBulkCreateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create several model catalog entries. */ +@JsonPropertyOrder({AiGatewayModelsBulkCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelsBulkCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayModelsBulkCreateData data; + + public AiGatewayModelsBulkCreateRequest() {} + + @JsonCreator + public AiGatewayModelsBulkCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayModelsBulkCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayModelsBulkCreateRequest data(AiGatewayModelsBulkCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create several model catalog entries. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelsBulkCreateData getData() { + return data; + } + + public void setData(AiGatewayModelsBulkCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayModelsBulkCreateRequest + */ + @JsonAnySetter + public AiGatewayModelsBulkCreateRequest 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 AiGatewayModelsBulkCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelsBulkCreateRequest aiGatewayModelsBulkCreateRequest = + (AiGatewayModelsBulkCreateRequest) o; + return Objects.equals(this.data, aiGatewayModelsBulkCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelsBulkCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelsBulkCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalAttributes.java new file mode 100644 index 00000000000..6b1db6b12e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalAttributes.java @@ -0,0 +1,199 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Provider entries grouped under one canonical model ID. */ +@JsonPropertyOrder({ + AiGatewayModelsByCanonicalAttributes.JSON_PROPERTY_MODEL_ID_CANONICAL, + AiGatewayModelsByCanonicalAttributes.JSON_PROPERTY_PROVIDERS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelsByCanonicalAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODEL_ID_CANONICAL = "model_id_canonical"; + private String modelIdCanonical; + + public static final String JSON_PROPERTY_PROVIDERS = "providers"; + private List providers = new ArrayList<>(); + + public AiGatewayModelsByCanonicalAttributes() {} + + @JsonCreator + public AiGatewayModelsByCanonicalAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_CANONICAL) + String modelIdCanonical, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDERS) + List providers) { + this.modelIdCanonical = modelIdCanonical; + this.providers = providers; + for (AiGatewayProviderModelEntry item : providers) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayModelsByCanonicalAttributes modelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + return this; + } + + /** + * Provider-independent model identifier. + * + * @return modelIdCanonical + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_CANONICAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdCanonical() { + return modelIdCanonical; + } + + public void setModelIdCanonical(String modelIdCanonical) { + this.modelIdCanonical = modelIdCanonical; + } + + public AiGatewayModelsByCanonicalAttributes providers( + List providers) { + this.providers = providers; + for (AiGatewayProviderModelEntry item : providers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelsByCanonicalAttributes addProvidersItem( + AiGatewayProviderModelEntry providersItem) { + this.providers.add(providersItem); + this.unparsed |= providersItem.unparsed; + return this; + } + + /** + * Getproviders + * + * @return providers + */ + @JsonProperty(JSON_PROPERTY_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProviders() { + return providers; + } + + public void setProviders(List providers) { + this.providers = providers; + if (providers != null) { + for (AiGatewayProviderModelEntry item : providers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayModelsByCanonicalAttributes + */ + @JsonAnySetter + public AiGatewayModelsByCanonicalAttributes 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 AiGatewayModelsByCanonicalAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelsByCanonicalAttributes aiGatewayModelsByCanonicalAttributes = + (AiGatewayModelsByCanonicalAttributes) o; + return Objects.equals( + this.modelIdCanonical, aiGatewayModelsByCanonicalAttributes.modelIdCanonical) + && Objects.equals(this.providers, aiGatewayModelsByCanonicalAttributes.providers) + && Objects.equals( + this.additionalProperties, aiGatewayModelsByCanonicalAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(modelIdCanonical, providers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelsByCanonicalAttributes {\n"); + sb.append(" modelIdCanonical: ").append(toIndentedString(modelIdCanonical)).append("\n"); + sb.append(" providers: ").append(toIndentedString(providers)).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/AiGatewayModelsByCanonicalListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalListResponse.java new file mode 100644 index 00000000000..a887d9ad8a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalListResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing model catalog entries grouped by canonical ID. */ +@JsonPropertyOrder({AiGatewayModelsByCanonicalListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelsByCanonicalListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayModelsByCanonicalListResponse() {} + + @JsonCreator + public AiGatewayModelsByCanonicalListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayModelsByCanonicalResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayModelsByCanonicalListResponse data( + List data) { + this.data = data; + for (AiGatewayModelsByCanonicalResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayModelsByCanonicalListResponse addDataItem( + AiGatewayModelsByCanonicalResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayModelsByCanonicalResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayModelsByCanonicalListResponse + */ + @JsonAnySetter + public AiGatewayModelsByCanonicalListResponse 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 AiGatewayModelsByCanonicalListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelsByCanonicalListResponse aiGatewayModelsByCanonicalListResponse = + (AiGatewayModelsByCanonicalListResponse) o; + return Objects.equals(this.data, aiGatewayModelsByCanonicalListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayModelsByCanonicalListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelsByCanonicalListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalResource.java new file mode 100644 index 00000000000..7ef91a3f104 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalResource.java @@ -0,0 +1,216 @@ +/* + * 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; + +/** Canonical model grouping resource. */ +@JsonPropertyOrder({ + AiGatewayModelsByCanonicalResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayModelsByCanonicalResource.JSON_PROPERTY_ID, + AiGatewayModelsByCanonicalResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayModelsByCanonicalResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayModelsByCanonicalAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayModelsByCanonicalType type; + + public AiGatewayModelsByCanonicalResource() {} + + @JsonCreator + public AiGatewayModelsByCanonicalResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayModelsByCanonicalAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayModelsByCanonicalType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayModelsByCanonicalResource attributes( + AiGatewayModelsByCanonicalAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Provider entries grouped under one canonical model ID. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelsByCanonicalAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayModelsByCanonicalAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayModelsByCanonicalResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayModelsByCanonicalResource type(AiGatewayModelsByCanonicalType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Canonical model grouping resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelsByCanonicalType getType() { + return type; + } + + public void setType(AiGatewayModelsByCanonicalType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayModelsByCanonicalResource + */ + @JsonAnySetter + public AiGatewayModelsByCanonicalResource 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 AiGatewayModelsByCanonicalResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayModelsByCanonicalResource aiGatewayModelsByCanonicalResource = + (AiGatewayModelsByCanonicalResource) o; + return Objects.equals(this.attributes, aiGatewayModelsByCanonicalResource.attributes) + && Objects.equals(this.id, aiGatewayModelsByCanonicalResource.id) + && Objects.equals(this.type, aiGatewayModelsByCanonicalResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayModelsByCanonicalResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayModelsByCanonicalResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalType.java new file mode 100644 index 00000000000..f8c5b7f185e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayModelsByCanonicalType.java @@ -0,0 +1,58 @@ +/* + * 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; + +/** Canonical model grouping resource type. */ +@JsonSerialize( + using = AiGatewayModelsByCanonicalType.AiGatewayModelsByCanonicalTypeSerializer.class) +public class AiGatewayModelsByCanonicalType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("models-by-canonical")); + + public static final AiGatewayModelsByCanonicalType MODELS_BY_CANONICAL = + new AiGatewayModelsByCanonicalType("models-by-canonical"); + + AiGatewayModelsByCanonicalType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayModelsByCanonicalTypeSerializer + extends StdSerializer { + public AiGatewayModelsByCanonicalTypeSerializer(Class t) { + super(t); + } + + public AiGatewayModelsByCanonicalTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayModelsByCanonicalType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayModelsByCanonicalType fromValue(String value) { + return new AiGatewayModelsByCanonicalType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableMaxReasoningLevel.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableMaxReasoningLevel.java new file mode 100644 index 00000000000..19f78b70964 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableMaxReasoningLevel.java @@ -0,0 +1,72 @@ +/* + * 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; + +/** Maximum reasoning level permitted by a model group. */ +@JsonSerialize( + using = AiGatewayNullableMaxReasoningLevel.AiGatewayNullableMaxReasoningLevelSerializer.class) +public class AiGatewayNullableMaxReasoningLevel extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("none", "minimal", "low", "medium", "high", "xhigh", "max")); + + public static final AiGatewayNullableMaxReasoningLevel NONE = + new AiGatewayNullableMaxReasoningLevel("none"); + public static final AiGatewayNullableMaxReasoningLevel MINIMAL = + new AiGatewayNullableMaxReasoningLevel("minimal"); + public static final AiGatewayNullableMaxReasoningLevel LOW = + new AiGatewayNullableMaxReasoningLevel("low"); + public static final AiGatewayNullableMaxReasoningLevel MEDIUM = + new AiGatewayNullableMaxReasoningLevel("medium"); + public static final AiGatewayNullableMaxReasoningLevel HIGH = + new AiGatewayNullableMaxReasoningLevel("high"); + public static final AiGatewayNullableMaxReasoningLevel XHIGH = + new AiGatewayNullableMaxReasoningLevel("xhigh"); + public static final AiGatewayNullableMaxReasoningLevel MAX = + new AiGatewayNullableMaxReasoningLevel("max"); + + AiGatewayNullableMaxReasoningLevel(String value) { + super(value, allowedValues); + } + + public static class AiGatewayNullableMaxReasoningLevelSerializer + extends StdSerializer { + public AiGatewayNullableMaxReasoningLevelSerializer( + Class t) { + super(t); + } + + public AiGatewayNullableMaxReasoningLevelSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayNullableMaxReasoningLevel value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayNullableMaxReasoningLevel fromValue(String value) { + return new AiGatewayNullableMaxReasoningLevel(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableRoutingRuleTierOrdering.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableRoutingRuleTierOrdering.java new file mode 100644 index 00000000000..48d56e68e5e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayNullableRoutingRuleTierOrdering.java @@ -0,0 +1,70 @@ +/* + * 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; + +/** + * How a tier orders its targets. Omitted or null defaults to configured, which preserves target + * order. The weighted_affinity ordering distributes first-choice assignments by relative target + * weights and accepts only model targets with an explicit provider, without repeated provider and + * model pairs in the same tier. + */ +@JsonSerialize( + using = + AiGatewayNullableRoutingRuleTierOrdering.AiGatewayNullableRoutingRuleTierOrderingSerializer + .class) +public class AiGatewayNullableRoutingRuleTierOrdering extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("configured", "weighted_affinity")); + + public static final AiGatewayNullableRoutingRuleTierOrdering CONFIGURED = + new AiGatewayNullableRoutingRuleTierOrdering("configured"); + public static final AiGatewayNullableRoutingRuleTierOrdering WEIGHTED_AFFINITY = + new AiGatewayNullableRoutingRuleTierOrdering("weighted_affinity"); + + AiGatewayNullableRoutingRuleTierOrdering(String value) { + super(value, allowedValues); + } + + public static class AiGatewayNullableRoutingRuleTierOrderingSerializer + extends StdSerializer { + public AiGatewayNullableRoutingRuleTierOrderingSerializer( + Class t) { + super(t); + } + + public AiGatewayNullableRoutingRuleTierOrderingSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayNullableRoutingRuleTierOrdering value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayNullableRoutingRuleTierOrdering fromValue(String value) { + return new AiGatewayNullableRoutingRuleTierOrdering(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyAttributes.java new file mode 100644 index 00000000000..6f10acb4293 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyAttributes.java @@ -0,0 +1,193 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Routing policy configuration. */ +@JsonPropertyOrder({ + AiGatewayPolicyAttributes.JSON_PROPERTY_PRIORITY, + AiGatewayPolicyAttributes.JSON_PROPERTY_TIERS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private Long priority; + + public static final String JSON_PROPERTY_TIERS = "tiers"; + private List tiers = new ArrayList<>(); + + public AiGatewayPolicyAttributes() {} + + @JsonCreator + public AiGatewayPolicyAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PRIORITY) Long priority, + @JsonProperty(required = true, value = JSON_PROPERTY_TIERS) List tiers) { + this.priority = priority; + this.tiers = tiers; + for (AiGatewayPolicyTier item : tiers) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayPolicyAttributes priority(Long priority) { + this.priority = priority; + return this; + } + + /** + * Routing priority. + * + * @return priority + */ + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPriority() { + return priority; + } + + public void setPriority(Long priority) { + this.priority = priority; + } + + public AiGatewayPolicyAttributes tiers(List tiers) { + this.tiers = tiers; + for (AiGatewayPolicyTier item : tiers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayPolicyAttributes addTiersItem(AiGatewayPolicyTier tiersItem) { + this.tiers.add(tiersItem); + this.unparsed |= tiersItem.unparsed; + return this; + } + + /** + * Gettiers + * + * @return tiers + */ + @JsonProperty(JSON_PROPERTY_TIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTiers() { + return tiers; + } + + public void setTiers(List tiers) { + this.tiers = tiers; + if (tiers != null) { + for (AiGatewayPolicyTier item : tiers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayPolicyAttributes + */ + @JsonAnySetter + public AiGatewayPolicyAttributes 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 AiGatewayPolicyAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyAttributes aiGatewayPolicyAttributes = (AiGatewayPolicyAttributes) o; + return Objects.equals(this.priority, aiGatewayPolicyAttributes.priority) + && Objects.equals(this.tiers, aiGatewayPolicyAttributes.tiers) + && Objects.equals( + this.additionalProperties, aiGatewayPolicyAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(priority, tiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyAttributes {\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" tiers: ").append(toIndentedString(tiers)).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/AiGatewayPolicyListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyListResponse.java new file mode 100644 index 00000000000..dc706fc127e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyListResponse.java @@ -0,0 +1,164 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing routing policy documents. */ +@JsonPropertyOrder({AiGatewayPolicyListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayPolicyListResponse() {} + + @JsonCreator + public AiGatewayPolicyListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayPolicyResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayPolicyListResponse data(List data) { + this.data = data; + for (AiGatewayPolicyResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayPolicyListResponse addDataItem(AiGatewayPolicyResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayPolicyResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayPolicyListResponse + */ + @JsonAnySetter + public AiGatewayPolicyListResponse 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 AiGatewayPolicyListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyListResponse aiGatewayPolicyListResponse = (AiGatewayPolicyListResponse) o; + return Objects.equals(this.data, aiGatewayPolicyListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayPolicyListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequest.java new file mode 100644 index 00000000000..00fc0256e71 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create or replace a routing policy document. */ +@JsonPropertyOrder({AiGatewayPolicyRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayPolicyRequestData data; + + public AiGatewayPolicyRequest() {} + + @JsonCreator + public AiGatewayPolicyRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayPolicyRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayPolicyRequest data(AiGatewayPolicyRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create or replace a routing policy document. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayPolicyRequestData getData() { + return data; + } + + public void setData(AiGatewayPolicyRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayPolicyRequest + */ + @JsonAnySetter + public AiGatewayPolicyRequest 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 AiGatewayPolicyRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyRequest aiGatewayPolicyRequest = (AiGatewayPolicyRequest) o; + return Objects.equals(this.data, aiGatewayPolicyRequest.data) + && Objects.equals(this.additionalProperties, aiGatewayPolicyRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestAttributes.java new file mode 100644 index 00000000000..71008fe02cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestAttributes.java @@ -0,0 +1,222 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to create or replace a routing policy document. */ +@JsonPropertyOrder({ + AiGatewayPolicyRequestAttributes.JSON_PROPERTY_INBOUND, + AiGatewayPolicyRequestAttributes.JSON_PROPERTY_PRIORITY, + AiGatewayPolicyRequestAttributes.JSON_PROPERTY_TIERS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private String inbound; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private Long priority; + + public static final String JSON_PROPERTY_TIERS = "tiers"; + private List tiers = new ArrayList<>(); + + public AiGatewayPolicyRequestAttributes() {} + + @JsonCreator + public AiGatewayPolicyRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INBOUND) String inbound, + @JsonProperty(required = true, value = JSON_PROPERTY_TIERS) + List tiers) { + this.inbound = inbound; + this.tiers = tiers; + for (AiGatewayPolicyTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayPolicyRequestAttributes inbound(String inbound) { + this.inbound = inbound; + return this; + } + + /** + * Inbound request pattern. + * + * @return inbound + */ + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInbound() { + return inbound; + } + + public void setInbound(String inbound) { + this.inbound = inbound; + } + + public AiGatewayPolicyRequestAttributes priority(Long priority) { + this.priority = priority; + return this; + } + + /** + * Routing priority. + * + * @return priority + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPriority() { + return priority; + } + + public void setPriority(Long priority) { + this.priority = priority; + } + + public AiGatewayPolicyRequestAttributes tiers(List tiers) { + this.tiers = tiers; + for (AiGatewayPolicyTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayPolicyRequestAttributes addTiersItem(AiGatewayPolicyTierRequest tiersItem) { + this.tiers.add(tiersItem); + this.unparsed |= tiersItem.unparsed; + return this; + } + + /** + * Gettiers + * + * @return tiers + */ + @JsonProperty(JSON_PROPERTY_TIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTiers() { + return tiers; + } + + public void setTiers(List tiers) { + this.tiers = tiers; + if (tiers != null) { + for (AiGatewayPolicyTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayPolicyRequestAttributes + */ + @JsonAnySetter + public AiGatewayPolicyRequestAttributes 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 AiGatewayPolicyRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyRequestAttributes aiGatewayPolicyRequestAttributes = + (AiGatewayPolicyRequestAttributes) o; + return Objects.equals(this.inbound, aiGatewayPolicyRequestAttributes.inbound) + && Objects.equals(this.priority, aiGatewayPolicyRequestAttributes.priority) + && Objects.equals(this.tiers, aiGatewayPolicyRequestAttributes.tiers) + && Objects.equals( + this.additionalProperties, aiGatewayPolicyRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(inbound, priority, tiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyRequestAttributes {\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" tiers: ").append(toIndentedString(tiers)).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/AiGatewayPolicyRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestData.java new file mode 100644 index 00000000000..7e724ca5287 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyRequestData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create or replace a routing policy document. */ +@JsonPropertyOrder({ + AiGatewayPolicyRequestData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayPolicyRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayPolicyRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayPolicyType type; + + public AiGatewayPolicyRequestData() {} + + @JsonCreator + public AiGatewayPolicyRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayPolicyRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayPolicyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayPolicyRequestData attributes(AiGatewayPolicyRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create or replace a routing policy document. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayPolicyRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayPolicyRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayPolicyRequestData type(AiGatewayPolicyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway routing policy resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayPolicyType getType() { + return type; + } + + public void setType(AiGatewayPolicyType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayPolicyRequestData + */ + @JsonAnySetter + public AiGatewayPolicyRequestData 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 AiGatewayPolicyRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyRequestData aiGatewayPolicyRequestData = (AiGatewayPolicyRequestData) o; + return Objects.equals(this.attributes, aiGatewayPolicyRequestData.attributes) + && Objects.equals(this.type, aiGatewayPolicyRequestData.type) + && Objects.equals( + this.additionalProperties, aiGatewayPolicyRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResource.java new file mode 100644 index 00000000000..28359d82a45 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResource.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** AI Gateway routing policy resource. */ +@JsonPropertyOrder({ + AiGatewayPolicyResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayPolicyResource.JSON_PROPERTY_ID, + AiGatewayPolicyResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayPolicyAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayPolicyType type; + + public AiGatewayPolicyResource() {} + + @JsonCreator + public AiGatewayPolicyResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayPolicyAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayPolicyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayPolicyResource attributes(AiGatewayPolicyAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Routing policy configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayPolicyAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayPolicyAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayPolicyResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayPolicyResource type(AiGatewayPolicyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway routing policy resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayPolicyType getType() { + return type; + } + + public void setType(AiGatewayPolicyType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayPolicyResource + */ + @JsonAnySetter + public AiGatewayPolicyResource 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 AiGatewayPolicyResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyResource aiGatewayPolicyResource = (AiGatewayPolicyResource) o; + return Objects.equals(this.attributes, aiGatewayPolicyResource.attributes) + && Objects.equals(this.id, aiGatewayPolicyResource.id) + && Objects.equals(this.type, aiGatewayPolicyResource.type) + && Objects.equals(this.additionalProperties, aiGatewayPolicyResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResponse.java new file mode 100644 index 00000000000..8ebcd2ebfec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one routing policy document. */ +@JsonPropertyOrder({AiGatewayPolicyResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayPolicyResource data; + + public AiGatewayPolicyResponse() {} + + @JsonCreator + public AiGatewayPolicyResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayPolicyResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayPolicyResponse data(AiGatewayPolicyResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway routing policy resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayPolicyResource getData() { + return data; + } + + public void setData(AiGatewayPolicyResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayPolicyResponse + */ + @JsonAnySetter + public AiGatewayPolicyResponse 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 AiGatewayPolicyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyResponse aiGatewayPolicyResponse = (AiGatewayPolicyResponse) o; + return Objects.equals(this.data, aiGatewayPolicyResponse.data) + && Objects.equals(this.additionalProperties, aiGatewayPolicyResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTarget.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTarget.java new file mode 100644 index 00000000000..d591e1cfdd8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTarget.java @@ -0,0 +1,240 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Resolved routing target in a policy response. */ +@JsonPropertyOrder({ + AiGatewayPolicyTarget.JSON_PROPERTY_ID, + AiGatewayPolicyTarget.JSON_PROPERTY_MODEL, + AiGatewayPolicyTarget.JSON_PROPERTY_PRIORITY, + AiGatewayPolicyTarget.JSON_PROPERTY_PROVIDER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyTarget { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_MODEL = "model"; + private String model; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private Long priority; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private JsonNullable provider = JsonNullable.undefined(); + + public AiGatewayPolicyTarget() {} + + @JsonCreator + public AiGatewayPolicyTarget( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) Long id, + @JsonProperty(required = true, value = JSON_PROPERTY_PRIORITY) Long priority) { + this.id = id; + this.priority = priority; + } + + public AiGatewayPolicyTarget id(Long id) { + this.id = id; + return this; + } + + /** + * Saved target row ID. On replacement, retain this ID only within its original route and at most + * once. A stale or foreign ID is rejected. minimum: 1 + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public AiGatewayPolicyTarget model(String model) { + this.model = model; + return this; + } + + /** + * Model name or pattern. Omitted when retaining a saved target by ID or when its provider is + * hidden. + * + * @return model + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public AiGatewayPolicyTarget priority(Long priority) { + this.priority = priority; + return this; + } + + /** + * Routing priority. + * + * @return priority + */ + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPriority() { + return priority; + } + + public void setPriority(Long priority) { + this.priority = priority; + } + + public AiGatewayPolicyTarget provider(String provider) { + this.provider = JsonNullable.of(provider); + return this; + } + + /** + * Provider slug. Omitted for dynamic resolution or when its provider is hidden. + * + * @return provider + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getProvider() { + return provider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getProvider_JsonNullable() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + public void setProvider_JsonNullable(JsonNullable provider) { + this.provider = provider; + } + + public void setProvider(String provider) { + this.provider = JsonNullable.of(provider); + } + + /** + * 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 AiGatewayPolicyTarget + */ + @JsonAnySetter + public AiGatewayPolicyTarget 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 AiGatewayPolicyTarget object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyTarget aiGatewayPolicyTarget = (AiGatewayPolicyTarget) o; + return Objects.equals(this.id, aiGatewayPolicyTarget.id) + && Objects.equals(this.model, aiGatewayPolicyTarget.model) + && Objects.equals(this.priority, aiGatewayPolicyTarget.priority) + && Objects.equals(this.provider, aiGatewayPolicyTarget.provider) + && Objects.equals(this.additionalProperties, aiGatewayPolicyTarget.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, model, priority, provider, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyTarget {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).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/AiGatewayPolicyTargetRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTargetRequest.java new file mode 100644 index 00000000000..99d83f70663 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTargetRequest.java @@ -0,0 +1,194 @@ +/* + * 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.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; + +/** Provider and model target in a routing policy request. */ +@JsonPropertyOrder({ + AiGatewayPolicyTargetRequest.JSON_PROPERTY_ID, + AiGatewayPolicyTargetRequest.JSON_PROPERTY_MODEL, + AiGatewayPolicyTargetRequest.JSON_PROPERTY_PROVIDER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyTargetRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_MODEL = "model"; + private String model; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private String provider; + + public AiGatewayPolicyTargetRequest id(Long id) { + this.id = id; + return this; + } + + /** + * Saved target row ID. On replacement, retain this ID only within its original route and at most + * once. A stale or foreign ID is rejected. minimum: 1 + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public AiGatewayPolicyTargetRequest model(String model) { + this.model = model; + return this; + } + + /** + * Model name or pattern. Omitted when retaining a saved target by ID or when its provider is + * hidden. + * + * @return model + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public AiGatewayPolicyTargetRequest provider(String provider) { + this.provider = provider; + return this; + } + + /** + * Provider slug. Omitted for dynamic resolution or when its provider is hidden. + * + * @return provider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } + + public void setProvider(String provider) { + this.provider = provider; + } + + /** + * 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 AiGatewayPolicyTargetRequest + */ + @JsonAnySetter + public AiGatewayPolicyTargetRequest 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 AiGatewayPolicyTargetRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyTargetRequest aiGatewayPolicyTargetRequest = (AiGatewayPolicyTargetRequest) o; + return Objects.equals(this.id, aiGatewayPolicyTargetRequest.id) + && Objects.equals(this.model, aiGatewayPolicyTargetRequest.model) + && Objects.equals(this.provider, aiGatewayPolicyTargetRequest.provider) + && Objects.equals( + this.additionalProperties, aiGatewayPolicyTargetRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, model, provider, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyTargetRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).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/AiGatewayPolicyTier.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTier.java new file mode 100644 index 00000000000..b3c6512d604 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTier.java @@ -0,0 +1,163 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Resolved routing policy tier. */ +@JsonPropertyOrder({AiGatewayPolicyTier.JSON_PROPERTY_TARGETS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyTier { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TARGETS = "targets"; + private List targets = new ArrayList<>(); + + public AiGatewayPolicyTier() {} + + @JsonCreator + public AiGatewayPolicyTier( + @JsonProperty(required = true, value = JSON_PROPERTY_TARGETS) + List targets) { + this.targets = targets; + for (AiGatewayPolicyTarget item : targets) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayPolicyTier targets(List targets) { + this.targets = targets; + for (AiGatewayPolicyTarget item : targets) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayPolicyTier addTargetsItem(AiGatewayPolicyTarget targetsItem) { + this.targets.add(targetsItem); + this.unparsed |= targetsItem.unparsed; + return this; + } + + /** + * Gettargets + * + * @return targets + */ + @JsonProperty(JSON_PROPERTY_TARGETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + if (targets != null) { + for (AiGatewayPolicyTarget item : targets) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayPolicyTier + */ + @JsonAnySetter + public AiGatewayPolicyTier 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 AiGatewayPolicyTier object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyTier aiGatewayPolicyTier = (AiGatewayPolicyTier) o; + return Objects.equals(this.targets, aiGatewayPolicyTier.targets) + && Objects.equals(this.additionalProperties, aiGatewayPolicyTier.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(targets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyTier {\n"); + sb.append(" targets: ").append(toIndentedString(targets)).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/AiGatewayPolicyTierRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTierRequest.java new file mode 100644 index 00000000000..c8c79fd3287 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyTierRequest.java @@ -0,0 +1,193 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Routing policy tier supplied in a request. */ +@JsonPropertyOrder({ + AiGatewayPolicyTierRequest.JSON_PROPERTY_PRIORITY, + AiGatewayPolicyTierRequest.JSON_PROPERTY_TARGETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayPolicyTierRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private Long priority; + + public static final String JSON_PROPERTY_TARGETS = "targets"; + private List targets = new ArrayList<>(); + + public AiGatewayPolicyTierRequest() {} + + @JsonCreator + public AiGatewayPolicyTierRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TARGETS) + List targets) { + this.targets = targets; + for (AiGatewayPolicyTargetRequest item : targets) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayPolicyTierRequest priority(Long priority) { + this.priority = priority; + return this; + } + + /** + * Routing priority. + * + * @return priority + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPriority() { + return priority; + } + + public void setPriority(Long priority) { + this.priority = priority; + } + + public AiGatewayPolicyTierRequest targets(List targets) { + this.targets = targets; + for (AiGatewayPolicyTargetRequest item : targets) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayPolicyTierRequest addTargetsItem(AiGatewayPolicyTargetRequest targetsItem) { + this.targets.add(targetsItem); + this.unparsed |= targetsItem.unparsed; + return this; + } + + /** + * Gettargets + * + * @return targets + */ + @JsonProperty(JSON_PROPERTY_TARGETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + if (targets != null) { + for (AiGatewayPolicyTargetRequest item : targets) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayPolicyTierRequest + */ + @JsonAnySetter + public AiGatewayPolicyTierRequest 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 AiGatewayPolicyTierRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayPolicyTierRequest aiGatewayPolicyTierRequest = (AiGatewayPolicyTierRequest) o; + return Objects.equals(this.priority, aiGatewayPolicyTierRequest.priority) + && Objects.equals(this.targets, aiGatewayPolicyTierRequest.targets) + && Objects.equals( + this.additionalProperties, aiGatewayPolicyTierRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(priority, targets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayPolicyTierRequest {\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).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/AiGatewayPolicyType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyType.java new file mode 100644 index 00000000000..e4094ea55ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayPolicyType.java @@ -0,0 +1,56 @@ +/* + * 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; + +/** AI Gateway routing policy resource type. */ +@JsonSerialize(using = AiGatewayPolicyType.AiGatewayPolicyTypeSerializer.class) +public class AiGatewayPolicyType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("routing-documents")); + + public static final AiGatewayPolicyType ROUTING_DOCUMENTS = + new AiGatewayPolicyType("routing-documents"); + + AiGatewayPolicyType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayPolicyTypeSerializer extends StdSerializer { + public AiGatewayPolicyTypeSerializer(Class t) { + super(t); + } + + public AiGatewayPolicyTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayPolicyType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayPolicyType fromValue(String value) { + return new AiGatewayPolicyType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderAttributes.java new file mode 100644 index 00000000000..4ca2d56b14a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderAttributes.java @@ -0,0 +1,366 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** AI Gateway provider configuration and metadata. */ +@JsonPropertyOrder({ + AiGatewayProviderAttributes.JSON_PROPERTY_COST_MULTIPLIER, + AiGatewayProviderAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayProviderAttributes.JSON_PROPERTY_INTEGRATION_ACCOUNT_ID, + AiGatewayProviderAttributes.JSON_PROPERTY_INTEGRATION_CONFIG, + AiGatewayProviderAttributes.JSON_PROPERTY_KNOWN_PROVIDER, + AiGatewayProviderAttributes.JSON_PROPERTY_NAME, + AiGatewayProviderAttributes.JSON_PROPERTY_SLUG, + AiGatewayProviderAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COST_MULTIPLIER = "cost_multiplier"; + private Double costMultiplier; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_INTEGRATION_ACCOUNT_ID = "integration_account_id"; + private String integrationAccountId; + + public static final String JSON_PROPERTY_INTEGRATION_CONFIG = "integration_config"; + private AiGatewayProviderIntegrationConfig integrationConfig; + + public static final String JSON_PROPERTY_KNOWN_PROVIDER = "known_provider"; + private AiGatewayKnownProvider knownProvider; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayProviderAttributes() {} + + @JsonCreator + public AiGatewayProviderAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_COST_MULTIPLIER) Double costMultiplier, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_ACCOUNT_ID) + String integrationAccountId, + @JsonProperty(required = true, value = JSON_PROPERTY_KNOWN_PROVIDER) + AiGatewayKnownProvider knownProvider, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SLUG) String slug, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.costMultiplier = costMultiplier; + this.createdAt = createdAt; + this.integrationAccountId = integrationAccountId; + this.knownProvider = knownProvider; + this.unparsed |= !knownProvider.isValid(); + this.name = name; + this.slug = slug; + this.updatedAt = updatedAt; + } + + public AiGatewayProviderAttributes costMultiplier(Double costMultiplier) { + this.costMultiplier = costMultiplier; + return this; + } + + /** + * Multiplier applied to provider costs. + * + * @return costMultiplier + */ + @JsonProperty(JSON_PROPERTY_COST_MULTIPLIER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getCostMultiplier() { + return costMultiplier; + } + + public void setCostMultiplier(Double costMultiplier) { + this.costMultiplier = costMultiplier; + } + + public AiGatewayProviderAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayProviderAttributes integrationAccountId(String integrationAccountId) { + this.integrationAccountId = integrationAccountId; + return this; + } + + /** + * Provider integration account identifier. + * + * @return integrationAccountId + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationAccountId() { + return integrationAccountId; + } + + public void setIntegrationAccountId(String integrationAccountId) { + this.integrationAccountId = integrationAccountId; + } + + public AiGatewayProviderAttributes integrationConfig( + AiGatewayProviderIntegrationConfig integrationConfig) { + this.integrationConfig = integrationConfig; + this.unparsed |= integrationConfig.unparsed; + return this; + } + + /** + * Provider-specific integration configuration. + * + * @return integrationConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayProviderIntegrationConfig getIntegrationConfig() { + return integrationConfig; + } + + public void setIntegrationConfig(AiGatewayProviderIntegrationConfig integrationConfig) { + this.integrationConfig = integrationConfig; + if (integrationConfig != null) { + this.unparsed |= integrationConfig.unparsed; + } + } + + public AiGatewayProviderAttributes knownProvider(AiGatewayKnownProvider knownProvider) { + this.knownProvider = knownProvider; + this.unparsed |= !knownProvider.isValid(); + return this; + } + + /** + * Known provider implementation. + * + * @return knownProvider + */ + @JsonProperty(JSON_PROPERTY_KNOWN_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayKnownProvider getKnownProvider() { + return knownProvider; + } + + public void setKnownProvider(AiGatewayKnownProvider knownProvider) { + if (!knownProvider.isValid()) { + this.unparsed = true; + } + this.knownProvider = knownProvider; + } + + public AiGatewayProviderAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayProviderAttributes slug(String slug) { + this.slug = slug; + return this; + } + + /** + * Immutable routing identifier. + * + * @return slug + */ + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + public AiGatewayProviderAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayProviderAttributes + */ + @JsonAnySetter + public AiGatewayProviderAttributes 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 AiGatewayProviderAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderAttributes aiGatewayProviderAttributes = (AiGatewayProviderAttributes) o; + return Objects.equals(this.costMultiplier, aiGatewayProviderAttributes.costMultiplier) + && Objects.equals(this.createdAt, aiGatewayProviderAttributes.createdAt) + && Objects.equals( + this.integrationAccountId, aiGatewayProviderAttributes.integrationAccountId) + && Objects.equals(this.integrationConfig, aiGatewayProviderAttributes.integrationConfig) + && Objects.equals(this.knownProvider, aiGatewayProviderAttributes.knownProvider) + && Objects.equals(this.name, aiGatewayProviderAttributes.name) + && Objects.equals(this.slug, aiGatewayProviderAttributes.slug) + && Objects.equals(this.updatedAt, aiGatewayProviderAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, aiGatewayProviderAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + costMultiplier, + createdAt, + integrationAccountId, + integrationConfig, + knownProvider, + name, + slug, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderAttributes {\n"); + sb.append(" costMultiplier: ").append(toIndentedString(costMultiplier)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" integrationAccountId: ") + .append(toIndentedString(integrationAccountId)) + .append("\n"); + sb.append(" integrationConfig: ").append(toIndentedString(integrationConfig)).append("\n"); + sb.append(" knownProvider: ").append(toIndentedString(knownProvider)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayProviderCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateAttributes.java new file mode 100644 index 00000000000..71a9a569e63 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateAttributes.java @@ -0,0 +1,403 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to create an AI Gateway provider. */ +@JsonPropertyOrder({ + AiGatewayProviderCreateAttributes.JSON_PROPERTY_COST_MULTIPLIER, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_INITIAL_BINDINGS, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_INTEGRATION_ACCOUNT_ID, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_INTEGRATION_CONFIG, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_KNOWN_PROVIDER, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_MODELS, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_NAME, + AiGatewayProviderCreateAttributes.JSON_PROPERTY_SLUG +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COST_MULTIPLIER = "cost_multiplier"; + private Double costMultiplier = 1.0; + + public static final String JSON_PROPERTY_INITIAL_BINDINGS = "initial_bindings"; + private List initialBindings = null; + + public static final String JSON_PROPERTY_INTEGRATION_ACCOUNT_ID = "integration_account_id"; + private String integrationAccountId; + + public static final String JSON_PROPERTY_INTEGRATION_CONFIG = "integration_config"; + private AiGatewayProviderIntegrationConfig integrationConfig; + + public static final String JSON_PROPERTY_KNOWN_PROVIDER = "known_provider"; + private AiGatewayKnownProvider knownProvider; + + public static final String JSON_PROPERTY_MODELS = "models"; + private List models = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public AiGatewayProviderCreateAttributes() {} + + @JsonCreator + public AiGatewayProviderCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SLUG) String slug) { + this.name = name; + this.slug = slug; + } + + public AiGatewayProviderCreateAttributes costMultiplier(Double costMultiplier) { + this.costMultiplier = costMultiplier; + return this; + } + + /** + * Multiplier applied to provider costs. Must be greater than 0 and at most 1000000. minimum: 0 + * maximum: 1000000 + * + * @return costMultiplier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST_MULTIPLIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getCostMultiplier() { + return costMultiplier; + } + + public void setCostMultiplier(Double costMultiplier) { + this.costMultiplier = costMultiplier; + } + + public AiGatewayProviderCreateAttributes initialBindings( + List initialBindings) { + this.initialBindings = initialBindings; + if (initialBindings != null) { + for (AiGatewayProviderInitialBinding item : initialBindings) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public AiGatewayProviderCreateAttributes addInitialBindingsItem( + AiGatewayProviderInitialBinding initialBindingsItem) { + if (this.initialBindings == null) { + this.initialBindings = new ArrayList<>(); + } + this.initialBindings.add(initialBindingsItem); + this.unparsed |= initialBindingsItem.unparsed; + return this; + } + + /** + * Reserved for initial View/Edit permissions. Supplying this attribute, including an empty array + * or null, returns HTTP 503 before discovery or persistence. Omit it for normal creation. + * + * @return initialBindings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_BINDINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getInitialBindings() { + return initialBindings; + } + + public void setInitialBindings(List initialBindings) { + this.initialBindings = initialBindings; + if (initialBindings != null) { + for (AiGatewayProviderInitialBinding item : initialBindings) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayProviderCreateAttributes integrationAccountId(String integrationAccountId) { + this.integrationAccountId = integrationAccountId; + return this; + } + + /** + * Provider integration account identifier. + * + * @return integrationAccountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationAccountId() { + return integrationAccountId; + } + + public void setIntegrationAccountId(String integrationAccountId) { + this.integrationAccountId = integrationAccountId; + } + + public AiGatewayProviderCreateAttributes integrationConfig( + AiGatewayProviderIntegrationConfig integrationConfig) { + this.integrationConfig = integrationConfig; + this.unparsed |= integrationConfig.unparsed; + return this; + } + + /** + * Provider-specific integration configuration. + * + * @return integrationConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayProviderIntegrationConfig getIntegrationConfig() { + return integrationConfig; + } + + public void setIntegrationConfig(AiGatewayProviderIntegrationConfig integrationConfig) { + this.integrationConfig = integrationConfig; + if (integrationConfig != null) { + this.unparsed |= integrationConfig.unparsed; + } + } + + public AiGatewayProviderCreateAttributes knownProvider(AiGatewayKnownProvider knownProvider) { + this.knownProvider = knownProvider; + this.unparsed |= !knownProvider.isValid(); + return this; + } + + /** + * Known provider implementation. + * + * @return knownProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KNOWN_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayKnownProvider getKnownProvider() { + return knownProvider; + } + + public void setKnownProvider(AiGatewayKnownProvider knownProvider) { + if (!knownProvider.isValid()) { + this.unparsed = true; + } + this.knownProvider = knownProvider; + } + + public AiGatewayProviderCreateAttributes models(List models) { + this.models = models; + if (models != null) { + for (AiGatewayModelInput item : models) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public AiGatewayProviderCreateAttributes addModelsItem(AiGatewayModelInput modelsItem) { + if (this.models == null) { + this.models = new ArrayList<>(); + } + this.models.add(modelsItem); + this.unparsed |= modelsItem.unparsed; + return this; + } + + /** + * Manually managed models to add alongside models discovered from the provider integration. + * + * @return models + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getModels() { + return models; + } + + public void setModels(List models) { + this.models = models; + if (models != null) { + for (AiGatewayModelInput item : models) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayProviderCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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 AiGatewayProviderCreateAttributes slug(String slug) { + this.slug = slug; + return this; + } + + /** + * Immutable routing identifier. + * + * @return slug + */ + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + /** + * 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 AiGatewayProviderCreateAttributes + */ + @JsonAnySetter + public AiGatewayProviderCreateAttributes 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 AiGatewayProviderCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderCreateAttributes aiGatewayProviderCreateAttributes = + (AiGatewayProviderCreateAttributes) o; + return Objects.equals(this.costMultiplier, aiGatewayProviderCreateAttributes.costMultiplier) + && Objects.equals(this.initialBindings, aiGatewayProviderCreateAttributes.initialBindings) + && Objects.equals( + this.integrationAccountId, aiGatewayProviderCreateAttributes.integrationAccountId) + && Objects.equals( + this.integrationConfig, aiGatewayProviderCreateAttributes.integrationConfig) + && Objects.equals(this.knownProvider, aiGatewayProviderCreateAttributes.knownProvider) + && Objects.equals(this.models, aiGatewayProviderCreateAttributes.models) + && Objects.equals(this.name, aiGatewayProviderCreateAttributes.name) + && Objects.equals(this.slug, aiGatewayProviderCreateAttributes.slug) + && Objects.equals( + this.additionalProperties, aiGatewayProviderCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + costMultiplier, + initialBindings, + integrationAccountId, + integrationConfig, + knownProvider, + models, + name, + slug, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderCreateAttributes {\n"); + sb.append(" costMultiplier: ").append(toIndentedString(costMultiplier)).append("\n"); + sb.append(" initialBindings: ").append(toIndentedString(initialBindings)).append("\n"); + sb.append(" integrationAccountId: ") + .append(toIndentedString(integrationAccountId)) + .append("\n"); + sb.append(" integrationConfig: ").append(toIndentedString(integrationConfig)).append("\n"); + sb.append(" knownProvider: ").append(toIndentedString(knownProvider)).append("\n"); + sb.append(" models: ").append(toIndentedString(models)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" slug: ").append(toIndentedString(slug)).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/AiGatewayProviderCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateData.java new file mode 100644 index 00000000000..8fbeaf413da --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create an AI Gateway provider. */ +@JsonPropertyOrder({ + AiGatewayProviderCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayProviderCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayProviderCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayProviderType type; + + public AiGatewayProviderCreateData() {} + + @JsonCreator + public AiGatewayProviderCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayProviderCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayProviderType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayProviderCreateData attributes(AiGatewayProviderCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create an AI Gateway provider. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayProviderCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayProviderCreateData type(AiGatewayProviderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway provider resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderType getType() { + return type; + } + + public void setType(AiGatewayProviderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayProviderCreateData + */ + @JsonAnySetter + public AiGatewayProviderCreateData 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 AiGatewayProviderCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderCreateData aiGatewayProviderCreateData = (AiGatewayProviderCreateData) o; + return Objects.equals(this.attributes, aiGatewayProviderCreateData.attributes) + && Objects.equals(this.type, aiGatewayProviderCreateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayProviderCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateRequest.java new file mode 100644 index 00000000000..623b17564a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderCreateRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create an AI Gateway provider. */ +@JsonPropertyOrder({AiGatewayProviderCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayProviderCreateData data; + + public AiGatewayProviderCreateRequest() {} + + @JsonCreator + public AiGatewayProviderCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayProviderCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayProviderCreateRequest data(AiGatewayProviderCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create an AI Gateway provider. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderCreateData getData() { + return data; + } + + public void setData(AiGatewayProviderCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayProviderCreateRequest + */ + @JsonAnySetter + public AiGatewayProviderCreateRequest 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 AiGatewayProviderCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderCreateRequest aiGatewayProviderCreateRequest = + (AiGatewayProviderCreateRequest) o; + return Objects.equals(this.data, aiGatewayProviderCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayProviderCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBinding.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBinding.java new file mode 100644 index 00000000000..fb40e8f3104 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBinding.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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Reserved initial provider access binding. Initial provider sharing is unavailable. */ +@JsonPropertyOrder({ + AiGatewayProviderInitialBinding.JSON_PROPERTY_PRINCIPALS, + AiGatewayProviderInitialBinding.JSON_PROPERTY_RELATION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderInitialBinding { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRINCIPALS = "principals"; + private List principals = new ArrayList<>(); + + public static final String JSON_PROPERTY_RELATION = "relation"; + private AiGatewayProviderInitialBindingRelation relation; + + public AiGatewayProviderInitialBinding() {} + + @JsonCreator + public AiGatewayProviderInitialBinding( + @JsonProperty(required = true, value = JSON_PROPERTY_PRINCIPALS) List principals, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATION) + AiGatewayProviderInitialBindingRelation relation) { + this.principals = principals; + this.relation = relation; + this.unparsed |= !relation.isValid(); + } + + public AiGatewayProviderInitialBinding principals(List principals) { + this.principals = principals; + return this; + } + + public AiGatewayProviderInitialBinding addPrincipalsItem(String principalsItem) { + this.principals.add(principalsItem); + return this; + } + + /** + * Access principals in type:id form. + * + * @return principals + */ + @JsonProperty(JSON_PROPERTY_PRINCIPALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPrincipals() { + return principals; + } + + public void setPrincipals(List principals) { + this.principals = principals; + } + + public AiGatewayProviderInitialBinding relation( + AiGatewayProviderInitialBindingRelation relation) { + this.relation = relation; + this.unparsed |= !relation.isValid(); + return this; + } + + /** + * Provider access relation. Editor also grants View. + * + * @return relation + */ + @JsonProperty(JSON_PROPERTY_RELATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderInitialBindingRelation getRelation() { + return relation; + } + + public void setRelation(AiGatewayProviderInitialBindingRelation relation) { + if (!relation.isValid()) { + this.unparsed = true; + } + this.relation = relation; + } + + /** + * 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 AiGatewayProviderInitialBinding + */ + @JsonAnySetter + public AiGatewayProviderInitialBinding 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 AiGatewayProviderInitialBinding object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderInitialBinding aiGatewayProviderInitialBinding = + (AiGatewayProviderInitialBinding) o; + return Objects.equals(this.principals, aiGatewayProviderInitialBinding.principals) + && Objects.equals(this.relation, aiGatewayProviderInitialBinding.relation) + && Objects.equals( + this.additionalProperties, aiGatewayProviderInitialBinding.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(principals, relation, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderInitialBinding {\n"); + sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" relation: ").append(toIndentedString(relation)).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/AiGatewayProviderInitialBindingRelation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBindingRelation.java new file mode 100644 index 00000000000..5c77892e6e2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderInitialBindingRelation.java @@ -0,0 +1,65 @@ +/* + * 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; + +/** Provider access relation. Editor also grants View. */ +@JsonSerialize( + using = + AiGatewayProviderInitialBindingRelation.AiGatewayProviderInitialBindingRelationSerializer + .class) +public class AiGatewayProviderInitialBindingRelation extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("viewer", "editor")); + + public static final AiGatewayProviderInitialBindingRelation VIEWER = + new AiGatewayProviderInitialBindingRelation("viewer"); + public static final AiGatewayProviderInitialBindingRelation EDITOR = + new AiGatewayProviderInitialBindingRelation("editor"); + + AiGatewayProviderInitialBindingRelation(String value) { + super(value, allowedValues); + } + + public static class AiGatewayProviderInitialBindingRelationSerializer + extends StdSerializer { + public AiGatewayProviderInitialBindingRelationSerializer( + Class t) { + super(t); + } + + public AiGatewayProviderInitialBindingRelationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayProviderInitialBindingRelation value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayProviderInitialBindingRelation fromValue(String value) { + return new AiGatewayProviderInitialBindingRelation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderIntegrationConfig.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderIntegrationConfig.java new file mode 100644 index 00000000000..42c73036d89 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderIntegrationConfig.java @@ -0,0 +1,302 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Provider-specific integration configuration. */ +@JsonPropertyOrder({ + AiGatewayProviderIntegrationConfig.JSON_PROPERTY_BEDROCK_REGION, + AiGatewayProviderIntegrationConfig.JSON_PROPERTY_FOUNDRY_PROJECT, + AiGatewayProviderIntegrationConfig.JSON_PROPERTY_FOUNDRY_RESOURCE_ID, + AiGatewayProviderIntegrationConfig.JSON_PROPERTY_LOCATION, + AiGatewayProviderIntegrationConfig.JSON_PROPERTY_PROJECT_ID, + AiGatewayProviderIntegrationConfig.JSON_PROPERTY_SUPPORTED_OPERATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderIntegrationConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BEDROCK_REGION = "bedrock_region"; + private String bedrockRegion; + + public static final String JSON_PROPERTY_FOUNDRY_PROJECT = "foundry_project"; + private String foundryProject; + + public static final String JSON_PROPERTY_FOUNDRY_RESOURCE_ID = "foundry_resource_id"; + private String foundryResourceId; + + public static final String JSON_PROPERTY_LOCATION = "location"; + private String location; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + private String projectId; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = null; + + public AiGatewayProviderIntegrationConfig bedrockRegion(String bedrockRegion) { + this.bedrockRegion = bedrockRegion; + return this; + } + + /** + * AWS region used for Bedrock model discovery, routing, and request signing. + * + * @return bedrockRegion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BEDROCK_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBedrockRegion() { + return bedrockRegion; + } + + public void setBedrockRegion(String bedrockRegion) { + this.bedrockRegion = bedrockRegion; + } + + public AiGatewayProviderIntegrationConfig foundryProject(String foundryProject) { + this.foundryProject = foundryProject; + return this; + } + + /** + * Azure AI Foundry project name, used to call the project's agents. + * + * @return foundryProject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FOUNDRY_PROJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFoundryProject() { + return foundryProject; + } + + public void setFoundryProject(String foundryProject) { + this.foundryProject = foundryProject; + } + + public AiGatewayProviderIntegrationConfig foundryResourceId(String foundryResourceId) { + this.foundryResourceId = foundryResourceId; + return this; + } + + /** + * ARM resource ID of the Azure AI Foundry resource, such as + * /subscriptions/<id>/resourceGroups/<group>/providers/Microsoft.CognitiveServices/accounts/<name> + * . Required for azure_foundry providers. + * + * @return foundryResourceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FOUNDRY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFoundryResourceId() { + return foundryResourceId; + } + + public void setFoundryResourceId(String foundryResourceId) { + this.foundryResourceId = foundryResourceId; + } + + public AiGatewayProviderIntegrationConfig location(String location) { + this.location = location; + return this; + } + + /** + * GCP location used for Gemini model discovery and credential resolution. + * + * @return location + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public AiGatewayProviderIntegrationConfig projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * GCP project ID used for Gemini model discovery and credential resolution. + * + * @return projectId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public AiGatewayProviderIntegrationConfig supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayProviderIntegrationConfig addSupportedOperationsItem( + AiGatewayCustomProviderSupportedOperation supportedOperationsItem) { + if (this.supportedOperations == null) { + this.supportedOperations = new ArrayList<>(); + } + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Custom provider default for discovered and new manual models. Omit to use Chat Completions. An + * empty list is invalid. + * + * @return supportedOperations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + /** + * 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 AiGatewayProviderIntegrationConfig + */ + @JsonAnySetter + public AiGatewayProviderIntegrationConfig 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 AiGatewayProviderIntegrationConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderIntegrationConfig aiGatewayProviderIntegrationConfig = + (AiGatewayProviderIntegrationConfig) o; + return Objects.equals(this.bedrockRegion, aiGatewayProviderIntegrationConfig.bedrockRegion) + && Objects.equals(this.foundryProject, aiGatewayProviderIntegrationConfig.foundryProject) + && Objects.equals( + this.foundryResourceId, aiGatewayProviderIntegrationConfig.foundryResourceId) + && Objects.equals(this.location, aiGatewayProviderIntegrationConfig.location) + && Objects.equals(this.projectId, aiGatewayProviderIntegrationConfig.projectId) + && Objects.equals( + this.supportedOperations, aiGatewayProviderIntegrationConfig.supportedOperations) + && Objects.equals( + this.additionalProperties, aiGatewayProviderIntegrationConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + bedrockRegion, + foundryProject, + foundryResourceId, + location, + projectId, + supportedOperations, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderIntegrationConfig {\n"); + sb.append(" bedrockRegion: ").append(toIndentedString(bedrockRegion)).append("\n"); + sb.append(" foundryProject: ").append(toIndentedString(foundryProject)).append("\n"); + sb.append(" foundryResourceId: ").append(toIndentedString(foundryResourceId)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .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/AiGatewayProviderListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderListResponse.java new file mode 100644 index 00000000000..be44a574d3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderListResponse.java @@ -0,0 +1,164 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing AI Gateway providers. */ +@JsonPropertyOrder({AiGatewayProviderListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayProviderListResponse() {} + + @JsonCreator + public AiGatewayProviderListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayProviderResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayProviderListResponse data(List data) { + this.data = data; + for (AiGatewayProviderResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayProviderListResponse addDataItem(AiGatewayProviderResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayProviderResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayProviderListResponse + */ + @JsonAnySetter + public AiGatewayProviderListResponse 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 AiGatewayProviderListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderListResponse aiGatewayProviderListResponse = (AiGatewayProviderListResponse) o; + return Objects.equals(this.data, aiGatewayProviderListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayProviderListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelEntry.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelEntry.java new file mode 100644 index 00000000000..397a658e597 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelEntry.java @@ -0,0 +1,402 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Provider-specific entry for a canonical model. */ +@JsonPropertyOrder({ + AiGatewayProviderModelEntry.JSON_PROPERTY_CREATED_AT, + AiGatewayProviderModelEntry.JSON_PROPERTY_ENABLED, + AiGatewayProviderModelEntry.JSON_PROPERTY_ID, + AiGatewayProviderModelEntry.JSON_PROPERTY_METADATA, + AiGatewayProviderModelEntry.JSON_PROPERTY_MODEL_ID_WIRE, + AiGatewayProviderModelEntry.JSON_PROPERTY_PROVIDER_ID, + AiGatewayProviderModelEntry.JSON_PROPERTY_SOURCE, + AiGatewayProviderModelEntry.JSON_PROPERTY_SUPPORTED_OPERATIONS, + AiGatewayProviderModelEntry.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderModelEntry { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private AiGatewayModelMetadata metadata; + + public static final String JSON_PROPERTY_MODEL_ID_WIRE = "model_id_wire"; + private String modelIdWire; + + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private Long providerId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AiGatewayModelSource source; + + public static final String JSON_PROPERTY_SUPPORTED_OPERATIONS = "supported_operations"; + private List supportedOperations = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayProviderModelEntry() {} + + @JsonCreator + public AiGatewayProviderModelEntry( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_MODEL_ID_WIRE) String modelIdWire, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_ID) Long providerId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) AiGatewayModelSource source, + @JsonProperty(required = true, value = JSON_PROPERTY_SUPPORTED_OPERATIONS) + List supportedOperations, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.enabled = enabled; + this.id = id; + this.modelIdWire = modelIdWire; + this.providerId = providerId; + this.source = source; + this.unparsed |= !source.isValid(); + this.supportedOperations = supportedOperations; + this.updatedAt = updatedAt; + } + + public AiGatewayProviderModelEntry createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayProviderModelEntry enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the resource is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public AiGatewayProviderModelEntry id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayProviderModelEntry metadata(AiGatewayModelMetadata metadata) { + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + return this; + } + + /** + * Optional, typed enrichment for a model catalog entry. Missing properties remain unknown. + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayModelMetadata getMetadata() { + return metadata; + } + + public void setMetadata(AiGatewayModelMetadata metadata) { + this.metadata = metadata; + if (metadata != null) { + this.unparsed |= metadata.unparsed; + } + } + + public AiGatewayProviderModelEntry modelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + return this; + } + + /** + * Model identifier sent to the provider. + * + * @return modelIdWire + */ + @JsonProperty(JSON_PROPERTY_MODEL_ID_WIRE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelIdWire() { + return modelIdWire; + } + + public void setModelIdWire(String modelIdWire) { + this.modelIdWire = modelIdWire; + } + + public AiGatewayProviderModelEntry providerId(Long providerId) { + this.providerId = providerId; + return this; + } + + /** + * Provider identifier. + * + * @return providerId + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getProviderId() { + return providerId; + } + + public void setProviderId(Long providerId) { + this.providerId = providerId; + } + + public AiGatewayProviderModelEntry source(AiGatewayModelSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * How a model catalog entry is managed. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayModelSource getSource() { + return source; + } + + public void setSource(AiGatewayModelSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public AiGatewayProviderModelEntry supportedOperations( + List supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + public AiGatewayProviderModelEntry addSupportedOperationsItem( + AiGatewaySupportedOperation supportedOperationsItem) { + this.supportedOperations.add(supportedOperationsItem); + this.unparsed |= !supportedOperationsItem.isValid(); + return this; + } + + /** + * Operations supported by the model. + * + * @return supportedOperations + */ + @JsonProperty(JSON_PROPERTY_SUPPORTED_OPERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSupportedOperations() { + return supportedOperations; + } + + public void setSupportedOperations(List supportedOperations) { + this.supportedOperations = supportedOperations; + } + + public AiGatewayProviderModelEntry updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayProviderModelEntry + */ + @JsonAnySetter + public AiGatewayProviderModelEntry 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 AiGatewayProviderModelEntry object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderModelEntry aiGatewayProviderModelEntry = (AiGatewayProviderModelEntry) o; + return Objects.equals(this.createdAt, aiGatewayProviderModelEntry.createdAt) + && Objects.equals(this.enabled, aiGatewayProviderModelEntry.enabled) + && Objects.equals(this.id, aiGatewayProviderModelEntry.id) + && Objects.equals(this.metadata, aiGatewayProviderModelEntry.metadata) + && Objects.equals(this.modelIdWire, aiGatewayProviderModelEntry.modelIdWire) + && Objects.equals(this.providerId, aiGatewayProviderModelEntry.providerId) + && Objects.equals(this.source, aiGatewayProviderModelEntry.source) + && Objects.equals(this.supportedOperations, aiGatewayProviderModelEntry.supportedOperations) + && Objects.equals(this.updatedAt, aiGatewayProviderModelEntry.updatedAt) + && Objects.equals( + this.additionalProperties, aiGatewayProviderModelEntry.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + enabled, + id, + metadata, + modelIdWire, + providerId, + source, + supportedOperations, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderModelEntry {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" modelIdWire: ").append(toIndentedString(modelIdWire)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" supportedOperations: ") + .append(toIndentedString(supportedOperations)) + .append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayProviderModelsRelationship.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelsRelationship.java new file mode 100644 index 00000000000..a195b45a6bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderModelsRelationship.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Model catalog entries associated with a provider. */ +@JsonPropertyOrder({AiGatewayProviderModelsRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderModelsRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayProviderModelsRelationship() {} + + @JsonCreator + public AiGatewayProviderModelsRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayModelCatalogEntryIdentifier item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayProviderModelsRelationship data(List data) { + this.data = data; + for (AiGatewayModelCatalogEntryIdentifier item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayProviderModelsRelationship addDataItem( + AiGatewayModelCatalogEntryIdentifier dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayModelCatalogEntryIdentifier item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayProviderModelsRelationship + */ + @JsonAnySetter + public AiGatewayProviderModelsRelationship 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 AiGatewayProviderModelsRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderModelsRelationship aiGatewayProviderModelsRelationship = + (AiGatewayProviderModelsRelationship) o; + return Objects.equals(this.data, aiGatewayProviderModelsRelationship.data) + && Objects.equals( + this.additionalProperties, aiGatewayProviderModelsRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderModelsRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderRelationships.java new file mode 100644 index 00000000000..b18d75da310 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderRelationships.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; + +/** Provider relationships. */ +@JsonPropertyOrder({AiGatewayProviderRelationships.JSON_PROPERTY_MODELS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODELS = "models"; + private AiGatewayProviderModelsRelationship models; + + public AiGatewayProviderRelationships() {} + + @JsonCreator + public AiGatewayProviderRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_MODELS) + AiGatewayProviderModelsRelationship models) { + this.models = models; + this.unparsed |= models.unparsed; + } + + public AiGatewayProviderRelationships models(AiGatewayProviderModelsRelationship models) { + this.models = models; + this.unparsed |= models.unparsed; + return this; + } + + /** + * Model catalog entries associated with a provider. + * + * @return models + */ + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderModelsRelationship getModels() { + return models; + } + + public void setModels(AiGatewayProviderModelsRelationship models) { + this.models = models; + if (models != null) { + this.unparsed |= models.unparsed; + } + } + + /** + * 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 AiGatewayProviderRelationships + */ + @JsonAnySetter + public AiGatewayProviderRelationships 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 AiGatewayProviderRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderRelationships aiGatewayProviderRelationships = + (AiGatewayProviderRelationships) o; + return Objects.equals(this.models, aiGatewayProviderRelationships.models) + && Objects.equals( + this.additionalProperties, aiGatewayProviderRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(models, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderRelationships {\n"); + sb.append(" models: ").append(toIndentedString(models)).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/AiGatewayProviderResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderResource.java new file mode 100644 index 00000000000..dfa64d392f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderResource.java @@ -0,0 +1,244 @@ +/* + * 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; + +/** AI Gateway provider resource. */ +@JsonPropertyOrder({ + AiGatewayProviderResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayProviderResource.JSON_PROPERTY_ID, + AiGatewayProviderResource.JSON_PROPERTY_RELATIONSHIPS, + AiGatewayProviderResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayProviderAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private AiGatewayProviderRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayProviderType type; + + public AiGatewayProviderResource() {} + + @JsonCreator + public AiGatewayProviderResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayProviderAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayProviderType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayProviderResource attributes(AiGatewayProviderAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * AI Gateway provider configuration and metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayProviderAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayProviderResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayProviderResource relationships(AiGatewayProviderRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Provider relationships. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayProviderRelationships getRelationships() { + return relationships; + } + + public void setRelationships(AiGatewayProviderRelationships relationships) { + this.relationships = relationships; + if (relationships != null) { + this.unparsed |= relationships.unparsed; + } + } + + public AiGatewayProviderResource type(AiGatewayProviderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway provider resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderType getType() { + return type; + } + + public void setType(AiGatewayProviderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayProviderResource + */ + @JsonAnySetter + public AiGatewayProviderResource 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 AiGatewayProviderResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderResource aiGatewayProviderResource = (AiGatewayProviderResource) o; + return Objects.equals(this.attributes, aiGatewayProviderResource.attributes) + && Objects.equals(this.id, aiGatewayProviderResource.id) + && Objects.equals(this.relationships, aiGatewayProviderResource.relationships) + && Objects.equals(this.type, aiGatewayProviderResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayProviderResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).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/AiGatewayProviderResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderResponse.java new file mode 100644 index 00000000000..685d677d81b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderResponse.java @@ -0,0 +1,200 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing one AI Gateway provider. */ +@JsonPropertyOrder({ + AiGatewayProviderResponse.JSON_PROPERTY_DATA, + AiGatewayProviderResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayProviderResource data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public AiGatewayProviderResponse() {} + + @JsonCreator + public AiGatewayProviderResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayProviderResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayProviderResponse data(AiGatewayProviderResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway provider resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderResource getData() { + return data; + } + + public void setData(AiGatewayProviderResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + public AiGatewayProviderResponse included(List included) { + this.included = included; + if (included != null) { + for (AiGatewayModelCatalogEntryResource item : included) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public AiGatewayProviderResponse addIncludedItem( + AiGatewayModelCatalogEntryResource includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Model catalog entries created with the provider. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + if (included != null) { + for (AiGatewayModelCatalogEntryResource item : included) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayProviderResponse + */ + @JsonAnySetter + public AiGatewayProviderResponse 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 AiGatewayProviderResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderResponse aiGatewayProviderResponse = (AiGatewayProviderResponse) o; + return Objects.equals(this.data, aiGatewayProviderResponse.data) + && Objects.equals(this.included, aiGatewayProviderResponse.included) + && Objects.equals( + this.additionalProperties, aiGatewayProviderResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).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/AiGatewayProviderType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderType.java new file mode 100644 index 00000000000..8299b4cecba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderType.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** AI Gateway provider resource type. */ +@JsonSerialize(using = AiGatewayProviderType.AiGatewayProviderTypeSerializer.class) +public class AiGatewayProviderType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("providers")); + + public static final AiGatewayProviderType PROVIDERS = new AiGatewayProviderType("providers"); + + AiGatewayProviderType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayProviderTypeSerializer extends StdSerializer { + public AiGatewayProviderTypeSerializer(Class t) { + super(t); + } + + public AiGatewayProviderTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayProviderType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayProviderType fromValue(String value) { + return new AiGatewayProviderType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateAttributes.java new file mode 100644 index 00000000000..b4a74168088 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateAttributes.java @@ -0,0 +1,167 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to update an AI Gateway provider. */ +@JsonPropertyOrder({ + AiGatewayProviderUpdateAttributes.JSON_PROPERTY_COST_MULTIPLIER, + AiGatewayProviderUpdateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COST_MULTIPLIER = "cost_multiplier"; + private Double costMultiplier; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public AiGatewayProviderUpdateAttributes costMultiplier(Double costMultiplier) { + this.costMultiplier = costMultiplier; + return this; + } + + /** + * Multiplier applied to provider costs. Must be greater than 0 and at most 1000000. minimum: 0 + * maximum: 1000000 + * + * @return costMultiplier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST_MULTIPLIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getCostMultiplier() { + return costMultiplier; + } + + public void setCostMultiplier(Double costMultiplier) { + this.costMultiplier = costMultiplier; + } + + public AiGatewayProviderUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable resource name. + * + * @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; + } + + /** + * 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 AiGatewayProviderUpdateAttributes + */ + @JsonAnySetter + public AiGatewayProviderUpdateAttributes 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 AiGatewayProviderUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderUpdateAttributes aiGatewayProviderUpdateAttributes = + (AiGatewayProviderUpdateAttributes) o; + return Objects.equals(this.costMultiplier, aiGatewayProviderUpdateAttributes.costMultiplier) + && Objects.equals(this.name, aiGatewayProviderUpdateAttributes.name) + && Objects.equals( + this.additionalProperties, aiGatewayProviderUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(costMultiplier, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderUpdateAttributes {\n"); + sb.append(" costMultiplier: ").append(toIndentedString(costMultiplier)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/AiGatewayProviderUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateData.java new file mode 100644 index 00000000000..453fe487c95 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to update an AI Gateway provider. */ +@JsonPropertyOrder({ + AiGatewayProviderUpdateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayProviderUpdateData.JSON_PROPERTY_ID, + AiGatewayProviderUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayProviderUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayProviderType type; + + public AiGatewayProviderUpdateData() {} + + @JsonCreator + public AiGatewayProviderUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayProviderUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayProviderType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayProviderUpdateData attributes(AiGatewayProviderUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to update an AI Gateway provider. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayProviderUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayProviderUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayProviderUpdateData type(AiGatewayProviderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway provider resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderType getType() { + return type; + } + + public void setType(AiGatewayProviderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayProviderUpdateData + */ + @JsonAnySetter + public AiGatewayProviderUpdateData 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 AiGatewayProviderUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderUpdateData aiGatewayProviderUpdateData = (AiGatewayProviderUpdateData) o; + return Objects.equals(this.attributes, aiGatewayProviderUpdateData.attributes) + && Objects.equals(this.id, aiGatewayProviderUpdateData.id) + && Objects.equals(this.type, aiGatewayProviderUpdateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayProviderUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateRequest.java new file mode 100644 index 00000000000..6214b80d553 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayProviderUpdateRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update an AI Gateway provider. */ +@JsonPropertyOrder({AiGatewayProviderUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayProviderUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayProviderUpdateData data; + + public AiGatewayProviderUpdateRequest() {} + + @JsonCreator + public AiGatewayProviderUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayProviderUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayProviderUpdateRequest data(AiGatewayProviderUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to update an AI Gateway provider. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayProviderUpdateData getData() { + return data; + } + + public void setData(AiGatewayProviderUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayProviderUpdateRequest + */ + @JsonAnySetter + public AiGatewayProviderUpdateRequest 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 AiGatewayProviderUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayProviderUpdateRequest aiGatewayProviderUpdateRequest = + (AiGatewayProviderUpdateRequest) o; + return Objects.equals(this.data, aiGatewayProviderUpdateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayProviderUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayProviderUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitAttributes.java new file mode 100644 index 00000000000..75ecdab3ccc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitAttributes.java @@ -0,0 +1,662 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an AI Gateway rate limit. */ +@JsonPropertyOrder({ + AiGatewayRateLimitAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayRateLimitAttributes.JSON_PROPERTY_CREATED_BY, + AiGatewayRateLimitAttributes.JSON_PROPERTY_ENABLED, + AiGatewayRateLimitAttributes.JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE, + AiGatewayRateLimitAttributes.JSON_PROPERTY_MODE, + AiGatewayRateLimitAttributes.JSON_PROPERTY_MONITOR_ID, + AiGatewayRateLimitAttributes.JSON_PROPERTY_NAME, + AiGatewayRateLimitAttributes.JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE, + AiGatewayRateLimitAttributes.JSON_PROPERTY_REQUESTS_PER_MINUTE, + AiGatewayRateLimitAttributes.JSON_PROPERTY_REVISION, + AiGatewayRateLimitAttributes.JSON_PROPERTY_SCOPE_RESTRICTED, + AiGatewayRateLimitAttributes.JSON_PROPERTY_TAGS, + AiGatewayRateLimitAttributes.JSON_PROPERTY_TEAM_ID, + AiGatewayRateLimitAttributes.JSON_PROPERTY_UPDATED_AT, + AiGatewayRateLimitAttributes.JSON_PROPERTY_UPDATED_BY, + AiGatewayRateLimitAttributes.JSON_PROPERTY_USER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE = "input_tokens_per_minute"; + private JsonNullable inputTokensPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayRateLimitMode mode; + + public static final String JSON_PROPERTY_MONITOR_ID = "monitor_id"; + private JsonNullable monitorId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE = "output_tokens_per_minute"; + private JsonNullable outputTokensPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REQUESTS_PER_MINUTE = "requests_per_minute"; + private JsonNullable requestsPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REVISION = "revision"; + private Long revision; + + public static final String JSON_PROPERTY_SCOPE_RESTRICTED = "scope_restricted"; + private Boolean scopeRestricted; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap(); + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private JsonNullable teamId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private String updatedBy; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private JsonNullable userId = JsonNullable.undefined(); + + public AiGatewayRateLimitAttributes() {} + + @JsonCreator + public AiGatewayRateLimitAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) AiGatewayRateLimitMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REVISION) Long revision, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE_RESTRICTED) + Boolean scopeRestricted, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) Map tags, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_BY) String updatedBy) { + this.createdAt = createdAt; + this.createdBy = createdBy; + this.enabled = enabled; + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.name = name; + this.revision = revision; + this.scopeRestricted = scopeRestricted; + this.tags = tags; + this.updatedAt = updatedAt; + this.updatedBy = updatedBy; + } + + public AiGatewayRateLimitAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation timestamp. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayRateLimitAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Email of the user who created this rate limit. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public AiGatewayRateLimitAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether this rate limit is active. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public AiGatewayRateLimitAttributes inputTokensPerMinute(Long inputTokensPerMinute) { + this.inputTokensPerMinute = JsonNullable.of(inputTokensPerMinute); + return this; + } + + /** + * Maximum input tokens per rolling minute shared by all matching traffic. Null when this rule + * does not limit input tokens. minimum: 1 maximum: 100000000000 + * + * @return inputTokensPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getInputTokensPerMinute() { + return inputTokensPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getInputTokensPerMinute_JsonNullable() { + return inputTokensPerMinute; + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE) + public void setInputTokensPerMinute_JsonNullable(JsonNullable inputTokensPerMinute) { + this.inputTokensPerMinute = inputTokensPerMinute; + } + + public void setInputTokensPerMinute(Long inputTokensPerMinute) { + this.inputTokensPerMinute = JsonNullable.of(inputTokensPerMinute); + } + + public AiGatewayRateLimitAttributes mode(AiGatewayRateLimitMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Action taken when request rate exceeds the limit. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitMode getMode() { + return mode; + } + + public void setMode(AiGatewayRateLimitMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayRateLimitAttributes monitorId(Long monitorId) { + this.monitorId = JsonNullable.of(monitorId); + return this; + } + + /** + * Datadog monitor that alerts on this rule. Null until one is provisioned. + * + * @return monitorId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getMonitorId() { + return monitorId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getMonitorId_JsonNullable() { + return monitorId; + } + + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + public void setMonitorId_JsonNullable(JsonNullable monitorId) { + this.monitorId = monitorId; + } + + public void setMonitorId(Long monitorId) { + this.monitorId = JsonNullable.of(monitorId); + } + + public AiGatewayRateLimitAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Rate limit name. + * + * @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 AiGatewayRateLimitAttributes outputTokensPerMinute(Long outputTokensPerMinute) { + this.outputTokensPerMinute = JsonNullable.of(outputTokensPerMinute); + return this; + } + + /** + * Maximum output tokens per rolling minute shared by all matching traffic. Null when this rule + * does not limit output tokens. minimum: 1 maximum: 100000000000 + * + * @return outputTokensPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getOutputTokensPerMinute() { + return outputTokensPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getOutputTokensPerMinute_JsonNullable() { + return outputTokensPerMinute; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE) + public void setOutputTokensPerMinute_JsonNullable(JsonNullable outputTokensPerMinute) { + this.outputTokensPerMinute = outputTokensPerMinute; + } + + public void setOutputTokensPerMinute(Long outputTokensPerMinute) { + this.outputTokensPerMinute = JsonNullable.of(outputTokensPerMinute); + } + + public AiGatewayRateLimitAttributes requestsPerMinute(Long requestsPerMinute) { + this.requestsPerMinute = JsonNullable.of(requestsPerMinute); + return this; + } + + /** + * Maximum requests per rolling minute shared by all matching traffic. Null when this rule does + * not limit requests. minimum: 1 maximum: 10000000 + * + * @return requestsPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRequestsPerMinute() { + return requestsPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REQUESTS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRequestsPerMinute_JsonNullable() { + return requestsPerMinute; + } + + @JsonProperty(JSON_PROPERTY_REQUESTS_PER_MINUTE) + public void setRequestsPerMinute_JsonNullable(JsonNullable requestsPerMinute) { + this.requestsPerMinute = requestsPerMinute; + } + + public void setRequestsPerMinute(Long requestsPerMinute) { + this.requestsPerMinute = JsonNullable.of(requestsPerMinute); + } + + public AiGatewayRateLimitAttributes revision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Increases on every change to the definition. + * + * @return revision + */ + @JsonProperty(JSON_PROPERTY_REVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRevision() { + return revision; + } + + public void setRevision(Long revision) { + this.revision = revision; + } + + public AiGatewayRateLimitAttributes scopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + return this; + } + + /** + * Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an + * unrelated update to preserve their saved values. + * + * @return scopeRestricted + */ + @JsonProperty(JSON_PROPERTY_SCOPE_RESTRICTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getScopeRestricted() { + return scopeRestricted; + } + + public void setScopeRestricted(Boolean scopeRestricted) { + this.scopeRestricted = scopeRestricted; + } + + public AiGatewayRateLimitAttributes tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayRateLimitAttributes putTagsItem(String key, String tagsItem) { + this.tags.put(key, tagsItem); + return this; + } + + /** + * Optional scope tags, such as provider, model, ml_app, or custom dimensions. A request matches + * when it has all of these tags. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayRateLimitAttributes teamId(UUID teamId) { + this.teamId = JsonNullable.of(teamId); + return this; + } + + /** + * Optional Team UUID. Count only requests attributed to this Datadog Team. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UUID getTeamId() { + return teamId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTeamId_JsonNullable() { + return teamId; + } + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + public void setTeamId_JsonNullable(JsonNullable teamId) { + this.teamId = teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = JsonNullable.of(teamId); + } + + public AiGatewayRateLimitAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last modification timestamp. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public AiGatewayRateLimitAttributes updatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * Email of the user who last modified this rate limit. + * + * @return updatedBy + */ + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + public AiGatewayRateLimitAttributes userId(UUID userId) { + this.userId = JsonNullable.of(userId); + return this; + } + + /** + * Optional user UUID. Count only this user's requests. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UUID getUserId() { + return userId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUserId_JsonNullable() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + public void setUserId_JsonNullable(JsonNullable userId) { + this.userId = userId; + } + + public void setUserId(UUID userId) { + this.userId = JsonNullable.of(userId); + } + + /** + * 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 AiGatewayRateLimitAttributes + */ + @JsonAnySetter + public AiGatewayRateLimitAttributes 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 AiGatewayRateLimitAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitAttributes aiGatewayRateLimitAttributes = (AiGatewayRateLimitAttributes) o; + return Objects.equals(this.createdAt, aiGatewayRateLimitAttributes.createdAt) + && Objects.equals(this.createdBy, aiGatewayRateLimitAttributes.createdBy) + && Objects.equals(this.enabled, aiGatewayRateLimitAttributes.enabled) + && Objects.equals( + this.inputTokensPerMinute, aiGatewayRateLimitAttributes.inputTokensPerMinute) + && Objects.equals(this.mode, aiGatewayRateLimitAttributes.mode) + && Objects.equals(this.monitorId, aiGatewayRateLimitAttributes.monitorId) + && Objects.equals(this.name, aiGatewayRateLimitAttributes.name) + && Objects.equals( + this.outputTokensPerMinute, aiGatewayRateLimitAttributes.outputTokensPerMinute) + && Objects.equals(this.requestsPerMinute, aiGatewayRateLimitAttributes.requestsPerMinute) + && Objects.equals(this.revision, aiGatewayRateLimitAttributes.revision) + && Objects.equals(this.scopeRestricted, aiGatewayRateLimitAttributes.scopeRestricted) + && Objects.equals(this.tags, aiGatewayRateLimitAttributes.tags) + && Objects.equals(this.teamId, aiGatewayRateLimitAttributes.teamId) + && Objects.equals(this.updatedAt, aiGatewayRateLimitAttributes.updatedAt) + && Objects.equals(this.updatedBy, aiGatewayRateLimitAttributes.updatedBy) + && Objects.equals(this.userId, aiGatewayRateLimitAttributes.userId) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + enabled, + inputTokensPerMinute, + mode, + monitorId, + name, + outputTokensPerMinute, + requestsPerMinute, + revision, + scopeRestricted, + tags, + teamId, + updatedAt, + updatedBy, + userId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" inputTokensPerMinute: ") + .append(toIndentedString(inputTokensPerMinute)) + .append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" outputTokensPerMinute: ") + .append(toIndentedString(outputTokensPerMinute)) + .append("\n"); + sb.append(" requestsPerMinute: ").append(toIndentedString(requestsPerMinute)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" scopeRestricted: ").append(toIndentedString(scopeRestricted)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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/AiGatewayRateLimitCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateAttributes.java new file mode 100644 index 00000000000..96acc8ca127 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateAttributes.java @@ -0,0 +1,400 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes used to create an AI Gateway rate limit. */ +@JsonPropertyOrder({ + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_MODE, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_NAME, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_REQUESTS_PER_MINUTE, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_TAGS, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_TEAM_ID, + AiGatewayRateLimitCreateAttributes.JSON_PROPERTY_USER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE = "input_tokens_per_minute"; + private JsonNullable inputTokensPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayRateLimitMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE = "output_tokens_per_minute"; + private JsonNullable outputTokensPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REQUESTS_PER_MINUTE = "requests_per_minute"; + private JsonNullable requestsPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = null; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private UUID teamId; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private UUID userId; + + public AiGatewayRateLimitCreateAttributes() {} + + @JsonCreator + public AiGatewayRateLimitCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.name = name; + } + + public AiGatewayRateLimitCreateAttributes inputTokensPerMinute(Long inputTokensPerMinute) { + this.inputTokensPerMinute = JsonNullable.of(inputTokensPerMinute); + return this; + } + + /** + * Maximum input tokens per rolling minute. minimum: 1 maximum: 100000000000 + * + * @return inputTokensPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getInputTokensPerMinute() { + return inputTokensPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getInputTokensPerMinute_JsonNullable() { + return inputTokensPerMinute; + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE) + public void setInputTokensPerMinute_JsonNullable(JsonNullable inputTokensPerMinute) { + this.inputTokensPerMinute = inputTokensPerMinute; + } + + public void setInputTokensPerMinute(Long inputTokensPerMinute) { + this.inputTokensPerMinute = JsonNullable.of(inputTokensPerMinute); + } + + public AiGatewayRateLimitCreateAttributes mode(AiGatewayRateLimitMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Action taken when request rate exceeds the limit. + * + * @return mode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayRateLimitMode getMode() { + return mode; + } + + public void setMode(AiGatewayRateLimitMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayRateLimitCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Rate limit name. Must not be empty. + * + * @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 AiGatewayRateLimitCreateAttributes outputTokensPerMinute(Long outputTokensPerMinute) { + this.outputTokensPerMinute = JsonNullable.of(outputTokensPerMinute); + return this; + } + + /** + * Maximum output tokens per rolling minute. minimum: 1 maximum: 100000000000 + * + * @return outputTokensPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getOutputTokensPerMinute() { + return outputTokensPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getOutputTokensPerMinute_JsonNullable() { + return outputTokensPerMinute; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE) + public void setOutputTokensPerMinute_JsonNullable(JsonNullable outputTokensPerMinute) { + this.outputTokensPerMinute = outputTokensPerMinute; + } + + public void setOutputTokensPerMinute(Long outputTokensPerMinute) { + this.outputTokensPerMinute = JsonNullable.of(outputTokensPerMinute); + } + + public AiGatewayRateLimitCreateAttributes requestsPerMinute(Long requestsPerMinute) { + this.requestsPerMinute = JsonNullable.of(requestsPerMinute); + return this; + } + + /** + * Maximum requests per rolling minute. At least one of requests_per_minute, + * input_tokens_per_minute, and output_tokens_per_minute is required. minimum: + * 1 maximum: 10000000 + * + * @return requestsPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRequestsPerMinute() { + return requestsPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REQUESTS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRequestsPerMinute_JsonNullable() { + return requestsPerMinute; + } + + @JsonProperty(JSON_PROPERTY_REQUESTS_PER_MINUTE) + public void setRequestsPerMinute_JsonNullable(JsonNullable requestsPerMinute) { + this.requestsPerMinute = requestsPerMinute; + } + + public void setRequestsPerMinute(Long requestsPerMinute) { + this.requestsPerMinute = JsonNullable.of(requestsPerMinute); + } + + public AiGatewayRateLimitCreateAttributes tags(Map tags) { + this.tags = tags; + return this; + } + + public AiGatewayRateLimitCreateAttributes putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Optional scope tags, such as provider, model, ml_app, or + * custom dimensions. A request matches when it has all of these tags. The reserved metadata keys + * name, budget_name, and span_filter are rejected. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + public AiGatewayRateLimitCreateAttributes teamId(UUID teamId) { + this.teamId = teamId; + return this; + } + + /** + * Optional UUID. Count only requests attributed to this Datadog Team. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTeamId() { + return teamId; + } + + public void setTeamId(UUID teamId) { + this.teamId = teamId; + } + + public AiGatewayRateLimitCreateAttributes userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * Optional UUID. Count only this user's requests. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + /** + * 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 AiGatewayRateLimitCreateAttributes + */ + @JsonAnySetter + public AiGatewayRateLimitCreateAttributes 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 AiGatewayRateLimitCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitCreateAttributes aiGatewayRateLimitCreateAttributes = + (AiGatewayRateLimitCreateAttributes) o; + return Objects.equals( + this.inputTokensPerMinute, aiGatewayRateLimitCreateAttributes.inputTokensPerMinute) + && Objects.equals(this.mode, aiGatewayRateLimitCreateAttributes.mode) + && Objects.equals(this.name, aiGatewayRateLimitCreateAttributes.name) + && Objects.equals( + this.outputTokensPerMinute, aiGatewayRateLimitCreateAttributes.outputTokensPerMinute) + && Objects.equals( + this.requestsPerMinute, aiGatewayRateLimitCreateAttributes.requestsPerMinute) + && Objects.equals(this.tags, aiGatewayRateLimitCreateAttributes.tags) + && Objects.equals(this.teamId, aiGatewayRateLimitCreateAttributes.teamId) + && Objects.equals(this.userId, aiGatewayRateLimitCreateAttributes.userId) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + inputTokensPerMinute, + mode, + name, + outputTokensPerMinute, + requestsPerMinute, + tags, + teamId, + userId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitCreateAttributes {\n"); + sb.append(" inputTokensPerMinute: ") + .append(toIndentedString(inputTokensPerMinute)) + .append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" outputTokensPerMinute: ") + .append(toIndentedString(outputTokensPerMinute)) + .append("\n"); + sb.append(" requestsPerMinute: ").append(toIndentedString(requestsPerMinute)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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/AiGatewayRateLimitCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateData.java new file mode 100644 index 00000000000..885f9f5c26e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create an AI Gateway rate limit. */ +@JsonPropertyOrder({ + AiGatewayRateLimitCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRateLimitCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRateLimitCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRateLimitType type; + + public AiGatewayRateLimitCreateData() {} + + @JsonCreator + public AiGatewayRateLimitCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRateLimitCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRateLimitType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRateLimitCreateData attributes(AiGatewayRateLimitCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create an AI Gateway rate limit. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRateLimitCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRateLimitCreateData type(AiGatewayRateLimitType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway rate limit resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitType getType() { + return type; + } + + public void setType(AiGatewayRateLimitType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRateLimitCreateData + */ + @JsonAnySetter + public AiGatewayRateLimitCreateData 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 AiGatewayRateLimitCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitCreateData aiGatewayRateLimitCreateData = (AiGatewayRateLimitCreateData) o; + return Objects.equals(this.attributes, aiGatewayRateLimitCreateData.attributes) + && Objects.equals(this.type, aiGatewayRateLimitCreateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateRequest.java new file mode 100644 index 00000000000..8df33805423 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitCreateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create an AI Gateway rate limit. */ +@JsonPropertyOrder({AiGatewayRateLimitCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayRateLimitCreateData data; + + public AiGatewayRateLimitCreateRequest() {} + + @JsonCreator + public AiGatewayRateLimitCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayRateLimitCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayRateLimitCreateRequest data(AiGatewayRateLimitCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create an AI Gateway rate limit. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitCreateData getData() { + return data; + } + + public void setData(AiGatewayRateLimitCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayRateLimitCreateRequest + */ + @JsonAnySetter + public AiGatewayRateLimitCreateRequest 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 AiGatewayRateLimitCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitCreateRequest aiGatewayRateLimitCreateRequest = + (AiGatewayRateLimitCreateRequest) o; + return Objects.equals(this.data, aiGatewayRateLimitCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitListResponse.java new file mode 100644 index 00000000000..e26eda01dae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitListResponse.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing AI Gateway rate limits. */ +@JsonPropertyOrder({AiGatewayRateLimitListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayRateLimitListResponse() {} + + @JsonCreator + public AiGatewayRateLimitListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayRateLimitResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRateLimitListResponse data(List data) { + this.data = data; + for (AiGatewayRateLimitResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRateLimitListResponse addDataItem(AiGatewayRateLimitResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayRateLimitResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRateLimitListResponse + */ + @JsonAnySetter + public AiGatewayRateLimitListResponse 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 AiGatewayRateLimitListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitListResponse aiGatewayRateLimitListResponse = + (AiGatewayRateLimitListResponse) o; + return Objects.equals(this.data, aiGatewayRateLimitListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitMode.java new file mode 100644 index 00000000000..db32e462326 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitMode.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** Action taken when request rate exceeds the limit. */ +@JsonSerialize(using = AiGatewayRateLimitMode.AiGatewayRateLimitModeSerializer.class) +public class AiGatewayRateLimitMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ALERT", "ENFORCE")); + + public static final AiGatewayRateLimitMode ALERT = new AiGatewayRateLimitMode("ALERT"); + public static final AiGatewayRateLimitMode ENFORCE = new AiGatewayRateLimitMode("ENFORCE"); + + AiGatewayRateLimitMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRateLimitModeSerializer + extends StdSerializer { + public AiGatewayRateLimitModeSerializer(Class t) { + super(t); + } + + public AiGatewayRateLimitModeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRateLimitMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRateLimitMode fromValue(String value) { + return new AiGatewayRateLimitMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResource.java new file mode 100644 index 00000000000..c6c504d11d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResource.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** AI Gateway rate limit resource. */ +@JsonPropertyOrder({ + AiGatewayRateLimitResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRateLimitResource.JSON_PROPERTY_ID, + AiGatewayRateLimitResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRateLimitAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRateLimitType type; + + public AiGatewayRateLimitResource() {} + + @JsonCreator + public AiGatewayRateLimitResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRateLimitAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRateLimitType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRateLimitResource attributes(AiGatewayRateLimitAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an AI Gateway rate limit. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRateLimitAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRateLimitResource id(UUID id) { + this.id = id; + return this; + } + + /** + * Rate limit UUID. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayRateLimitResource type(AiGatewayRateLimitType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway rate limit resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitType getType() { + return type; + } + + public void setType(AiGatewayRateLimitType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRateLimitResource + */ + @JsonAnySetter + public AiGatewayRateLimitResource 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 AiGatewayRateLimitResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitResource aiGatewayRateLimitResource = (AiGatewayRateLimitResource) o; + return Objects.equals(this.attributes, aiGatewayRateLimitResource.attributes) + && Objects.equals(this.id, aiGatewayRateLimitResource.id) + && Objects.equals(this.type, aiGatewayRateLimitResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResponse.java new file mode 100644 index 00000000000..dc5055af5bb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one AI Gateway rate limit. */ +@JsonPropertyOrder({AiGatewayRateLimitResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayRateLimitResource data; + + public AiGatewayRateLimitResponse() {} + + @JsonCreator + public AiGatewayRateLimitResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AiGatewayRateLimitResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayRateLimitResponse data(AiGatewayRateLimitResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway rate limit resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitResource getData() { + return data; + } + + public void setData(AiGatewayRateLimitResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayRateLimitResponse + */ + @JsonAnySetter + public AiGatewayRateLimitResponse 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 AiGatewayRateLimitResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitResponse aiGatewayRateLimitResponse = (AiGatewayRateLimitResponse) o; + return Objects.equals(this.data, aiGatewayRateLimitResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitType.java new file mode 100644 index 00000000000..d7b924e75c0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** AI Gateway rate limit resource type. */ +@JsonSerialize(using = AiGatewayRateLimitType.AiGatewayRateLimitTypeSerializer.class) +public class AiGatewayRateLimitType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rate-limits")); + + public static final AiGatewayRateLimitType RATE_LIMITS = + new AiGatewayRateLimitType("rate-limits"); + + AiGatewayRateLimitType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRateLimitTypeSerializer + extends StdSerializer { + public AiGatewayRateLimitTypeSerializer(Class t) { + super(t); + } + + public AiGatewayRateLimitTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRateLimitType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRateLimitType fromValue(String value) { + return new AiGatewayRateLimitType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateAttributes.java new file mode 100644 index 00000000000..0b9534c2827 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateAttributes.java @@ -0,0 +1,452 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes used to update an AI Gateway rate limit. Only sent fields are changed. */ +@JsonPropertyOrder({ + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_ENABLED, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_MODE, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_NAME, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_REQUESTS_PER_MINUTE, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_TAGS, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_TEAM_ID, + AiGatewayRateLimitUpdateAttributes.JSON_PROPERTY_USER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE = "input_tokens_per_minute"; + private JsonNullable inputTokensPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODE = "mode"; + private AiGatewayRateLimitMode mode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE = "output_tokens_per_minute"; + private JsonNullable outputTokensPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REQUESTS_PER_MINUTE = "requests_per_minute"; + private JsonNullable requestsPerMinute = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private JsonNullable teamId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private JsonNullable userId = JsonNullable.undefined(); + + public AiGatewayRateLimitUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether this rate limit is active. + * + * @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 AiGatewayRateLimitUpdateAttributes inputTokensPerMinute(Long inputTokensPerMinute) { + this.inputTokensPerMinute = JsonNullable.of(inputTokensPerMinute); + return this; + } + + /** + * Set to 0 to remove the request limit. Null is ignored. At least one limit must remain. minimum: + * 0 maximum: 100000000000 + * + * @return inputTokensPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getInputTokensPerMinute() { + return inputTokensPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getInputTokensPerMinute_JsonNullable() { + return inputTokensPerMinute; + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS_PER_MINUTE) + public void setInputTokensPerMinute_JsonNullable(JsonNullable inputTokensPerMinute) { + this.inputTokensPerMinute = inputTokensPerMinute; + } + + public void setInputTokensPerMinute(Long inputTokensPerMinute) { + this.inputTokensPerMinute = JsonNullable.of(inputTokensPerMinute); + } + + public AiGatewayRateLimitUpdateAttributes mode(AiGatewayRateLimitMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Action taken when request rate exceeds the limit. + * + * @return mode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayRateLimitMode getMode() { + return mode; + } + + public void setMode(AiGatewayRateLimitMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public AiGatewayRateLimitUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Rate limit name. + * + * @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 AiGatewayRateLimitUpdateAttributes outputTokensPerMinute(Long outputTokensPerMinute) { + this.outputTokensPerMinute = JsonNullable.of(outputTokensPerMinute); + return this; + } + + /** + * Set to 0 to remove the request limit. Null is ignored. At least one limit must remain. minimum: + * 0 maximum: 100000000000 + * + * @return outputTokensPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getOutputTokensPerMinute() { + return outputTokensPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getOutputTokensPerMinute_JsonNullable() { + return outputTokensPerMinute; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS_PER_MINUTE) + public void setOutputTokensPerMinute_JsonNullable(JsonNullable outputTokensPerMinute) { + this.outputTokensPerMinute = outputTokensPerMinute; + } + + public void setOutputTokensPerMinute(Long outputTokensPerMinute) { + this.outputTokensPerMinute = JsonNullable.of(outputTokensPerMinute); + } + + public AiGatewayRateLimitUpdateAttributes requestsPerMinute(Long requestsPerMinute) { + this.requestsPerMinute = JsonNullable.of(requestsPerMinute); + return this; + } + + /** + * Set to 0 to remove the request limit. Null is ignored. At least one limit must remain. minimum: + * 0 maximum: 10000000 + * + * @return requestsPerMinute + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRequestsPerMinute() { + return requestsPerMinute.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REQUESTS_PER_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRequestsPerMinute_JsonNullable() { + return requestsPerMinute; + } + + @JsonProperty(JSON_PROPERTY_REQUESTS_PER_MINUTE) + public void setRequestsPerMinute_JsonNullable(JsonNullable requestsPerMinute) { + this.requestsPerMinute = requestsPerMinute; + } + + public void setRequestsPerMinute(Long requestsPerMinute) { + this.requestsPerMinute = JsonNullable.of(requestsPerMinute); + } + + public AiGatewayRateLimitUpdateAttributes tags(Map tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public AiGatewayRateLimitUpdateAttributes putTagsItem(String key, String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new HashMap<>()); + } + try { + this.tags.get().put(key, tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Replaces all scope tags. An empty object clears them. Null is ignored. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(Map tags) { + this.tags = JsonNullable.>of(tags); + } + + public AiGatewayRateLimitUpdateAttributes teamId(String teamId) { + this.teamId = JsonNullable.of(teamId); + return this; + } + + /** + * Replaces the Team scope. An empty string clears it. Null is ignored. + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTeamId() { + return teamId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTeamId_JsonNullable() { + return teamId; + } + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + public void setTeamId_JsonNullable(JsonNullable teamId) { + this.teamId = teamId; + } + + public void setTeamId(String teamId) { + this.teamId = JsonNullable.of(teamId); + } + + public AiGatewayRateLimitUpdateAttributes userId(String userId) { + this.userId = JsonNullable.of(userId); + return this; + } + + /** + * Replaces the user scope. An empty string clears it. Null is ignored. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getUserId() { + return userId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUserId_JsonNullable() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + public void setUserId_JsonNullable(JsonNullable userId) { + this.userId = userId; + } + + public void setUserId(String userId) { + this.userId = JsonNullable.of(userId); + } + + /** + * 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 AiGatewayRateLimitUpdateAttributes + */ + @JsonAnySetter + public AiGatewayRateLimitUpdateAttributes 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 AiGatewayRateLimitUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitUpdateAttributes aiGatewayRateLimitUpdateAttributes = + (AiGatewayRateLimitUpdateAttributes) o; + return Objects.equals(this.enabled, aiGatewayRateLimitUpdateAttributes.enabled) + && Objects.equals( + this.inputTokensPerMinute, aiGatewayRateLimitUpdateAttributes.inputTokensPerMinute) + && Objects.equals(this.mode, aiGatewayRateLimitUpdateAttributes.mode) + && Objects.equals(this.name, aiGatewayRateLimitUpdateAttributes.name) + && Objects.equals( + this.outputTokensPerMinute, aiGatewayRateLimitUpdateAttributes.outputTokensPerMinute) + && Objects.equals( + this.requestsPerMinute, aiGatewayRateLimitUpdateAttributes.requestsPerMinute) + && Objects.equals(this.tags, aiGatewayRateLimitUpdateAttributes.tags) + && Objects.equals(this.teamId, aiGatewayRateLimitUpdateAttributes.teamId) + && Objects.equals(this.userId, aiGatewayRateLimitUpdateAttributes.userId) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + enabled, + inputTokensPerMinute, + mode, + name, + outputTokensPerMinute, + requestsPerMinute, + tags, + teamId, + userId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitUpdateAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" inputTokensPerMinute: ") + .append(toIndentedString(inputTokensPerMinute)) + .append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" outputTokensPerMinute: ") + .append(toIndentedString(outputTokensPerMinute)) + .append("\n"); + sb.append(" requestsPerMinute: ").append(toIndentedString(requestsPerMinute)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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/AiGatewayRateLimitUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateData.java new file mode 100644 index 00000000000..4baa2ba3bd0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateData.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Data used to update an AI Gateway rate limit. */ +@JsonPropertyOrder({ + AiGatewayRateLimitUpdateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRateLimitUpdateData.JSON_PROPERTY_ID, + AiGatewayRateLimitUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRateLimitUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRateLimitType type; + + public AiGatewayRateLimitUpdateData() {} + + @JsonCreator + public AiGatewayRateLimitUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRateLimitUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRateLimitType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRateLimitUpdateData attributes(AiGatewayRateLimitUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to update an AI Gateway rate limit. Only sent fields are changed. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRateLimitUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRateLimitUpdateData id(UUID id) { + this.id = id; + return this; + } + + /** + * Rate limit UUID. Must match the path parameter. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public AiGatewayRateLimitUpdateData type(AiGatewayRateLimitType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway rate limit resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitType getType() { + return type; + } + + public void setType(AiGatewayRateLimitType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRateLimitUpdateData + */ + @JsonAnySetter + public AiGatewayRateLimitUpdateData 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 AiGatewayRateLimitUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitUpdateData aiGatewayRateLimitUpdateData = (AiGatewayRateLimitUpdateData) o; + return Objects.equals(this.attributes, aiGatewayRateLimitUpdateData.attributes) + && Objects.equals(this.id, aiGatewayRateLimitUpdateData.id) + && Objects.equals(this.type, aiGatewayRateLimitUpdateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateRequest.java new file mode 100644 index 00000000000..94958857329 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUpdateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update an AI Gateway rate limit. */ +@JsonPropertyOrder({AiGatewayRateLimitUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayRateLimitUpdateData data; + + public AiGatewayRateLimitUpdateRequest() {} + + @JsonCreator + public AiGatewayRateLimitUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayRateLimitUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayRateLimitUpdateRequest data(AiGatewayRateLimitUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to update an AI Gateway rate limit. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitUpdateData getData() { + return data; + } + + public void setData(AiGatewayRateLimitUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayRateLimitUpdateRequest + */ + @JsonAnySetter + public AiGatewayRateLimitUpdateRequest 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 AiGatewayRateLimitUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitUpdateRequest aiGatewayRateLimitUpdateRequest = + (AiGatewayRateLimitUpdateRequest) o; + return Objects.equals(this.data, aiGatewayRateLimitUpdateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageAttributes.java new file mode 100644 index 00000000000..12938fcecb4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageAttributes.java @@ -0,0 +1,268 @@ +/* + * 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; + +/** Live consumption of one AI Gateway rate limit. */ +@JsonPropertyOrder({ + AiGatewayRateLimitUsageAttributes.JSON_PROPERTY_INPUT_TOKENS, + AiGatewayRateLimitUsageAttributes.JSON_PROPERTY_LIMITED_REQUESTS, + AiGatewayRateLimitUsageAttributes.JSON_PROPERTY_OUTPUT_TOKENS, + AiGatewayRateLimitUsageAttributes.JSON_PROPERTY_REQUESTS, + AiGatewayRateLimitUsageAttributes.JSON_PROPERTY_WOULD_LIMIT_REQUESTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitUsageAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INPUT_TOKENS = "input_tokens"; + private Long inputTokens; + + public static final String JSON_PROPERTY_LIMITED_REQUESTS = "limited_requests"; + private Long limitedRequests; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS = "output_tokens"; + private Long outputTokens; + + public static final String JSON_PROPERTY_REQUESTS = "requests"; + private Long requests; + + public static final String JSON_PROPERTY_WOULD_LIMIT_REQUESTS = "would_limit_requests"; + private Long wouldLimitRequests; + + public AiGatewayRateLimitUsageAttributes() {} + + @JsonCreator + public AiGatewayRateLimitUsageAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_TOKENS) Long inputTokens, + @JsonProperty(required = true, value = JSON_PROPERTY_LIMITED_REQUESTS) Long limitedRequests, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT_TOKENS) Long outputTokens, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) Long requests, + @JsonProperty(required = true, value = JSON_PROPERTY_WOULD_LIMIT_REQUESTS) + Long wouldLimitRequests) { + this.inputTokens = inputTokens; + this.limitedRequests = limitedRequests; + this.outputTokens = outputTokens; + this.requests = requests; + this.wouldLimitRequests = wouldLimitRequests; + } + + public AiGatewayRateLimitUsageAttributes inputTokens(Long inputTokens) { + this.inputTokens = inputTokens; + return this; + } + + /** + * Input tokens counted in the rolling one-minute window. + * + * @return inputTokens + */ + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getInputTokens() { + return inputTokens; + } + + public void setInputTokens(Long inputTokens) { + this.inputTokens = inputTokens; + } + + public AiGatewayRateLimitUsageAttributes limitedRequests(Long limitedRequests) { + this.limitedRequests = limitedRequests; + return this; + } + + /** + * Requests this rate limit rejected in the last 15 minutes. Applies when mode is ENFORCE. + * + * @return limitedRequests + */ + @JsonProperty(JSON_PROPERTY_LIMITED_REQUESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getLimitedRequests() { + return limitedRequests; + } + + public void setLimitedRequests(Long limitedRequests) { + this.limitedRequests = limitedRequests; + } + + public AiGatewayRateLimitUsageAttributes outputTokens(Long outputTokens) { + this.outputTokens = outputTokens; + return this; + } + + /** + * Output tokens counted in the rolling one-minute window. + * + * @return outputTokens + */ + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOutputTokens() { + return outputTokens; + } + + public void setOutputTokens(Long outputTokens) { + this.outputTokens = outputTokens; + } + + public AiGatewayRateLimitUsageAttributes requests(Long requests) { + this.requests = requests; + return this; + } + + /** + * Requests counted in the rolling one-minute window. + * + * @return requests + */ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRequests() { + return requests; + } + + public void setRequests(Long requests) { + this.requests = requests; + } + + public AiGatewayRateLimitUsageAttributes wouldLimitRequests(Long wouldLimitRequests) { + this.wouldLimitRequests = wouldLimitRequests; + return this; + } + + /** + * Requests this rate limit would have rejected in the last 15 minutes. Applies when mode is + * ALERT. + * + * @return wouldLimitRequests + */ + @JsonProperty(JSON_PROPERTY_WOULD_LIMIT_REQUESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getWouldLimitRequests() { + return wouldLimitRequests; + } + + public void setWouldLimitRequests(Long wouldLimitRequests) { + this.wouldLimitRequests = wouldLimitRequests; + } + + /** + * 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 AiGatewayRateLimitUsageAttributes + */ + @JsonAnySetter + public AiGatewayRateLimitUsageAttributes 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 AiGatewayRateLimitUsageAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitUsageAttributes aiGatewayRateLimitUsageAttributes = + (AiGatewayRateLimitUsageAttributes) o; + return Objects.equals(this.inputTokens, aiGatewayRateLimitUsageAttributes.inputTokens) + && Objects.equals(this.limitedRequests, aiGatewayRateLimitUsageAttributes.limitedRequests) + && Objects.equals(this.outputTokens, aiGatewayRateLimitUsageAttributes.outputTokens) + && Objects.equals(this.requests, aiGatewayRateLimitUsageAttributes.requests) + && Objects.equals( + this.wouldLimitRequests, aiGatewayRateLimitUsageAttributes.wouldLimitRequests) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitUsageAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + inputTokens, + limitedRequests, + outputTokens, + requests, + wouldLimitRequests, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitUsageAttributes {\n"); + sb.append(" inputTokens: ").append(toIndentedString(inputTokens)).append("\n"); + sb.append(" limitedRequests: ").append(toIndentedString(limitedRequests)).append("\n"); + sb.append(" outputTokens: ").append(toIndentedString(outputTokens)).append("\n"); + sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); + sb.append(" wouldLimitRequests: ").append(toIndentedString(wouldLimitRequests)).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/AiGatewayRateLimitUsageListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageListResponse.java new file mode 100644 index 00000000000..d256631b911 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageListResponse.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing live usage for the organization's AI Gateway rate limits. */ +@JsonPropertyOrder({AiGatewayRateLimitUsageListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitUsageListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayRateLimitUsageListResponse() {} + + @JsonCreator + public AiGatewayRateLimitUsageListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayRateLimitUsageResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRateLimitUsageListResponse data(List data) { + this.data = data; + for (AiGatewayRateLimitUsageResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRateLimitUsageListResponse addDataItem(AiGatewayRateLimitUsageResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayRateLimitUsageResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRateLimitUsageListResponse + */ + @JsonAnySetter + public AiGatewayRateLimitUsageListResponse 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 AiGatewayRateLimitUsageListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitUsageListResponse aiGatewayRateLimitUsageListResponse = + (AiGatewayRateLimitUsageListResponse) o; + return Objects.equals(this.data, aiGatewayRateLimitUsageListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitUsageListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitUsageListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageResource.java new file mode 100644 index 00000000000..a532fa4428c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageResource.java @@ -0,0 +1,215 @@ +/* + * 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; + +/** Live usage for one AI Gateway rate limit, or for the untracked or total traffic. */ +@JsonPropertyOrder({ + AiGatewayRateLimitUsageResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRateLimitUsageResource.JSON_PROPERTY_ID, + AiGatewayRateLimitUsageResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRateLimitUsageResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRateLimitUsageAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRateLimitUsageType type; + + public AiGatewayRateLimitUsageResource() {} + + @JsonCreator + public AiGatewayRateLimitUsageResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRateLimitUsageAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRateLimitUsageType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRateLimitUsageResource attributes(AiGatewayRateLimitUsageAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Live consumption of one AI Gateway rate limit. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitUsageAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRateLimitUsageAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRateLimitUsageResource id(String id) { + this.id = id; + return this; + } + + /** + * Rate limit UUID, untracked for traffic no enforced rate limit covers, or + * total for all gateway traffic. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayRateLimitUsageResource type(AiGatewayRateLimitUsageType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway rate limit usage resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRateLimitUsageType getType() { + return type; + } + + public void setType(AiGatewayRateLimitUsageType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRateLimitUsageResource + */ + @JsonAnySetter + public AiGatewayRateLimitUsageResource 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 AiGatewayRateLimitUsageResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRateLimitUsageResource aiGatewayRateLimitUsageResource = + (AiGatewayRateLimitUsageResource) o; + return Objects.equals(this.attributes, aiGatewayRateLimitUsageResource.attributes) + && Objects.equals(this.id, aiGatewayRateLimitUsageResource.id) + && Objects.equals(this.type, aiGatewayRateLimitUsageResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayRateLimitUsageResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRateLimitUsageResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageType.java new file mode 100644 index 00000000000..97160025f97 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRateLimitUsageType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** AI Gateway rate limit usage resource type. */ +@JsonSerialize(using = AiGatewayRateLimitUsageType.AiGatewayRateLimitUsageTypeSerializer.class) +public class AiGatewayRateLimitUsageType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rate-limit-usage")); + + public static final AiGatewayRateLimitUsageType RATE_LIMIT_USAGE = + new AiGatewayRateLimitUsageType("rate-limit-usage"); + + AiGatewayRateLimitUsageType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRateLimitUsageTypeSerializer + extends StdSerializer { + public AiGatewayRateLimitUsageTypeSerializer(Class t) { + super(t); + } + + public AiGatewayRateLimitUsageTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRateLimitUsageType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRateLimitUsageType fromValue(String value) { + return new AiGatewayRateLimitUsageType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRestrictedDetailsMeta.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRestrictedDetailsMeta.java new file mode 100644 index 00000000000..01efc975e06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRestrictedDetailsMeta.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; + +/** Visibility information for identifying instance details. */ +@JsonPropertyOrder({AiGatewayRestrictedDetailsMeta.JSON_PROPERTY_RESTRICTED_DETAILS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRestrictedDetailsMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESTRICTED_DETAILS = "restricted_details"; + private Boolean restrictedDetails; + + public AiGatewayRestrictedDetailsMeta() {} + + @JsonCreator + public AiGatewayRestrictedDetailsMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_RESTRICTED_DETAILS) + Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + } + + public AiGatewayRestrictedDetailsMeta restrictedDetails(Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + return this; + } + + /** + * Whether identifying rows were withheld from the returned page. Pagination uses the underlying + * rows. + * + * @return restrictedDetails + */ + @JsonProperty(JSON_PROPERTY_RESTRICTED_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRestrictedDetails() { + return restrictedDetails; + } + + public void setRestrictedDetails(Boolean restrictedDetails) { + this.restrictedDetails = restrictedDetails; + } + + /** + * 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 AiGatewayRestrictedDetailsMeta + */ + @JsonAnySetter + public AiGatewayRestrictedDetailsMeta 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 AiGatewayRestrictedDetailsMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRestrictedDetailsMeta aiGatewayRestrictedDetailsMeta = + (AiGatewayRestrictedDetailsMeta) o; + return Objects.equals(this.restrictedDetails, aiGatewayRestrictedDetailsMeta.restrictedDetails) + && Objects.equals( + this.additionalProperties, aiGatewayRestrictedDetailsMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(restrictedDetails, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRestrictedDetailsMeta {\n"); + sb.append(" restrictedDetails: ").append(toIndentedString(restrictedDetails)).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/AiGatewayRoutingReasoningLevel.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingReasoningLevel.java new file mode 100644 index 00000000000..47aa2a17dab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingReasoningLevel.java @@ -0,0 +1,87 @@ +/* + * 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; + +/** + * Optional reasoning effort preference for this model destination. Must be supported by the + * selected model and provider. For provider "*", every eligible provider must support the level. An + * explicit value overrides the request's reasoning setting, subject to model-group policy. Omitted + * or null preserves request and provider behavior; none is an explicit level, not the default. + * Omitted or null clears an override on full replacement. Routing-rule references cannot set this + * field; each referenced model destination owns its override. If an override cannot be applied at + * runtime, the gateway keeps the destination and restores the caller's original reasoning settings, + * or preserves the provider default when omitted. It rechecks all applicable route and model-group + * policies against those settings before sending. Model-group max_reasoning_level enforces hard + * limits; the override is not an additional cap. Normal fallback applies if governance denies the + * resulting request or the destination cannot otherwise serve it. Metrics and span tags record the + * override outcome and incompatibility reason. When response headers have not already been + * committed, X-Ai-Gateway-Reasoning-Override reports applied or not_applied for the + * returned attempt, and X-Ai-Gateway-Reasoning-Override-Reason reports the reason when + * not applied. + */ +@JsonSerialize( + using = AiGatewayRoutingReasoningLevel.AiGatewayRoutingReasoningLevelSerializer.class) +public class AiGatewayRoutingReasoningLevel extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("none", "minimal", "low", "medium", "high", "xhigh", "max")); + + public static final AiGatewayRoutingReasoningLevel NONE = + new AiGatewayRoutingReasoningLevel("none"); + public static final AiGatewayRoutingReasoningLevel MINIMAL = + new AiGatewayRoutingReasoningLevel("minimal"); + public static final AiGatewayRoutingReasoningLevel LOW = + new AiGatewayRoutingReasoningLevel("low"); + public static final AiGatewayRoutingReasoningLevel MEDIUM = + new AiGatewayRoutingReasoningLevel("medium"); + public static final AiGatewayRoutingReasoningLevel HIGH = + new AiGatewayRoutingReasoningLevel("high"); + public static final AiGatewayRoutingReasoningLevel XHIGH = + new AiGatewayRoutingReasoningLevel("xhigh"); + public static final AiGatewayRoutingReasoningLevel MAX = + new AiGatewayRoutingReasoningLevel("max"); + + AiGatewayRoutingReasoningLevel(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRoutingReasoningLevelSerializer + extends StdSerializer { + public AiGatewayRoutingReasoningLevelSerializer(Class t) { + super(t); + } + + public AiGatewayRoutingReasoningLevelSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRoutingReasoningLevel value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRoutingReasoningLevel fromValue(String value) { + return new AiGatewayRoutingReasoningLevel(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleAttributes.java new file mode 100644 index 00000000000..f2055040e76 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleAttributes.java @@ -0,0 +1,251 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Routing rule configuration and metadata. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleAttributes.JSON_PROPERTY_CREATED_AT, + AiGatewayRoutingRuleAttributes.JSON_PROPERTY_ROUTE_ID, + AiGatewayRoutingRuleAttributes.JSON_PROPERTY_TIERS, + AiGatewayRoutingRuleAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ROUTE_ID = "route_id"; + private Long routeId; + + public static final String JSON_PROPERTY_TIERS = "tiers"; + private List tiers = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public AiGatewayRoutingRuleAttributes() {} + + @JsonCreator + public AiGatewayRoutingRuleAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_TIERS) + List tiers, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.tiers = tiers; + for (AiGatewayRoutingRuleTier item : tiers) { + this.unparsed |= item.unparsed; + } + this.updatedAt = updatedAt; + } + + public AiGatewayRoutingRuleAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the resource was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public AiGatewayRoutingRuleAttributes routeId(Long routeId) { + this.routeId = routeId; + return this; + } + + /** + * Stable numeric route identifier used by scoped policies. + * + * @return routeId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROUTE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRouteId() { + return routeId; + } + + public void setRouteId(Long routeId) { + this.routeId = routeId; + } + + public AiGatewayRoutingRuleAttributes tiers(List tiers) { + this.tiers = tiers; + for (AiGatewayRoutingRuleTier item : tiers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRoutingRuleAttributes addTiersItem(AiGatewayRoutingRuleTier tiersItem) { + this.tiers.add(tiersItem); + this.unparsed |= tiersItem.unparsed; + return this; + } + + /** + * Gettiers + * + * @return tiers + */ + @JsonProperty(JSON_PROPERTY_TIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTiers() { + return tiers; + } + + public void setTiers(List tiers) { + this.tiers = tiers; + if (tiers != null) { + for (AiGatewayRoutingRuleTier item : tiers) { + this.unparsed |= item.unparsed; + } + } + } + + public AiGatewayRoutingRuleAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time when the resource was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 AiGatewayRoutingRuleAttributes + */ + @JsonAnySetter + public AiGatewayRoutingRuleAttributes 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 AiGatewayRoutingRuleAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleAttributes aiGatewayRoutingRuleAttributes = + (AiGatewayRoutingRuleAttributes) o; + return Objects.equals(this.createdAt, aiGatewayRoutingRuleAttributes.createdAt) + && Objects.equals(this.routeId, aiGatewayRoutingRuleAttributes.routeId) + && Objects.equals(this.tiers, aiGatewayRoutingRuleAttributes.tiers) + && Objects.equals(this.updatedAt, aiGatewayRoutingRuleAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, routeId, tiers, updatedAt, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" routeId: ").append(toIndentedString(routeId)).append("\n"); + sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AiGatewayRoutingRuleCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateAttributes.java new file mode 100644 index 00000000000..704c6aca45d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateAttributes.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to create an AI Gateway routing rule. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleCreateAttributes.JSON_PROPERTY_SLUG, + AiGatewayRoutingRuleCreateAttributes.JSON_PROPERTY_TIERS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public static final String JSON_PROPERTY_TIERS = "tiers"; + private List tiers = new ArrayList<>(); + + public AiGatewayRoutingRuleCreateAttributes() {} + + @JsonCreator + public AiGatewayRoutingRuleCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SLUG) String slug, + @JsonProperty(required = true, value = JSON_PROPERTY_TIERS) + List tiers) { + this.slug = slug; + this.tiers = tiers; + for (AiGatewayRoutingRuleTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRoutingRuleCreateAttributes slug(String slug) { + this.slug = slug; + return this; + } + + /** + * Organization-unique resource slug. + * + * @return slug + */ + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + public AiGatewayRoutingRuleCreateAttributes tiers(List tiers) { + this.tiers = tiers; + for (AiGatewayRoutingRuleTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRoutingRuleCreateAttributes addTiersItem( + AiGatewayRoutingRuleTierRequest tiersItem) { + this.tiers.add(tiersItem); + this.unparsed |= tiersItem.unparsed; + return this; + } + + /** + * Gettiers + * + * @return tiers + */ + @JsonProperty(JSON_PROPERTY_TIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTiers() { + return tiers; + } + + public void setTiers(List tiers) { + this.tiers = tiers; + if (tiers != null) { + for (AiGatewayRoutingRuleTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRoutingRuleCreateAttributes + */ + @JsonAnySetter + public AiGatewayRoutingRuleCreateAttributes 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 AiGatewayRoutingRuleCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleCreateAttributes aiGatewayRoutingRuleCreateAttributes = + (AiGatewayRoutingRuleCreateAttributes) o; + return Objects.equals(this.slug, aiGatewayRoutingRuleCreateAttributes.slug) + && Objects.equals(this.tiers, aiGatewayRoutingRuleCreateAttributes.tiers) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(slug, tiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleCreateAttributes {\n"); + sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); + sb.append(" tiers: ").append(toIndentedString(tiers)).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/AiGatewayRoutingRuleCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateData.java new file mode 100644 index 00000000000..d2be73e74ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to create an AI Gateway routing rule. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleCreateData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRoutingRuleCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRoutingRuleCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRoutingRuleType type; + + public AiGatewayRoutingRuleCreateData() {} + + @JsonCreator + public AiGatewayRoutingRuleCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRoutingRuleCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRoutingRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRoutingRuleCreateData attributes( + AiGatewayRoutingRuleCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to create an AI Gateway routing rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRoutingRuleCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRoutingRuleCreateData type(AiGatewayRoutingRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway routing rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleType getType() { + return type; + } + + public void setType(AiGatewayRoutingRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRoutingRuleCreateData + */ + @JsonAnySetter + public AiGatewayRoutingRuleCreateData 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 AiGatewayRoutingRuleCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleCreateData aiGatewayRoutingRuleCreateData = + (AiGatewayRoutingRuleCreateData) o; + return Objects.equals(this.attributes, aiGatewayRoutingRuleCreateData.attributes) + && Objects.equals(this.type, aiGatewayRoutingRuleCreateData.type) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateRequest.java new file mode 100644 index 00000000000..c7dbe0b13cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleCreateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create an AI Gateway routing rule. */ +@JsonPropertyOrder({AiGatewayRoutingRuleCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayRoutingRuleCreateData data; + + public AiGatewayRoutingRuleCreateRequest() {} + + @JsonCreator + public AiGatewayRoutingRuleCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayRoutingRuleCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayRoutingRuleCreateRequest data(AiGatewayRoutingRuleCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to create an AI Gateway routing rule. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleCreateData getData() { + return data; + } + + public void setData(AiGatewayRoutingRuleCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayRoutingRuleCreateRequest + */ + @JsonAnySetter + public AiGatewayRoutingRuleCreateRequest 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 AiGatewayRoutingRuleCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleCreateRequest aiGatewayRoutingRuleCreateRequest = + (AiGatewayRoutingRuleCreateRequest) o; + return Objects.equals(this.data, aiGatewayRoutingRuleCreateRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleListResponse.java new file mode 100644 index 00000000000..2d7f9e5793a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleListResponse.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing AI Gateway routing rules. */ +@JsonPropertyOrder({AiGatewayRoutingRuleListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public AiGatewayRoutingRuleListResponse() {} + + @JsonCreator + public AiGatewayRoutingRuleListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (AiGatewayRoutingRuleResource item : data) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRoutingRuleListResponse data(List data) { + this.data = data; + for (AiGatewayRoutingRuleResource item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRoutingRuleListResponse addDataItem(AiGatewayRoutingRuleResource dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (AiGatewayRoutingRuleResource item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRoutingRuleListResponse + */ + @JsonAnySetter + public AiGatewayRoutingRuleListResponse 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 AiGatewayRoutingRuleListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleListResponse aiGatewayRoutingRuleListResponse = + (AiGatewayRoutingRuleListResponse) o; + return Objects.equals(this.data, aiGatewayRoutingRuleListResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceAttributes.java new file mode 100644 index 00000000000..fa2e1da53fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceAttributes.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes used to replace an AI Gateway routing rule. */ +@JsonPropertyOrder({AiGatewayRoutingRuleReplaceAttributes.JSON_PROPERTY_TIERS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleReplaceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TIERS = "tiers"; + private List tiers = new ArrayList<>(); + + public AiGatewayRoutingRuleReplaceAttributes() {} + + @JsonCreator + public AiGatewayRoutingRuleReplaceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TIERS) + List tiers) { + this.tiers = tiers; + for (AiGatewayRoutingRuleTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRoutingRuleReplaceAttributes tiers(List tiers) { + this.tiers = tiers; + for (AiGatewayRoutingRuleTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRoutingRuleReplaceAttributes addTiersItem( + AiGatewayRoutingRuleTierRequest tiersItem) { + this.tiers.add(tiersItem); + this.unparsed |= tiersItem.unparsed; + return this; + } + + /** + * Gettiers + * + * @return tiers + */ + @JsonProperty(JSON_PROPERTY_TIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTiers() { + return tiers; + } + + public void setTiers(List tiers) { + this.tiers = tiers; + if (tiers != null) { + for (AiGatewayRoutingRuleTierRequest item : tiers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRoutingRuleReplaceAttributes + */ + @JsonAnySetter + public AiGatewayRoutingRuleReplaceAttributes 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 AiGatewayRoutingRuleReplaceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleReplaceAttributes aiGatewayRoutingRuleReplaceAttributes = + (AiGatewayRoutingRuleReplaceAttributes) o; + return Objects.equals(this.tiers, aiGatewayRoutingRuleReplaceAttributes.tiers) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleReplaceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleReplaceAttributes {\n"); + sb.append(" tiers: ").append(toIndentedString(tiers)).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/AiGatewayRoutingRuleReplaceData.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceData.java new file mode 100644 index 00000000000..d29f8f6ee7a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceData.java @@ -0,0 +1,215 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data used to replace an AI Gateway routing rule. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleReplaceData.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRoutingRuleReplaceData.JSON_PROPERTY_ID, + AiGatewayRoutingRuleReplaceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleReplaceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRoutingRuleReplaceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRoutingRuleType type; + + public AiGatewayRoutingRuleReplaceData() {} + + @JsonCreator + public AiGatewayRoutingRuleReplaceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRoutingRuleReplaceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRoutingRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRoutingRuleReplaceData attributes( + AiGatewayRoutingRuleReplaceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes used to replace an AI Gateway routing rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleReplaceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRoutingRuleReplaceAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRoutingRuleReplaceData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayRoutingRuleReplaceData type(AiGatewayRoutingRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway routing rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleType getType() { + return type; + } + + public void setType(AiGatewayRoutingRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRoutingRuleReplaceData + */ + @JsonAnySetter + public AiGatewayRoutingRuleReplaceData 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 AiGatewayRoutingRuleReplaceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleReplaceData aiGatewayRoutingRuleReplaceData = + (AiGatewayRoutingRuleReplaceData) o; + return Objects.equals(this.attributes, aiGatewayRoutingRuleReplaceData.attributes) + && Objects.equals(this.id, aiGatewayRoutingRuleReplaceData.id) + && Objects.equals(this.type, aiGatewayRoutingRuleReplaceData.type) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleReplaceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleReplaceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceRequest.java new file mode 100644 index 00000000000..4c11900dc01 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleReplaceRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to replace an AI Gateway routing rule. */ +@JsonPropertyOrder({AiGatewayRoutingRuleReplaceRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleReplaceRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayRoutingRuleReplaceData data; + + public AiGatewayRoutingRuleReplaceRequest() {} + + @JsonCreator + public AiGatewayRoutingRuleReplaceRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayRoutingRuleReplaceData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayRoutingRuleReplaceRequest data(AiGatewayRoutingRuleReplaceData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data used to replace an AI Gateway routing rule. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleReplaceData getData() { + return data; + } + + public void setData(AiGatewayRoutingRuleReplaceData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayRoutingRuleReplaceRequest + */ + @JsonAnySetter + public AiGatewayRoutingRuleReplaceRequest 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 AiGatewayRoutingRuleReplaceRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleReplaceRequest aiGatewayRoutingRuleReplaceRequest = + (AiGatewayRoutingRuleReplaceRequest) o; + return Objects.equals(this.data, aiGatewayRoutingRuleReplaceRequest.data) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleReplaceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleReplaceRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResource.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResource.java new file mode 100644 index 00000000000..d94da1d2ea6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResource.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** AI Gateway routing rule resource. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleResource.JSON_PROPERTY_ATTRIBUTES, + AiGatewayRoutingRuleResource.JSON_PROPERTY_ID, + AiGatewayRoutingRuleResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AiGatewayRoutingRuleAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRoutingRuleType type; + + public AiGatewayRoutingRuleResource() {} + + @JsonCreator + public AiGatewayRoutingRuleResource( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AiGatewayRoutingRuleAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AiGatewayRoutingRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRoutingRuleResource attributes(AiGatewayRoutingRuleAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Routing rule configuration and metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AiGatewayRoutingRuleAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public AiGatewayRoutingRuleResource id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AiGatewayRoutingRuleResource type(AiGatewayRoutingRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI Gateway routing rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleType getType() { + return type; + } + + public void setType(AiGatewayRoutingRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AiGatewayRoutingRuleResource + */ + @JsonAnySetter + public AiGatewayRoutingRuleResource 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 AiGatewayRoutingRuleResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleResource aiGatewayRoutingRuleResource = (AiGatewayRoutingRuleResource) o; + return Objects.equals(this.attributes, aiGatewayRoutingRuleResource.attributes) + && Objects.equals(this.id, aiGatewayRoutingRuleResource.id) + && Objects.equals(this.type, aiGatewayRoutingRuleResource.type) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResponse.java new file mode 100644 index 00000000000..f68471218fd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing one AI Gateway routing rule. */ +@JsonPropertyOrder({AiGatewayRoutingRuleResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AiGatewayRoutingRuleResource data; + + public AiGatewayRoutingRuleResponse() {} + + @JsonCreator + public AiGatewayRoutingRuleResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AiGatewayRoutingRuleResource data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AiGatewayRoutingRuleResponse data(AiGatewayRoutingRuleResource data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI Gateway routing rule resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleResource getData() { + return data; + } + + public void setData(AiGatewayRoutingRuleResource data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 AiGatewayRoutingRuleResponse + */ + @JsonAnySetter + public AiGatewayRoutingRuleResponse 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 AiGatewayRoutingRuleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleResponse aiGatewayRoutingRuleResponse = (AiGatewayRoutingRuleResponse) o; + return Objects.equals(this.data, aiGatewayRoutingRuleResponse.data) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTarget.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTarget.java new file mode 100644 index 00000000000..46fe67c67e8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTarget.java @@ -0,0 +1,375 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Model target or reference to another routing rule. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleTarget.JSON_PROPERTY_ID, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_MODEL, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_MODEL_ID, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_PROVIDER, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_REASONING_LEVEL, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_SLUG, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_TYPE, + AiGatewayRoutingRuleTarget.JSON_PROPERTY_WEIGHT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleTarget { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_MODEL = "model"; + private String model; + + public static final String JSON_PROPERTY_MODEL_ID = "model_id"; + private Long modelId; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private String provider; + + public static final String JSON_PROPERTY_REASONING_LEVEL = "reasoning_level"; + private JsonNullable reasoningLevel = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRoutingRuleTargetType type; + + public static final String JSON_PROPERTY_WEIGHT = "weight"; + private Long weight; + + public AiGatewayRoutingRuleTarget() {} + + @JsonCreator + public AiGatewayRoutingRuleTarget( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayRoutingRuleTargetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRoutingRuleTarget id(Long id) { + this.id = id; + return this; + } + + /** + * Saved target row ID. On replacement, retain this ID only within its original route and at most + * once. A stale or foreign ID is rejected. minimum: 1 + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public AiGatewayRoutingRuleTarget model(String model) { + this.model = model; + return this; + } + + /** + * Model name or pattern. Omitted when the caller cannot view its provider. + * + * @return model + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public AiGatewayRoutingRuleTarget modelId(Long modelId) { + this.modelId = modelId; + return this; + } + + /** + * Opaque model catalog ID for a concrete model target. New selections require provider View; + * saved selections can be retained without metadata. minimum: 1 + * + * @return modelId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getModelId() { + return modelId; + } + + public void setModelId(Long modelId) { + this.modelId = modelId; + } + + public AiGatewayRoutingRuleTarget provider(String provider) { + this.provider = provider; + return this; + } + + /** + * Provider slug. Omitted for dynamic resolution and when the caller cannot view its provider. + * + * @return provider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } + + public void setProvider(String provider) { + this.provider = provider; + } + + public AiGatewayRoutingRuleTarget reasoningLevel(AiGatewayRoutingReasoningLevel reasoningLevel) { + this.reasoningLevel = JsonNullable.of(reasoningLevel); + return this; + } + + /** + * Optional reasoning effort preference for this model destination. Must be supported by the + * selected model and provider. For provider "*", every eligible provider must support the level. + * An explicit value overrides the request's reasoning setting, subject to model-group policy. + * Omitted or null preserves request and provider behavior; none is an explicit level, not the + * default. Omitted or null clears an override on full replacement. Routing-rule references cannot + * set this field; each referenced model destination owns its override. If an override cannot be + * applied at runtime, the gateway keeps the destination and restores the caller's original + * reasoning settings, or preserves the provider default when omitted. It rechecks all applicable + * route and model-group policies against those settings before sending. Model-group + * max_reasoning_level enforces hard limits; the override is not an additional cap. Normal + * fallback applies if governance denies the resulting request or the destination cannot otherwise + * serve it. Metrics and span tags record the override outcome and incompatibility reason. When + * response headers have not already been committed, X-Ai-Gateway-Reasoning-Override + * reports applied or not_applied for the returned attempt, and + * X-Ai-Gateway-Reasoning-Override-Reason reports the reason when not applied. + * + * @return reasoningLevel + */ + @jakarta.annotation.Nullable + @JsonIgnore + public AiGatewayRoutingReasoningLevel getReasoningLevel() { + return reasoningLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REASONING_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getReasoningLevel_JsonNullable() { + return reasoningLevel; + } + + @JsonProperty(JSON_PROPERTY_REASONING_LEVEL) + public void setReasoningLevel_JsonNullable( + JsonNullable reasoningLevel) { + this.reasoningLevel = reasoningLevel; + } + + public void setReasoningLevel(AiGatewayRoutingReasoningLevel reasoningLevel) { + if (!reasoningLevel.isValid()) { + this.unparsed = true; + } + this.reasoningLevel = JsonNullable.of(reasoningLevel); + } + + public AiGatewayRoutingRuleTarget slug(String slug) { + this.slug = slug; + return this; + } + + /** + * Organization-unique resource slug. + * + * @return slug + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + public AiGatewayRoutingRuleTarget type(AiGatewayRoutingRuleTargetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of routing target. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleTargetType getType() { + return type; + } + + public void setType(AiGatewayRoutingRuleTargetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public AiGatewayRoutingRuleTarget weight(Long weight) { + this.weight = weight; + return this; + } + + /** + * Effective relative weight. Returned only for targets in weighted_affinity tiers. minimum: 1 + * maximum: 10000 + * + * @return weight + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEIGHT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getWeight() { + return weight; + } + + public void setWeight(Long weight) { + this.weight = weight; + } + + /** + * 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 AiGatewayRoutingRuleTarget + */ + @JsonAnySetter + public AiGatewayRoutingRuleTarget 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 AiGatewayRoutingRuleTarget object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleTarget aiGatewayRoutingRuleTarget = (AiGatewayRoutingRuleTarget) o; + return Objects.equals(this.id, aiGatewayRoutingRuleTarget.id) + && Objects.equals(this.model, aiGatewayRoutingRuleTarget.model) + && Objects.equals(this.modelId, aiGatewayRoutingRuleTarget.modelId) + && Objects.equals(this.provider, aiGatewayRoutingRuleTarget.provider) + && Objects.equals(this.reasoningLevel, aiGatewayRoutingRuleTarget.reasoningLevel) + && Objects.equals(this.slug, aiGatewayRoutingRuleTarget.slug) + && Objects.equals(this.type, aiGatewayRoutingRuleTarget.type) + && Objects.equals(this.weight, aiGatewayRoutingRuleTarget.weight) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleTarget.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + id, model, modelId, provider, reasoningLevel, slug, type, weight, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleTarget {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" reasoningLevel: ").append(toIndentedString(reasoningLevel)).append("\n"); + sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).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/AiGatewayRoutingRuleTargetRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTargetRequest.java new file mode 100644 index 00000000000..df94dee9b64 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTargetRequest.java @@ -0,0 +1,388 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Model target or reference to another routing rule used to create or replace a rule. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_ID, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_MODEL, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_MODEL_ID, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_PROVIDER, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_REASONING_LEVEL, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_SLUG, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_TYPE, + AiGatewayRoutingRuleTargetRequest.JSON_PROPERTY_WEIGHT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleTargetRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_MODEL = "model"; + private String model; + + public static final String JSON_PROPERTY_MODEL_ID = "model_id"; + private Long modelId; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private String provider; + + public static final String JSON_PROPERTY_REASONING_LEVEL = "reasoning_level"; + private JsonNullable reasoningLevel = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AiGatewayRoutingRuleTargetType type; + + public static final String JSON_PROPERTY_WEIGHT = "weight"; + private JsonNullable weight = JsonNullable.undefined(); + + public AiGatewayRoutingRuleTargetRequest() {} + + @JsonCreator + public AiGatewayRoutingRuleTargetRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AiGatewayRoutingRuleTargetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AiGatewayRoutingRuleTargetRequest id(Long id) { + this.id = id; + return this; + } + + /** + * Saved target row ID. On replacement, retain this ID only within its original route and at most + * once. A stale or foreign ID is rejected. minimum: 1 + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public AiGatewayRoutingRuleTargetRequest model(String model) { + this.model = model; + return this; + } + + /** + * Model name. Omit when retaining a saved target by ID or selecting a concrete target by + * model_id. + * + * @return model + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public AiGatewayRoutingRuleTargetRequest modelId(Long modelId) { + this.modelId = modelId; + return this; + } + + /** + * Opaque model catalog ID for a concrete model target. New selections require provider View; + * saved selections can be retained without metadata. minimum: 1 + * + * @return modelId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getModelId() { + return modelId; + } + + public void setModelId(Long modelId) { + this.modelId = modelId; + } + + public AiGatewayRoutingRuleTargetRequest provider(String provider) { + this.provider = provider; + return this; + } + + /** + * Provider slug. weighted_affinity requires an explicit provider and does not allow "*". + * + * @return provider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } + + public void setProvider(String provider) { + this.provider = provider; + } + + public AiGatewayRoutingRuleTargetRequest reasoningLevel( + AiGatewayRoutingReasoningLevel reasoningLevel) { + this.reasoningLevel = JsonNullable.of(reasoningLevel); + return this; + } + + /** + * Optional reasoning effort preference for this model destination. Must be supported by the + * selected model and provider. For provider "*", every eligible provider must support the level. + * An explicit value overrides the request's reasoning setting, subject to model-group policy. + * Omitted or null preserves request and provider behavior; none is an explicit level, not the + * default. Omitted or null clears an override on full replacement. Routing-rule references cannot + * set this field; each referenced model destination owns its override. If an override cannot be + * applied at runtime, the gateway keeps the destination and restores the caller's original + * reasoning settings, or preserves the provider default when omitted. It rechecks all applicable + * route and model-group policies against those settings before sending. Model-group + * max_reasoning_level enforces hard limits; the override is not an additional cap. Normal + * fallback applies if governance denies the resulting request or the destination cannot otherwise + * serve it. Metrics and span tags record the override outcome and incompatibility reason. When + * response headers have not already been committed, X-Ai-Gateway-Reasoning-Override + * reports applied or not_applied for the returned attempt, and + * X-Ai-Gateway-Reasoning-Override-Reason reports the reason when not applied. + * + * @return reasoningLevel + */ + @jakarta.annotation.Nullable + @JsonIgnore + public AiGatewayRoutingReasoningLevel getReasoningLevel() { + return reasoningLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REASONING_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getReasoningLevel_JsonNullable() { + return reasoningLevel; + } + + @JsonProperty(JSON_PROPERTY_REASONING_LEVEL) + public void setReasoningLevel_JsonNullable( + JsonNullable reasoningLevel) { + this.reasoningLevel = reasoningLevel; + } + + public void setReasoningLevel(AiGatewayRoutingReasoningLevel reasoningLevel) { + if (!reasoningLevel.isValid()) { + this.unparsed = true; + } + this.reasoningLevel = JsonNullable.of(reasoningLevel); + } + + public AiGatewayRoutingRuleTargetRequest slug(String slug) { + this.slug = slug; + return this; + } + + /** + * Organization-unique routing rule slug. Allowed only in configured tiers. + * + * @return slug + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + public AiGatewayRoutingRuleTargetRequest type(AiGatewayRoutingRuleTargetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of routing target. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleTargetType getType() { + return type; + } + + public void setType(AiGatewayRoutingRuleTargetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public AiGatewayRoutingRuleTargetRequest weight(Long weight) { + this.weight = JsonNullable.of(weight); + return this; + } + + /** + * Relative weight in a weighted_affinity tier. Omitted or null defaults to 1. Weights need not + * total 100. Must be omitted or null in configured tiers. minimum: 1 maximum: 10000 + * + * @return weight + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getWeight() { + return weight.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEIGHT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getWeight_JsonNullable() { + return weight; + } + + @JsonProperty(JSON_PROPERTY_WEIGHT) + public void setWeight_JsonNullable(JsonNullable weight) { + this.weight = weight; + } + + public void setWeight(Long weight) { + this.weight = JsonNullable.of(weight); + } + + /** + * 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 AiGatewayRoutingRuleTargetRequest + */ + @JsonAnySetter + public AiGatewayRoutingRuleTargetRequest 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 AiGatewayRoutingRuleTargetRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleTargetRequest aiGatewayRoutingRuleTargetRequest = + (AiGatewayRoutingRuleTargetRequest) o; + return Objects.equals(this.id, aiGatewayRoutingRuleTargetRequest.id) + && Objects.equals(this.model, aiGatewayRoutingRuleTargetRequest.model) + && Objects.equals(this.modelId, aiGatewayRoutingRuleTargetRequest.modelId) + && Objects.equals(this.provider, aiGatewayRoutingRuleTargetRequest.provider) + && Objects.equals(this.reasoningLevel, aiGatewayRoutingRuleTargetRequest.reasoningLevel) + && Objects.equals(this.slug, aiGatewayRoutingRuleTargetRequest.slug) + && Objects.equals(this.type, aiGatewayRoutingRuleTargetRequest.type) + && Objects.equals(this.weight, aiGatewayRoutingRuleTargetRequest.weight) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleTargetRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + id, model, modelId, provider, reasoningLevel, slug, type, weight, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleTargetRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" reasoningLevel: ").append(toIndentedString(reasoningLevel)).append("\n"); + sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).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/AiGatewayRoutingRuleTargetType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTargetType.java new file mode 100644 index 00000000000..353003eebcd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTargetType.java @@ -0,0 +1,60 @@ +/* + * 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; + +/** Type of routing target. */ +@JsonSerialize( + using = AiGatewayRoutingRuleTargetType.AiGatewayRoutingRuleTargetTypeSerializer.class) +public class AiGatewayRoutingRuleTargetType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("model", "routing-rule")); + + public static final AiGatewayRoutingRuleTargetType MODEL = + new AiGatewayRoutingRuleTargetType("model"); + public static final AiGatewayRoutingRuleTargetType ROUTING_RULE = + new AiGatewayRoutingRuleTargetType("routing-rule"); + + AiGatewayRoutingRuleTargetType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRoutingRuleTargetTypeSerializer + extends StdSerializer { + public AiGatewayRoutingRuleTargetTypeSerializer(Class t) { + super(t); + } + + public AiGatewayRoutingRuleTargetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRoutingRuleTargetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRoutingRuleTargetType fromValue(String value) { + return new AiGatewayRoutingRuleTargetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTier.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTier.java new file mode 100644 index 00000000000..161d94380d2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTier.java @@ -0,0 +1,220 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Routing fallback tier containing targets and their effective ordering. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleTier.JSON_PROPERTY_ORDERING, + AiGatewayRoutingRuleTier.JSON_PROPERTY_ORDERING_ISSUE, + AiGatewayRoutingRuleTier.JSON_PROPERTY_TARGETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleTier { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ORDERING = "ordering"; + private AiGatewayRoutingRuleTierOrdering ordering; + + public static final String JSON_PROPERTY_ORDERING_ISSUE = "ordering_issue"; + private AiGatewayRoutingRuleTierOrderingIssue orderingIssue; + + public static final String JSON_PROPERTY_TARGETS = "targets"; + private List targets = new ArrayList<>(); + + public AiGatewayRoutingRuleTier() {} + + @JsonCreator + public AiGatewayRoutingRuleTier( + @JsonProperty(required = true, value = JSON_PROPERTY_ORDERING) + AiGatewayRoutingRuleTierOrdering ordering, + @JsonProperty(required = true, value = JSON_PROPERTY_TARGETS) + List targets) { + this.ordering = ordering; + this.unparsed |= !ordering.isValid(); + this.targets = targets; + for (AiGatewayRoutingRuleTarget item : targets) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRoutingRuleTier ordering(AiGatewayRoutingRuleTierOrdering ordering) { + this.ordering = ordering; + this.unparsed |= !ordering.isValid(); + return this; + } + + /** + * How a tier orders its targets. + * + * @return ordering + */ + @JsonProperty(JSON_PROPERTY_ORDERING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AiGatewayRoutingRuleTierOrdering getOrdering() { + return ordering; + } + + public void setOrdering(AiGatewayRoutingRuleTierOrdering ordering) { + if (!ordering.isValid()) { + this.unparsed = true; + } + this.ordering = ordering; + } + + /** + * Stored tier ordering is inconsistent. mixed means targets have different supported orderings, + * and unknown means a target has an unsupported ordering. The tier is reported as configured + * without weights. Replace the rule to repair it. Omitted for consistent tiers. A forced deletion + * cannot rewrite a surviving tier with an unknown issue. + * + * @return orderingIssue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDERING_ISSUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiGatewayRoutingRuleTierOrderingIssue getOrderingIssue() { + return orderingIssue; + } + + public AiGatewayRoutingRuleTier targets(List targets) { + this.targets = targets; + for (AiGatewayRoutingRuleTarget item : targets) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRoutingRuleTier addTargetsItem(AiGatewayRoutingRuleTarget targetsItem) { + this.targets.add(targetsItem); + this.unparsed |= targetsItem.unparsed; + return this; + } + + /** + * Gettargets + * + * @return targets + */ + @JsonProperty(JSON_PROPERTY_TARGETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + if (targets != null) { + for (AiGatewayRoutingRuleTarget item : targets) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRoutingRuleTier + */ + @JsonAnySetter + public AiGatewayRoutingRuleTier 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 AiGatewayRoutingRuleTier object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleTier aiGatewayRoutingRuleTier = (AiGatewayRoutingRuleTier) o; + return Objects.equals(this.ordering, aiGatewayRoutingRuleTier.ordering) + && Objects.equals(this.orderingIssue, aiGatewayRoutingRuleTier.orderingIssue) + && Objects.equals(this.targets, aiGatewayRoutingRuleTier.targets) + && Objects.equals(this.additionalProperties, aiGatewayRoutingRuleTier.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ordering, orderingIssue, targets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleTier {\n"); + sb.append(" ordering: ").append(toIndentedString(ordering)).append("\n"); + sb.append(" orderingIssue: ").append(toIndentedString(orderingIssue)).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).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/AiGatewayRoutingRuleTierOrdering.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrdering.java new file mode 100644 index 00000000000..abb690444e3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrdering.java @@ -0,0 +1,60 @@ +/* + * 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; + +/** How a tier orders its targets. */ +@JsonSerialize( + using = AiGatewayRoutingRuleTierOrdering.AiGatewayRoutingRuleTierOrderingSerializer.class) +public class AiGatewayRoutingRuleTierOrdering extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("configured", "weighted_affinity")); + + public static final AiGatewayRoutingRuleTierOrdering CONFIGURED = + new AiGatewayRoutingRuleTierOrdering("configured"); + public static final AiGatewayRoutingRuleTierOrdering WEIGHTED_AFFINITY = + new AiGatewayRoutingRuleTierOrdering("weighted_affinity"); + + AiGatewayRoutingRuleTierOrdering(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRoutingRuleTierOrderingSerializer + extends StdSerializer { + public AiGatewayRoutingRuleTierOrderingSerializer(Class t) { + super(t); + } + + public AiGatewayRoutingRuleTierOrderingSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRoutingRuleTierOrdering value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRoutingRuleTierOrdering fromValue(String value) { + return new AiGatewayRoutingRuleTierOrdering(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrderingIssue.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrderingIssue.java new file mode 100644 index 00000000000..593280e48d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierOrderingIssue.java @@ -0,0 +1,69 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Stored tier ordering is inconsistent. mixed means targets have different supported orderings, and + * unknown means a target has an unsupported ordering. The tier is reported as configured without + * weights. Replace the rule to repair it. Omitted for consistent tiers. A forced deletion cannot + * rewrite a surviving tier with an unknown issue. + */ +@JsonSerialize( + using = + AiGatewayRoutingRuleTierOrderingIssue.AiGatewayRoutingRuleTierOrderingIssueSerializer.class) +public class AiGatewayRoutingRuleTierOrderingIssue extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("mixed", "unknown")); + + public static final AiGatewayRoutingRuleTierOrderingIssue MIXED = + new AiGatewayRoutingRuleTierOrderingIssue("mixed"); + public static final AiGatewayRoutingRuleTierOrderingIssue UNKNOWN = + new AiGatewayRoutingRuleTierOrderingIssue("unknown"); + + AiGatewayRoutingRuleTierOrderingIssue(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRoutingRuleTierOrderingIssueSerializer + extends StdSerializer { + public AiGatewayRoutingRuleTierOrderingIssueSerializer( + Class t) { + super(t); + } + + public AiGatewayRoutingRuleTierOrderingIssueSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRoutingRuleTierOrderingIssue value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRoutingRuleTierOrderingIssue fromValue(String value) { + return new AiGatewayRoutingRuleTierOrderingIssue(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierRequest.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierRequest.java new file mode 100644 index 00000000000..3a4caa69220 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleTierRequest.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Routing fallback tier used to create or replace a rule. */ +@JsonPropertyOrder({ + AiGatewayRoutingRuleTierRequest.JSON_PROPERTY_ORDERING, + AiGatewayRoutingRuleTierRequest.JSON_PROPERTY_TARGETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AiGatewayRoutingRuleTierRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ORDERING = "ordering"; + private JsonNullable ordering = + JsonNullable.of( + AiGatewayNullableRoutingRuleTierOrdering.CONFIGURED); + + public static final String JSON_PROPERTY_TARGETS = "targets"; + private List targets = new ArrayList<>(); + + public AiGatewayRoutingRuleTierRequest() {} + + @JsonCreator + public AiGatewayRoutingRuleTierRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TARGETS) + List targets) { + this.targets = targets; + for (AiGatewayRoutingRuleTargetRequest item : targets) { + this.unparsed |= item.unparsed; + } + } + + public AiGatewayRoutingRuleTierRequest ordering( + AiGatewayNullableRoutingRuleTierOrdering ordering) { + this.ordering = JsonNullable.of(ordering); + return this; + } + + /** + * How a tier orders its targets. Omitted or null defaults to configured, which preserves target + * order. The weighted_affinity ordering distributes first-choice assignments by relative target + * weights and accepts only model targets with an explicit provider, without repeated provider and + * model pairs in the same tier. + * + * @return ordering + */ + @jakarta.annotation.Nullable + @JsonIgnore + public AiGatewayNullableRoutingRuleTierOrdering getOrdering() { + return ordering.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORDERING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getOrdering_JsonNullable() { + return ordering; + } + + @JsonProperty(JSON_PROPERTY_ORDERING) + public void setOrdering_JsonNullable( + JsonNullable ordering) { + this.ordering = ordering; + } + + public void setOrdering(AiGatewayNullableRoutingRuleTierOrdering ordering) { + if (!ordering.isValid()) { + this.unparsed = true; + } + this.ordering = JsonNullable.of(ordering); + } + + public AiGatewayRoutingRuleTierRequest targets(List targets) { + this.targets = targets; + for (AiGatewayRoutingRuleTargetRequest item : targets) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AiGatewayRoutingRuleTierRequest addTargetsItem( + AiGatewayRoutingRuleTargetRequest targetsItem) { + this.targets.add(targetsItem); + this.unparsed |= targetsItem.unparsed; + return this; + } + + /** + * Gettargets + * + * @return targets + */ + @JsonProperty(JSON_PROPERTY_TARGETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + if (targets != null) { + for (AiGatewayRoutingRuleTargetRequest item : targets) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 AiGatewayRoutingRuleTierRequest + */ + @JsonAnySetter + public AiGatewayRoutingRuleTierRequest 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 AiGatewayRoutingRuleTierRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AiGatewayRoutingRuleTierRequest aiGatewayRoutingRuleTierRequest = + (AiGatewayRoutingRuleTierRequest) o; + return Objects.equals(this.ordering, aiGatewayRoutingRuleTierRequest.ordering) + && Objects.equals(this.targets, aiGatewayRoutingRuleTierRequest.targets) + && Objects.equals( + this.additionalProperties, aiGatewayRoutingRuleTierRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ordering, targets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiGatewayRoutingRuleTierRequest {\n"); + sb.append(" ordering: ").append(toIndentedString(ordering)).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).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/AiGatewayRoutingRuleType.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleType.java new file mode 100644 index 00000000000..97de4740702 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayRoutingRuleType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** AI Gateway routing rule resource type. */ +@JsonSerialize(using = AiGatewayRoutingRuleType.AiGatewayRoutingRuleTypeSerializer.class) +public class AiGatewayRoutingRuleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("routing-rules")); + + public static final AiGatewayRoutingRuleType ROUTING_RULES = + new AiGatewayRoutingRuleType("routing-rules"); + + AiGatewayRoutingRuleType(String value) { + super(value, allowedValues); + } + + public static class AiGatewayRoutingRuleTypeSerializer + extends StdSerializer { + public AiGatewayRoutingRuleTypeSerializer(Class t) { + super(t); + } + + public AiGatewayRoutingRuleTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewayRoutingRuleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayRoutingRuleType fromValue(String value) { + return new AiGatewayRoutingRuleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewaySupportedOperation.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewaySupportedOperation.java new file mode 100644 index 00000000000..c73f67ad092 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewaySupportedOperation.java @@ -0,0 +1,80 @@ +/* + * 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; + +/** Operation supported by an AI Gateway model. */ +@JsonSerialize(using = AiGatewaySupportedOperation.AiGatewaySupportedOperationSerializer.class) +public class AiGatewaySupportedOperation extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "ANTHROPIC_MESSAGES", + "ANTHROPIC_COUNT_TOKENS", + "OPENAI_CHAT_COMPLETIONS", + "OPENAI_RESPONSES", + "OPENAI_WEB_SEARCH", + "OPENAI_EMBEDDINGS", + "GEMINI_GENERATE_CONTENT", + "GEMINI_RAW_PREDICTIONS")); + + public static final AiGatewaySupportedOperation ANTHROPIC_MESSAGES = + new AiGatewaySupportedOperation("ANTHROPIC_MESSAGES"); + public static final AiGatewaySupportedOperation ANTHROPIC_COUNT_TOKENS = + new AiGatewaySupportedOperation("ANTHROPIC_COUNT_TOKENS"); + public static final AiGatewaySupportedOperation OPENAI_CHAT_COMPLETIONS = + new AiGatewaySupportedOperation("OPENAI_CHAT_COMPLETIONS"); + public static final AiGatewaySupportedOperation OPENAI_RESPONSES = + new AiGatewaySupportedOperation("OPENAI_RESPONSES"); + public static final AiGatewaySupportedOperation OPENAI_WEB_SEARCH = + new AiGatewaySupportedOperation("OPENAI_WEB_SEARCH"); + public static final AiGatewaySupportedOperation OPENAI_EMBEDDINGS = + new AiGatewaySupportedOperation("OPENAI_EMBEDDINGS"); + public static final AiGatewaySupportedOperation GEMINI_GENERATE_CONTENT = + new AiGatewaySupportedOperation("GEMINI_GENERATE_CONTENT"); + public static final AiGatewaySupportedOperation GEMINI_RAW_PREDICTIONS = + new AiGatewaySupportedOperation("GEMINI_RAW_PREDICTIONS"); + + AiGatewaySupportedOperation(String value) { + super(value, allowedValues); + } + + public static class AiGatewaySupportedOperationSerializer + extends StdSerializer { + public AiGatewaySupportedOperationSerializer(Class t) { + super(t); + } + + public AiGatewaySupportedOperationSerializer() { + this(null); + } + + @Override + public void serialize( + AiGatewaySupportedOperation value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewaySupportedOperation fromValue(String value) { + return new AiGatewaySupportedOperation(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AiGatewayZDRMode.java b/src/main/java/com/datadog/api/client/v2/model/AiGatewayZDRMode.java new file mode 100644 index 00000000000..49977b33685 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AiGatewayZDRMode.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** Zero data retention requirement for the organization's requests. */ +@JsonSerialize(using = AiGatewayZDRMode.AiGatewayZDRModeSerializer.class) +public class AiGatewayZDRMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("off", "required")); + + public static final AiGatewayZDRMode OFF = new AiGatewayZDRMode("off"); + public static final AiGatewayZDRMode REQUIRED = new AiGatewayZDRMode("required"); + + AiGatewayZDRMode(String value) { + super(value, allowedValues); + } + + public static class AiGatewayZDRModeSerializer extends StdSerializer { + public AiGatewayZDRModeSerializer(Class t) { + super(t); + } + + public AiGatewayZDRModeSerializer() { + this(null); + } + + @Override + public void serialize(AiGatewayZDRMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AiGatewayZDRMode fromValue(String value) { + return new AiGatewayZDRMode(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature b/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature new file mode 100644 index 00000000000..7c5d3c87c83 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature @@ -0,0 +1,1074 @@ +@endpoint(ai-gateway) @endpoint(ai-gateway-v2) +Feature: AI Gateway + AI Gateway routes your applications' LLM requests to the model providers + you connect, and applies your organization's routing, access, spending, + rate limit, and data capture rules. These endpoints allow you to + configure: - Providers: the model providers your organization connects, + and the models and pricing each offers. - Routing rules: the named routes + your applications call, and the models that serve each one. - Access: + inbound routing policies and model groups that decide who can use which + models. - Budgets and rate limits: spending caps and request limits, and + their current usage. - Data capture and governance: what request data is + recorded, and organization-wide controls. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "AIGateway" API + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Add a model to an AI Gateway provider returns "Bad Request" response + Given operation "CreateAiGatewayModel" enabled + And new "CreateAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Add a model to an AI Gateway provider returns "Created" response + Given operation "CreateAiGatewayModel" enabled + And new "CreateAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Add multiple models to an AI Gateway provider returns "Bad Request" response + Given operation "BulkCreateAiGatewayModels" enabled + And new "BulkCreateAiGatewayModels" request + And request contains "provider_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}]}, "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Add multiple models to an AI Gateway provider returns "Created" response + Given operation "BulkCreateAiGatewayModels" enabled + And new "BulkCreateAiGatewayModels" request + And request contains "provider_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}]}, "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Archive an AI Gateway budget returns "No Content" response + Given operation "DeleteAiGatewayBudget" enabled + And new "DeleteAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Archive an AI Gateway budget returns "Not Found" response + Given operation "DeleteAiGatewayBudget" enabled + And new "DeleteAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Archive an AI Gateway rate limit returns "No Content" response + Given operation "DeleteAiGatewayRateLimit" enabled + And new "DeleteAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Archive an AI Gateway rate limit returns "Not Found" response + Given operation "DeleteAiGatewayRateLimit" enabled + And new "DeleteAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway budget returns "Bad Request" response + Given operation "CreateAiGatewayBudget" enabled + And new "CreateAiGatewayBudget" request + And body with value {"data": {"attributes": {"capacity_microcents": 100000000, "enforcement": "BLOCK", "name": "Coding agents", "selector": [{"dim": "user_id", "per_value": true, "values": ["11111111-1111-1111-1111-111111111111"]}], "tags": {"model": "gpt-5.2-codex"}, "track_existing": false, "warning_threshold": 0.9, "window_policy": "MONTHLY"}, "type": "budgets"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway budget returns "Conflict" response + Given operation "CreateAiGatewayBudget" enabled + And new "CreateAiGatewayBudget" request + And body with value {"data": {"attributes": {"capacity_microcents": 100000000, "enforcement": "BLOCK", "name": "Coding agents", "selector": [{"dim": "user_id", "per_value": true, "values": ["11111111-1111-1111-1111-111111111111"]}], "tags": {"model": "gpt-5.2-codex"}, "track_existing": false, "warning_threshold": 0.9, "window_policy": "MONTHLY"}, "type": "budgets"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway budget returns "Created" response + Given operation "CreateAiGatewayBudget" enabled + And new "CreateAiGatewayBudget" request + And body with value {"data": {"attributes": {"capacity_microcents": 100000000, "enforcement": "BLOCK", "name": "Coding agents", "selector": [{"dim": "user_id", "per_value": true, "values": ["11111111-1111-1111-1111-111111111111"]}], "tags": {"model": "gpt-5.2-codex"}, "track_existing": false, "warning_threshold": 0.9, "window_policy": "MONTHLY"}, "type": "budgets"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway data capture override returns "Bad Request" response + Given operation "CreateAiGatewayDataCaptureOverride" enabled + And new "CreateAiGatewayDataCaptureOverride" request + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway data capture override returns "Conflict" response + Given operation "CreateAiGatewayDataCaptureOverride" enabled + And new "CreateAiGatewayDataCaptureOverride" request + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway data capture override returns "Created" response + Given operation "CreateAiGatewayDataCaptureOverride" enabled + And new "CreateAiGatewayDataCaptureOverride" request + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway model group returns "Bad Request" response + Given operation "CreateAiGatewayModelGroup" enabled + And new "CreateAiGatewayModelGroup" request + And body with value {"data": {"attributes": {"allow_fast_mode": true, "bindings": [{"principals": ["user:55555555-5555-5555-5555-555555555555"], "relation": "runner"}], "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "type": "model-groups"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway model group returns "Conflict" response + Given operation "CreateAiGatewayModelGroup" enabled + And new "CreateAiGatewayModelGroup" request + And body with value {"data": {"attributes": {"allow_fast_mode": true, "bindings": [{"principals": ["user:55555555-5555-5555-5555-555555555555"], "relation": "runner"}], "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "type": "model-groups"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway model group returns "Created" response + Given operation "CreateAiGatewayModelGroup" enabled + And new "CreateAiGatewayModelGroup" request + And body with value {"data": {"attributes": {"allow_fast_mode": true, "bindings": [{"principals": ["user:55555555-5555-5555-5555-555555555555"], "relation": "runner"}], "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "type": "model-groups"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway provider returns "Bad Request" response + Given operation "CreateAiGatewayProvider" enabled + And new "CreateAiGatewayProvider" request + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us"}, "type": "providers"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway provider returns "Conflict" response + Given operation "CreateAiGatewayProvider" enabled + And new "CreateAiGatewayProvider" request + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us"}, "type": "providers"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway provider returns "Created" response + Given operation "CreateAiGatewayProvider" enabled + And new "CreateAiGatewayProvider" request + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us"}, "type": "providers"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway rate limit returns "Bad Request" response + Given operation "CreateAiGatewayRateLimit" enabled + And new "CreateAiGatewayRateLimit" request + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "name": "Default rate limit", "output_tokens_per_minute": null, "requests_per_minute": 600, "team_id": "00000000-0000-4000-8000-000000000002", "user_id": "00000000-0000-4000-8000-000000000001"}, "type": "rate-limits"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway rate limit returns "Conflict" response + Given operation "CreateAiGatewayRateLimit" enabled + And new "CreateAiGatewayRateLimit" request + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "name": "Default rate limit", "output_tokens_per_minute": null, "requests_per_minute": 600, "team_id": "00000000-0000-4000-8000-000000000002", "user_id": "00000000-0000-4000-8000-000000000001"}, "type": "rate-limits"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway rate limit returns "Created" response + Given operation "CreateAiGatewayRateLimit" enabled + And new "CreateAiGatewayRateLimit" request + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "name": "Default rate limit", "output_tokens_per_minute": null, "requests_per_minute": 600, "team_id": "00000000-0000-4000-8000-000000000002", "user_id": "00000000-0000-4000-8000-000000000001"}, "type": "rate-limits"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway routing rule returns "Bad Request" response + Given operation "CreateAiGatewayRoutingRule" enabled + And new "CreateAiGatewayRoutingRule" request + And body with value {"data": {"attributes": {"slug": "coding", "tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway routing rule returns "Conflict" response + Given operation "CreateAiGatewayRoutingRule" enabled + And new "CreateAiGatewayRoutingRule" request + And body with value {"data": {"attributes": {"slug": "coding", "tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create an AI Gateway routing rule returns "Created" response + Given operation "CreateAiGatewayRoutingRule" enabled + And new "CreateAiGatewayRoutingRule" request + And body with value {"data": {"attributes": {"slug": "coding", "tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create or replace an AI Gateway routing policy returns "Bad Request" response + Given operation "UpsertAiGatewayPolicy" enabled + And new "UpsertAiGatewayPolicy" request + And body with value {"data": {"attributes": {"inbound": "coding-agent", "priority": 1, "tiers": [{"priority": 1, "targets": [{"id": 901, "model": "gpt-5.2-codex", "provider": "prod-us"}]}]}, "type": "routing-documents"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Create or replace an AI Gateway routing policy returns "OK" response + Given operation "UpsertAiGatewayPolicy" enabled + And new "UpsertAiGatewayPolicy" request + And body with value {"data": {"attributes": {"inbound": "coding-agent", "priority": 1, "tiers": [{"priority": 1, "targets": [{"id": 901, "model": "gpt-5.2-codex", "provider": "prod-us"}]}]}, "type": "routing-documents"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a model from an AI Gateway provider returns "No Content" response + Given operation "DeleteAiGatewayModel" enabled + And new "DeleteAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a model from an AI Gateway provider returns "Not Found" response + Given operation "DeleteAiGatewayModel" enabled + And new "DeleteAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a model pricing override returns "Bad Request" response + Given operation "DeleteAiGatewayModelPricing" enabled + And new "DeleteAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a model pricing override returns "No Content" response + Given operation "DeleteAiGatewayModelPricing" enabled + And new "DeleteAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a model pricing override returns "Not Found" response + Given operation "DeleteAiGatewayModelPricing" enabled + And new "DeleteAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway data capture override returns "Bad Request" response + Given operation "DeleteAiGatewayDataCaptureOverride" enabled + And new "DeleteAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway data capture override returns "Conflict" response + Given operation "DeleteAiGatewayDataCaptureOverride" enabled + And new "DeleteAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway data capture override returns "No Content" response + Given operation "DeleteAiGatewayDataCaptureOverride" enabled + And new "DeleteAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway data capture override returns "Not Found" response + Given operation "DeleteAiGatewayDataCaptureOverride" enabled + And new "DeleteAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway model group returns "Bad Request" response + Given operation "DeleteAiGatewayModelGroup" enabled + And new "DeleteAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway model group returns "No Content" response + Given operation "DeleteAiGatewayModelGroup" enabled + And new "DeleteAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway model group returns "Not Found" response + Given operation "DeleteAiGatewayModelGroup" enabled + And new "DeleteAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway provider returns "Bad Request" response + Given operation "DeleteAiGatewayProvider" enabled + And new "DeleteAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway provider returns "Conflict" response + Given operation "DeleteAiGatewayProvider" enabled + And new "DeleteAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway provider returns "No Content" response + Given operation "DeleteAiGatewayProvider" enabled + And new "DeleteAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway provider returns "Not Found" response + Given operation "DeleteAiGatewayProvider" enabled + And new "DeleteAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway routing policy returns "No Content" response + Given operation "DeleteAiGatewayPolicy" enabled + And new "DeleteAiGatewayPolicy" request + And request contains "inbound" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway routing policy returns "Not Found" response + Given operation "DeleteAiGatewayPolicy" enabled + And new "DeleteAiGatewayPolicy" request + And request contains "inbound" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway routing rule returns "Conflict" response + Given operation "DeleteAiGatewayRoutingRule" enabled + And new "DeleteAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway routing rule returns "No Content" response + Given operation "DeleteAiGatewayRoutingRule" enabled + And new "DeleteAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete an AI Gateway routing rule returns "Not Found" response + Given operation "DeleteAiGatewayRoutingRule" enabled + And new "DeleteAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:ddoghq/frontier-prd-gateway + Scenario: Get AI Gateway governance controls returns "OK" response + Given operation "GetAiGatewayGovernance" enabled + And new "GetAiGatewayGovernance" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get AI Gateway rate limit usage returns "OK" response + Given operation "GetAiGatewayRateLimitUsage" enabled + And new "GetAiGatewayRateLimitUsage" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get a model pricing override returns "Bad Request" response + Given operation "GetAiGatewayModelPricing" enabled + And new "GetAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get a model pricing override returns "Not Found" response + Given operation "GetAiGatewayModelPricing" enabled + And new "GetAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get a model pricing override returns "OK" response + Given operation "GetAiGatewayModelPricing" enabled + And new "GetAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget instance summary returns "Bad Request" response + Given operation "GetAiGatewayBudgetInstancesSummary" enabled + And new "GetAiGatewayBudgetInstancesSummary" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget instance summary returns "Not Found" response + Given operation "GetAiGatewayBudgetInstancesSummary" enabled + And new "GetAiGatewayBudgetInstancesSummary" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget instance summary returns "OK" response + Given operation "GetAiGatewayBudgetInstancesSummary" enabled + And new "GetAiGatewayBudgetInstancesSummary" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget returns "Not Found" response + Given operation "GetAiGatewayBudget" enabled + And new "GetAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget returns "OK" response + Given operation "GetAiGatewayBudget" enabled + And new "GetAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget's current period returns "Not Found" response + Given operation "GetAiGatewayBudgetCurrentPeriod" enabled + And new "GetAiGatewayBudgetCurrentPeriod" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway budget's current period returns "OK" response + Given operation "GetAiGatewayBudgetCurrentPeriod" enabled + And new "GetAiGatewayBudgetCurrentPeriod" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway model group returns "Bad Request" response + Given operation "GetAiGatewayModelGroup" enabled + And new "GetAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway model group returns "Not Found" response + Given operation "GetAiGatewayModelGroup" enabled + And new "GetAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway model group returns "OK" response + Given operation "GetAiGatewayModelGroup" enabled + And new "GetAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway provider returns "Not Found" response + Given operation "GetAiGatewayProvider" enabled + And new "GetAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway provider returns "OK" response + Given operation "GetAiGatewayProvider" enabled + And new "GetAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway rate limit returns "Not Found" response + Given operation "GetAiGatewayRateLimit" enabled + And new "GetAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway rate limit returns "OK" response + Given operation "GetAiGatewayRateLimit" enabled + And new "GetAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway routing policy returns "Not Found" response + Given operation "GetAiGatewayPolicy" enabled + And new "GetAiGatewayPolicy" request + And request contains "inbound" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway routing policy returns "OK" response + Given operation "GetAiGatewayPolicy" enabled + And new "GetAiGatewayPolicy" request + And request contains "inbound" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway routing rule returns "Not Found" response + Given operation "GetAiGatewayRoutingRule" enabled + And new "GetAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Get an AI Gateway routing rule returns "OK" response + Given operation "GetAiGatewayRoutingRule" enabled + And new "GetAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: Get the AI Gateway data capture configuration returns "OK" response + Given operation "GetAiGatewayDataCaptureConfiguration" enabled + And new "GetAiGatewayDataCaptureConfiguration" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budget instance dimension values returns "Bad Request" response + Given operation "ListAiGatewayBudgetInstanceDimensions" enabled + And new "ListAiGatewayBudgetInstanceDimensions" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budget instance dimension values returns "Not Found" response + Given operation "ListAiGatewayBudgetInstanceDimensions" enabled + And new "ListAiGatewayBudgetInstanceDimensions" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budget instance dimension values returns "OK" response + Given operation "ListAiGatewayBudgetInstanceDimensions" enabled + And new "ListAiGatewayBudgetInstanceDimensions" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budget instances returns "Bad Request" response + Given operation "ListAiGatewayBudgetInstances" enabled + And new "ListAiGatewayBudgetInstances" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budget instances returns "Not Found" response + Given operation "ListAiGatewayBudgetInstances" enabled + And new "ListAiGatewayBudgetInstances" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budget instances returns "OK" response + Given operation "ListAiGatewayBudgetInstances" enabled + And new "ListAiGatewayBudgetInstances" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway budgets returns "OK" response + Given operation "ListAiGatewayBudgets" enabled + And new "ListAiGatewayBudgets" request + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway model groups returns "OK" response + Given operation "ListAiGatewayModelGroups" enabled + And new "ListAiGatewayModelGroups" request + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway models by canonical ID returns "OK" response + Given operation "ListAiGatewayModelsByCanonical" enabled + And new "ListAiGatewayModelsByCanonical" request + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway providers returns "OK" response + Given operation "ListAiGatewayProviders" enabled + And new "ListAiGatewayProviders" request + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway rate limits returns "OK" response + Given operation "ListAiGatewayRateLimits" enabled + And new "ListAiGatewayRateLimits" request + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway routing policies returns "OK" response + Given operation "ListAiGatewayPolicies" enabled + And new "ListAiGatewayPolicies" request + When the request is sent + Then the response status is 200 OK + + @team:ddoghq/frontier-prd-gateway + Scenario: List AI Gateway routing rules returns "OK" response + Given operation "ListAiGatewayRoutingRules" enabled + And new "ListAiGatewayRoutingRules" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List models available from a provider integration returns "Bad Request" response + Given operation "ListAiGatewayProviderModels" enabled + And new "ListAiGatewayProviderModels" request + And request contains "integration_type" parameter from "REPLACE.ME" + And request contains "integration_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List models available from a provider integration returns "OK" response + Given operation "ListAiGatewayProviderModels" enabled + And new "ListAiGatewayProviderModels" request + And request contains "integration_type" parameter from "REPLACE.ME" + And request contains "integration_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: List models for an AI Gateway provider returns "OK" response + Given operation "ListAiGatewayModels" enabled + And new "ListAiGatewayModels" request + And request contains "provider_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Override a budget instance's capacity returns "Bad Request" response + Given operation "OverrideAiGatewayBudgetInstanceCapacity" enabled + And new "OverrideAiGatewayBudgetInstanceCapacity" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"capacity_microcents": 250000000, "instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222", "reason": "Temporary increase for a launch week"}, "type": "budget-instances"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Override a budget instance's capacity returns "Not Found" response + Given operation "OverrideAiGatewayBudgetInstanceCapacity" enabled + And new "OverrideAiGatewayBudgetInstanceCapacity" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"capacity_microcents": 250000000, "instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222", "reason": "Temporary increase for a launch week"}, "type": "budget-instances"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Override a budget instance's capacity returns "OK" response + Given operation "OverrideAiGatewayBudgetInstanceCapacity" enabled + And new "OverrideAiGatewayBudgetInstanceCapacity" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"capacity_microcents": 250000000, "instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222", "reason": "Temporary increase for a launch week"}, "type": "budget-instances"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace AI Gateway governance controls returns "Bad Request" response + Given operation "UpdateAiGatewayGovernance" enabled + And new "UpdateAiGatewayGovernance" request + And body with value {"data": {"attributes": {"data_capture_mode": "metadata_only", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "zdr_mode": "off"}, "id": "organization", "type": "governance"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace AI Gateway governance controls returns "OK" response + Given operation "UpdateAiGatewayGovernance" enabled + And new "UpdateAiGatewayGovernance" request + And body with value {"data": {"attributes": {"data_capture_mode": "metadata_only", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "zdr_mode": "off"}, "id": "organization", "type": "governance"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway data capture override returns "Bad Request" response + Given operation "UpdateAiGatewayDataCaptureOverride" enabled + And new "UpdateAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway data capture override returns "Conflict" response + Given operation "UpdateAiGatewayDataCaptureOverride" enabled + And new "UpdateAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway data capture override returns "Not Found" response + Given operation "UpdateAiGatewayDataCaptureOverride" enabled + And new "UpdateAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway data capture override returns "OK" response + Given operation "UpdateAiGatewayDataCaptureOverride" enabled + And new "UpdateAiGatewayDataCaptureOverride" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"configuration_revision": "capture-revision-1", "metadata_capture": ["tool_usage", "tool_output_size", "tool_names"], "mode": "metadata_only", "name": "Research", "operation": "create", "revision": 1, "scope": {"tags": {"env": "prod"}}}, "id": "11111111-1111-4111-8111-111111111111", "type": "data-capture-overrides"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway routing rule returns "Bad Request" response + Given operation "UpdateAiGatewayRoutingRule" enabled + And new "UpdateAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "id": "coding", "type": "routing-rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway routing rule returns "Conflict" response + Given operation "UpdateAiGatewayRoutingRule" enabled + And new "UpdateAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "id": "coding", "type": "routing-rules"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway routing rule returns "Not Found" response + Given operation "UpdateAiGatewayRoutingRule" enabled + And new "UpdateAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "id": "coding", "type": "routing-rules"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Replace an AI Gateway routing rule returns "OK" response + Given operation "UpdateAiGatewayRoutingRule" enabled + And new "UpdateAiGatewayRoutingRule" request + And request contains "slug" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tiers": [{"ordering": "configured", "targets": [{"id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "id": "coding", "type": "routing-rules"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Reset a budget instance's spend returns "Bad Request" response + Given operation "ResetAiGatewayBudgetInstanceSpend" enabled + And new "ResetAiGatewayBudgetInstanceSpend" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222", "reason": "Credit approved after incorrect usage attribution"}, "type": "budget-instances"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Reset a budget instance's spend returns "Not Found" response + Given operation "ResetAiGatewayBudgetInstanceSpend" enabled + And new "ResetAiGatewayBudgetInstanceSpend" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222", "reason": "Credit approved after incorrect usage attribution"}, "type": "budget-instances"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Reset a budget instance's spend returns "OK" response + Given operation "ResetAiGatewayBudgetInstanceSpend" enabled + And new "ResetAiGatewayBudgetInstanceSpend" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222", "reason": "Credit approved after incorrect usage attribution"}, "type": "budget-instances"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Set a model pricing override returns "Bad Request" response + Given operation "UpdateAiGatewayModelPricing" enabled + And new "UpdateAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"pricing_config": {"rates": {"cache_read_cost_per_mtok": 0.0, "cache_write_cost_per_mtok": 0.0, "non_cached_input_cost_per_mtok": 0.0, "output_cost_per_mtok": 0.0}, "source": {"type": "custom"}, "version": 1}}, "id": "gpt-4o", "type": "model-pricing"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Set a model pricing override returns "Not Found" response + Given operation "UpdateAiGatewayModelPricing" enabled + And new "UpdateAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"pricing_config": {"rates": {"cache_read_cost_per_mtok": 0.0, "cache_write_cost_per_mtok": 0.0, "non_cached_input_cost_per_mtok": 0.0, "output_cost_per_mtok": 0.0}, "source": {"type": "custom"}, "version": 1}}, "id": "gpt-4o", "type": "model-pricing"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Set a model pricing override returns "OK" response + Given operation "UpdateAiGatewayModelPricing" enabled + And new "UpdateAiGatewayModelPricing" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"pricing_config": {"rates": {"cache_read_cost_per_mtok": 0.0, "cache_write_cost_per_mtok": 0.0, "non_cached_input_cost_per_mtok": 0.0, "output_cost_per_mtok": 0.0}, "source": {"type": "custom"}, "version": 1}}, "id": "gpt-4o", "type": "model-pricing"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update a model for an AI Gateway provider returns "Bad Request" response + Given operation "UpdateAiGatewayModel" enabled + And new "UpdateAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "id": "101", "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update a model for an AI Gateway provider returns "Not Found" response + Given operation "UpdateAiGatewayModel" enabled + And new "UpdateAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "id": "101", "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update a model for an AI Gateway provider returns "OK" response + Given operation "UpdateAiGatewayModel" enabled + And new "UpdateAiGatewayModel" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "id": "101", "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway budget returns "Bad Request" response + Given operation "UpdateAiGatewayBudget" enabled + And new "UpdateAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"apply_to_current_period": false, "capacity_microcents": 120000000, "enabled": true, "enforcement": "BLOCK", "name": "Coding agents", "reason": "Temporary capacity increase approved for an incident", "track_existing": false, "warning_threshold": 0.8}, "id": "11111111-1111-1111-1111-111111111111", "type": "budgets"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway budget returns "Not Found" response + Given operation "UpdateAiGatewayBudget" enabled + And new "UpdateAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"apply_to_current_period": false, "capacity_microcents": 120000000, "enabled": true, "enforcement": "BLOCK", "name": "Coding agents", "reason": "Temporary capacity increase approved for an incident", "track_existing": false, "warning_threshold": 0.8}, "id": "11111111-1111-1111-1111-111111111111", "type": "budgets"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway budget returns "OK" response + Given operation "UpdateAiGatewayBudget" enabled + And new "UpdateAiGatewayBudget" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"apply_to_current_period": false, "capacity_microcents": 120000000, "enabled": true, "enforcement": "BLOCK", "name": "Coding agents", "reason": "Temporary capacity increase approved for an incident", "track_existing": false, "warning_threshold": 0.8}, "id": "11111111-1111-1111-1111-111111111111", "type": "budgets"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway model group returns "Bad Request" response + Given operation "UpdateAiGatewayModelGroup" enabled + And new "UpdateAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"allow_fast_mode": true, "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "id": "7", "type": "model-groups"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway model group returns "Conflict" response + Given operation "UpdateAiGatewayModelGroup" enabled + And new "UpdateAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"allow_fast_mode": true, "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "id": "7", "type": "model-groups"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway model group returns "Not Found" response + Given operation "UpdateAiGatewayModelGroup" enabled + And new "UpdateAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"allow_fast_mode": true, "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "id": "7", "type": "model-groups"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway model group returns "OK" response + Given operation "UpdateAiGatewayModelGroup" enabled + And new "UpdateAiGatewayModelGroup" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"allow_fast_mode": true, "max_reasoning_level": "high", "model_ids": [101], "name": "Coding models", "provider_ids": [], "routing_rule_slugs": ["coding-route"]}, "id": "7", "type": "model-groups"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway provider returns "Bad Request" response + Given operation "UpdateAiGatewayProvider" enabled + And new "UpdateAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway provider returns "Conflict" response + Given operation "UpdateAiGatewayProvider" enabled + And new "UpdateAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway provider returns "Not Found" response + Given operation "UpdateAiGatewayProvider" enabled + And new "UpdateAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway provider returns "OK" response + Given operation "UpdateAiGatewayProvider" enabled + And new "UpdateAiGatewayProvider" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway rate limit returns "Bad Request" response + Given operation "UpdateAiGatewayRateLimit" enabled + And new "UpdateAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "output_tokens_per_minute": null, "requests_per_minute": null, "tags": null, "team_id": null, "user_id": null}, "id": "11111111-1111-1111-1111-111111111111", "type": "rate-limits"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway rate limit returns "Conflict" response + Given operation "UpdateAiGatewayRateLimit" enabled + And new "UpdateAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "output_tokens_per_minute": null, "requests_per_minute": null, "tags": null, "team_id": null, "user_id": null}, "id": "11111111-1111-1111-1111-111111111111", "type": "rate-limits"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway rate limit returns "Not Found" response + Given operation "UpdateAiGatewayRateLimit" enabled + And new "UpdateAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "output_tokens_per_minute": null, "requests_per_minute": null, "tags": null, "team_id": null, "user_id": null}, "id": "11111111-1111-1111-1111-111111111111", "type": "rate-limits"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update an AI Gateway rate limit returns "OK" response + Given operation "UpdateAiGatewayRateLimit" enabled + And new "UpdateAiGatewayRateLimit" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"input_tokens_per_minute": null, "mode": "ALERT", "output_tokens_per_minute": null, "requests_per_minute": null, "tags": null, "team_id": null, "user_id": null}, "id": "11111111-1111-1111-1111-111111111111", "type": "rate-limits"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 723033198e0..1dbe50efb1d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -820,6 +820,72 @@ "type": "safe" } }, + "ListAiGatewayBudgets": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayBudget": { + "tag": "AI Gateway", + "undo": { + "type": "unsafe" + } + }, + "DeleteAiGatewayBudget": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayBudget": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpdateAiGatewayBudget": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayBudgetCurrentPeriod": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "ListAiGatewayBudgetInstances": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "OverrideAiGatewayBudgetInstanceCapacity": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "ListAiGatewayBudgetInstanceDimensions": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "ResetAiGatewayBudgetInstanceSpend": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayBudgetInstancesSummary": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, "SearchCases": { "tag": "Case Management", "undo": { @@ -2259,6 +2325,37 @@ "type": "safe" } }, + "GetAiGatewayDataCaptureConfiguration": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayDataCaptureOverride": { + "tag": "AI Gateway", + "undo": { + "operationId": "DeleteAiGatewayDataCaptureOverride", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteAiGatewayDataCaptureOverride": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "UpdateAiGatewayDataCaptureOverride": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "GetAllDatasets": { "tag": "Datasets", "undo": { @@ -3444,6 +3541,18 @@ "type": "safe" } }, + "GetAiGatewayGovernance": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpdateAiGatewayGovernance": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "GetGovernanceConfig": { "tag": "Governance Console", "undo": { @@ -6268,6 +6377,36 @@ "type": "safe" } }, + "ListAiGatewayModelGroups": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayModelGroup": { + "tag": "AI Gateway", + "undo": { + "type": "unsafe" + } + }, + "DeleteAiGatewayModelGroup": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayModelGroup": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpdateAiGatewayModelGroup": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "GetModelLabArtifactContent": { "tag": "Model Lab API", "undo": { @@ -6380,6 +6519,12 @@ "type": "unsafe" } }, + "ListAiGatewayModelsByCanonical": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, "GetMonitorNotificationRules": { "tag": "Monitors", "undo": { @@ -7193,6 +7338,30 @@ "type": "idempotent" } }, + "ListAiGatewayPolicies": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpsertAiGatewayPolicy": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "DeleteAiGatewayPolicy": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayPolicy": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, "ListFindings": { "tag": "Security Monitoring", "undo": { @@ -7413,6 +7582,90 @@ "type": "safe" } }, + "ListAiGatewayProviderModels": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "ListAiGatewayProviders": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayProvider": { + "tag": "AI Gateway", + "undo": { + "type": "unsafe" + } + }, + "DeleteAiGatewayProvider": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayProvider": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpdateAiGatewayProvider": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "ListAiGatewayModels": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayModel": { + "tag": "AI Gateway", + "undo": { + "type": "unsafe" + } + }, + "BulkCreateAiGatewayModels": { + "tag": "AI Gateway", + "undo": { + "type": "unsafe" + } + }, + "DeleteAiGatewayModel": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "UpdateAiGatewayModel": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "DeleteAiGatewayModelPricing": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayModelPricing": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpdateAiGatewayModelPricing": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "GetPrunedTraceByID": { "tag": "APM Trace", "undo": { @@ -7431,6 +7684,42 @@ "type": "idempotent" } }, + "ListAiGatewayRateLimits": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayRateLimit": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayRateLimitUsage": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "DeleteAiGatewayRateLimit": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayRateLimit": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "UpdateAiGatewayRateLimit": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "BatchRowsQuery": { "tag": "Reference Tables", "undo": { @@ -7913,6 +8202,36 @@ "type": "safe" } }, + "DeleteAiGatewayRoutingRule": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "ListAiGatewayRoutingRules": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, + "CreateAiGatewayRoutingRule": { + "tag": "AI Gateway", + "undo": { + "type": "unsafe" + } + }, + "UpdateAiGatewayRoutingRule": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, + "GetAiGatewayRoutingRule": { + "tag": "AI Gateway", + "undo": { + "type": "safe" + } + }, "AggregateRUMEvents": { "tag": "RUM", "undo": { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index 004d39100cb..b2e445cd3b6 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -2849,6 +2849,69 @@ "scenario": "Update GCP scan options returns \"OK\" response", "version": "v2" }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/get-ai-gateway-governance-controls-returns-ok-response.json", + "scenario": "Get AI Gateway governance controls returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/get-the-ai-gateway-data-capture-configuration-returns-ok-response.json", + "scenario": "Get the AI Gateway data capture configuration returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-budgets-returns-ok-response.json", + "scenario": "List AI Gateway budgets returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-model-groups-returns-ok-response.json", + "scenario": "List AI Gateway model groups returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-models-by-canonical-id-returns-ok-response.json", + "scenario": "List AI Gateway models by canonical ID returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-providers-returns-ok-response.json", + "scenario": "List AI Gateway providers returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-rate-limits-returns-ok-response.json", + "scenario": "List AI Gateway rate limits returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-routing-policies-returns-ok-response.json", + "scenario": "List AI Gateway routing policies returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "feature_file": "../../com/datadog/api/client/v2/api/ai_gateway.feature", + "file": "v2/ai-gateway/list-ai-gateway-routing-rules-returns-ok-response.json", + "scenario": "List AI Gateway routing rules returns \"OK\" response", + "version": "v2" + }, { "feature": "AI Guard", "feature_file": "../../com/datadog/api/client/v2/api/ai_guard.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-ai-gateway-governance-controls-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-ai-gateway-governance-controls-returns-ok-response.json new file mode 100644 index 00000000000..9486967b7a3 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-ai-gateway-governance-controls-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/Get AI Gateway governance controls returns \"OK\" response", + "operation_id": "GetAiGatewayGovernance", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/governance" + }, + "scenario": "Get AI Gateway governance controls returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-the-ai-gateway-data-capture-configuration-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-the-ai-gateway-data-capture-configuration-returns-ok-response.json new file mode 100644 index 00000000000..7e755297d5a --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/get-the-ai-gateway-data-capture-configuration-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/Get the AI Gateway data capture configuration returns \"OK\" response", + "operation_id": "GetAiGatewayDataCaptureConfiguration", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/data-capture/configuration" + }, + "scenario": "Get the AI Gateway data capture configuration returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-budgets-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-budgets-returns-ok-response.json new file mode 100644 index 00000000000..6ae96b4cc7a --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-budgets-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway budgets returns \"OK\" response", + "operation_id": "ListAiGatewayBudgets", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/budgets" + }, + "scenario": "List AI Gateway budgets returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-model-groups-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-model-groups-returns-ok-response.json new file mode 100644 index 00000000000..a07a3a546f2 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-model-groups-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway model groups returns \"OK\" response", + "operation_id": "ListAiGatewayModelGroups", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/model-groups" + }, + "scenario": "List AI Gateway model groups returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-models-by-canonical-id-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-models-by-canonical-id-returns-ok-response.json new file mode 100644 index 00000000000..fddb5b288be --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-models-by-canonical-id-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway models by canonical ID returns \"OK\" response", + "operation_id": "ListAiGatewayModelsByCanonical", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/models" + }, + "scenario": "List AI Gateway models by canonical ID returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-providers-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-providers-returns-ok-response.json new file mode 100644 index 00000000000..de7844a94bb --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-providers-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway providers returns \"OK\" response", + "operation_id": "ListAiGatewayProviders", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/providers" + }, + "scenario": "List AI Gateway providers returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-rate-limits-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-rate-limits-returns-ok-response.json new file mode 100644 index 00000000000..f7ac20917f4 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-rate-limits-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway rate limits returns \"OK\" response", + "operation_id": "ListAiGatewayRateLimits", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/rate-limits" + }, + "scenario": "List AI Gateway rate limits returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-policies-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-policies-returns-ok-response.json new file mode 100644 index 00000000000..67199509e37 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-policies-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway routing policies returns \"OK\" response", + "operation_id": "ListAiGatewayPolicies", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/policies" + }, + "scenario": "List AI Gateway routing policies returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-rules-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-rules-returns-ok-response.json new file mode 100644 index 00000000000..2e02a2715ed --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/ai-gateway/list-ai-gateway-routing-rules-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "AIGateway", + "expected_status": 200, + "feature": "AI Gateway", + "id": "v2/AI Gateway/List AI Gateway routing rules returns \"OK\" response", + "operation_id": "ListAiGatewayRoutingRules", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/routing-rules" + }, + "scenario": "List AI Gateway routing rules returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/manifest.json b/src/test/resources/generated-test/test-server-data/manifest.json index ad02abee0b2..02e0c44bbc1 100644 --- a/src/test/resources/generated-test/test-server-data/manifest.json +++ b/src/test/resources/generated-test/test-server-data/manifest.json @@ -115,6 +115,11 @@ "file": "v1/webhooks-integration.json", "version": "v1" }, + { + "feature": "AI Gateway", + "file": "v2/ai-gateway.json", + "version": "v2" + }, { "feature": "AI Guard", "file": "v2/ai-guard.json", diff --git a/src/test/resources/generated-test/test-server-data/v2/ai-gateway.json b/src/test/resources/generated-test/test-server-data/v2/ai-gateway.json new file mode 100644 index 00000000000..2ccdfa997c8 --- /dev/null +++ b/src/test/resources/generated-test/test-server-data/v2/ai-gateway.json @@ -0,0 +1,286 @@ +{ + "feature": "AI Gateway", + "recordings": [ + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:20.832Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/governance", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"organization\",\"type\":\"governance\",\"attributes\":{\"data_capture_mode\":\"metadata_only\",\"zdr_mode\":\"off\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get AI Gateway governance controls returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:21.249Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/data-capture/configuration", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"organization\",\"type\":\"data-capture-configurations\",\"attributes\":{\"configuration_revision\":\"11afe2915c16d2d927dfcaa90d423005579292f36b98f14d572671333f1ffed0\",\"default_mode\":\"metadata_only\",\"overrides\":[]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get the AI Gateway data capture configuration returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:21.398Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/budgets", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway budgets returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-05T20:04:02.701Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/model-groups", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"default\",\"type\":\"model-groups\",\"attributes\":{\"allow_fast_mode\":true,\"created_at\":\"0001-01-01T00:00:00Z\",\"max_reasoning_level\":null,\"model_ids\":[],\"models\":[],\"name\":\"Org-wide access\",\"provider_ids\":[],\"providers\":[],\"revision\":0,\"routing_rules\":[],\"updated_at\":\"0001-01-01T00:00:00Z\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway model groups returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:21.687Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/models", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway models by canonical ID returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:21.837Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/providers", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway providers returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:21.989Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rate-limits", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway rate limits returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:22.128Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/policies", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway routing policies returns \"OK\" response", + "version": "v2" + }, + { + "feature": "AI Gateway", + "frozen_at": "2026-11-03T05:18:22.271Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/routing-rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List AI Gateway routing rules returns \"OK\" response", + "version": "v2" + } + ], + "schema_version": 1, + "version": "v2" +}