Class AnalysisRequestRule

java.lang.Object
com.datadog.api.client.v2.model.AnalysisRequestRule

@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AnalysisRequestRule extends Object
A static analysis rule to apply during code analysis. Clients forward complete rule objects returned by the rulesets endpoints, so every member of that resource is declared here; only id, category, checksum, language, severity, tree_sitter_query, entity_checked, regex, type and code are read by this operation and the rest are ignored. The schema stays open so that any member beyond the forwarded rule resource is reported as a promotion candidate rather than rejected; it can be closed once that telemetry confirms none remain.
  • Field Details

  • Constructor Details

  • Method Details

    • arguments

      public AnalysisRequestRule arguments(List<AnalysisRequestRuleArgument> arguments)
    • addArgumentsItem

      public AnalysisRequestRule addArgumentsItem(AnalysisRequestRuleArgument argumentsItem)
    • getArguments

      @Nullable public List<AnalysisRequestRuleArgument> getArguments()
      The configurable arguments accepted by the rule. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      arguments
    • setArguments

      public void setArguments(List<AnalysisRequestRuleArgument> arguments)
    • category

      public AnalysisRequestRule category(String category)
    • getCategory

      public String getCategory()
      The category of the rule (for example, BEST_PRACTICES, SECURITY).
      Returns:
      category
    • setCategory

      public void setCategory(String category)
    • checksum

      public AnalysisRequestRule checksum(String checksum)
    • getChecksum

      public String getChecksum()
      A checksum of the rule definition.
      Returns:
      checksum
    • setChecksum

      public void setChecksum(String checksum)
    • code

      public AnalysisRequestRule code(String code)
    • getCode

      public String getCode()
      The base64-encoded rule implementation code.
      Returns:
      code
    • setCode

      public void setCode(String code)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      The date and time when the rule was created. Server-assigned by the rulesets endpoints; ignored by this operation.
      Returns:
      createdAt
    • getCreatedBy

      @Nullable public String getCreatedBy()
      The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation.
      Returns:
      createdBy
    • creationMessage

      public AnalysisRequestRule creationMessage(String creationMessage)
    • getCreationMessage

      @Nullable public String getCreationMessage()
      The message associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation.
      Returns:
      creationMessage
    • setCreationMessage

      public void setCreationMessage(String creationMessage)
    • cve

      public AnalysisRequestRule cve(String cve)
    • getCve

      @Nullable public String getCve()
      The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      cve
    • setCve

      public void setCve(String cve)
    • cwe

      public AnalysisRequestRule cwe(String cwe)
    • getCwe

      @Nullable public String getCwe()
      The CWE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      cwe
    • setCwe

      public void setCwe(String cwe)
    • description

      public AnalysisRequestRule description(String description)
    • getDescription

      @Nullable public String getDescription()
      A detailed explanation of what the rule detects. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      description
    • setDescription

      public void setDescription(String description)
    • documentationUrl

      public AnalysisRequestRule documentationUrl(String documentationUrl)
    • getDocumentationUrl

      @Nullable public String getDocumentationUrl()
      A URL pointing to the rule documentation. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      documentationUrl
    • setDocumentationUrl

      public void setDocumentationUrl(String documentationUrl)
    • entityChecked

      public AnalysisRequestRule entityChecked(String entityChecked)
    • getEntityChecked

      @Nullable public String getEntityChecked()
      The code entity type checked by the rule, applicable when rule type is AST_CHECK.
      Returns:
      entityChecked
    • getEntityChecked_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<String> getEntityChecked_JsonNullable()
    • setEntityChecked_JsonNullable

      public void setEntityChecked_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> entityChecked)
    • setEntityChecked

      public void setEntityChecked(String entityChecked)
    • id

      public AnalysisRequestRule id(String id)
    • getId

      public String getId()
      The unique identifier of the rule.
      Returns:
      id
    • setId

      public void setId(String id)
    • isPublished

      public AnalysisRequestRule isPublished(Boolean isPublished)
    • getIsPublished

      @Nullable public Boolean getIsPublished()
      Whether the rule is published. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      isPublished
    • setIsPublished

      public void setIsPublished(Boolean isPublished)
    • isTesting

      public AnalysisRequestRule isTesting(Boolean isTesting)
    • getIsTesting

      @Nullable public Boolean getIsTesting()
      Whether the rule is in testing mode. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      isTesting
    • setIsTesting

      public void setIsTesting(Boolean isTesting)
    • language

      public AnalysisRequestRule language(String language)
    • getLanguage

      public String getLanguage()
      The programming language this rule targets.
      Returns:
      language
    • setLanguage

      public void setLanguage(String language)
    • getLastUpdatedAt

      @Nullable public OffsetDateTime getLastUpdatedAt()
      The date and time when the rule was last modified. Server-assigned by the rulesets endpoints; ignored by this operation.
      Returns:
      lastUpdatedAt
    • getLastUpdatedBy

      @Nullable public String getLastUpdatedBy()
      The identifier of the user or system that last updated the rule. Server-assigned by the rulesets endpoints; ignored by this operation.
      Returns:
      lastUpdatedBy
    • name

      public AnalysisRequestRule name(String name)
    • getName

      @Nullable public String getName()
      The name of the rule. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      name
    • setName

      public void setName(String name)
    • regex

      public AnalysisRequestRule regex(String regex)
    • getRegex

      @Nullable public String getRegex()
      A base64-encoded regex pattern used by the rule, applicable when rule type is REGEX .
      Returns:
      regex
    • getRegex_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<String> getRegex_JsonNullable()
    • setRegex_JsonNullable

      public void setRegex_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> regex)
    • setRegex

      public void setRegex(String regex)
    • severity

      public AnalysisRequestRule severity(String severity)
    • getSeverity

      public String getSeverity()
      The severity of findings from this rule (for example, ERROR, WARNING ).
      Returns:
      severity
    • setSeverity

      public void setSeverity(String severity)
    • shortDescription

      public AnalysisRequestRule shortDescription(String shortDescription)
    • getShortDescription

      @Nullable public String getShortDescription()
      A brief summary of what the rule detects. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      shortDescription
    • setShortDescription

      public void setShortDescription(String shortDescription)
    • shouldUseAiFix

      public AnalysisRequestRule shouldUseAiFix(Boolean shouldUseAiFix)
    • getShouldUseAiFix

      @Nullable public Boolean getShouldUseAiFix()
      Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      shouldUseAiFix
    • setShouldUseAiFix

      public void setShouldUseAiFix(Boolean shouldUseAiFix)
    • tags

      public AnalysisRequestRule tags(List<String> tags)
    • addTagsItem

      public AnalysisRequestRule addTagsItem(String tagsItem)
    • getTags

      @Nullable public List<String> getTags()
      Tags associated with the custom rule revision. Forwarded from the custom rulesets endpoints; ignored by this operation.
      Returns:
      tags
    • setTags

      public void setTags(List<String> tags)
    • tests

    • addTestsItem

      public AnalysisRequestRule addTestsItem(AnalysisRequestRuleTest testsItem)
    • getTests

      @Nullable public List<AnalysisRequestRuleTest> getTests()
      The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation.
      Returns:
      tests
    • setTests

      public void setTests(List<AnalysisRequestRuleTest> tests)
    • treeSitterQuery

      public AnalysisRequestRule treeSitterQuery(String treeSitterQuery)
    • getTreeSitterQuery

      public String getTreeSitterQuery()
      The base64-encoded tree-sitter query used by the rule.
      Returns:
      treeSitterQuery
    • setTreeSitterQuery

      public void setTreeSitterQuery(String treeSitterQuery)
    • type

      public AnalysisRequestRule type(String type)
    • getType

      public String getType()
      The rule type indicating the detection mechanism (for example, TREE_SITTER_QUERY).
      Returns:
      type
    • setType

      public void setType(String type)
    • versionId

      public AnalysisRequestRule versionId(Long versionId)
    • getVersionId

      @Nullable public Long getVersionId()
      The custom rule revision version. Forwarded from the custom rulesets endpoints; ignored by this operation.
      Returns:
      versionId
    • setVersionId

      public void setVersionId(Long versionId)
    • putAdditionalProperty

      public AnalysisRequestRule putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - The arbitrary key to set
      value - The associated value
      Returns:
      AnalysisRequestRule
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      The additional properties
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - The arbitrary key to get
      Returns:
      The specific additional property for the given key
    • equals

      public boolean equals(Object o)
      Return true if this AnalysisRequestRule object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object