Interface PolicyGenerationAsset.Builder

  • Method Details

    • policyGenerationAssetId

      PolicyGenerationAsset.Builder policyGenerationAssetId(String policyGenerationAssetId)

      The unique identifier for this generated policy asset within the policy generation request. This ID can be used to reference specific generated policy options when creating actual policies from the generation results.

      Parameters:
      policyGenerationAssetId - The unique identifier for this generated policy asset within the policy generation request. This ID can be used to reference specific generated policy options when creating actual policies from the generation results.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • definition

      Sets the value of the Definition property for this object.
      Parameters:
      definition - The new value for the Definition property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • definition

      Sets the value of the Definition property for this object. This is a convenience method that creates an instance of the PolicyDefinition.Builder avoiding the need to create one manually via PolicyDefinition.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to definition(PolicyDefinition).

      Parameters:
      definition - a consumer that will call methods on PolicyDefinition.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • rawTextFragment

      PolicyGenerationAsset.Builder rawTextFragment(String rawTextFragment)

      The portion of the original natural language input that this generated policy asset addresses. This helps users understand which part of their policy description was translated into this specific Cedar policy statement, enabling better policy selection and refinement. When a single natural language input describes multiple authorization requirements, the generation process creates separate policy assets for each requirement, with each asset's rawTextFragment showing which requirement it addresses. Use this mapping to verify that all parts of your natural language input were correctly translated into Cedar policies.

      Parameters:
      rawTextFragment - The portion of the original natural language input that this generated policy asset addresses. This helps users understand which part of their policy description was translated into this specific Cedar policy statement, enabling better policy selection and refinement. When a single natural language input describes multiple authorization requirements, the generation process creates separate policy assets for each requirement, with each asset's rawTextFragment showing which requirement it addresses. Use this mapping to verify that all parts of your natural language input were correctly translated into Cedar policies.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • findings

      Analysis findings and insights related to this specific generated policy asset. These findings may include validation results, potential issues, or recommendations for improvement to help users evaluate the quality and appropriateness of the generated policy.

      Parameters:
      findings - Analysis findings and insights related to this specific generated policy asset. These findings may include validation results, potential issues, or recommendations for improvement to help users evaluate the quality and appropriateness of the generated policy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • findings

      PolicyGenerationAsset.Builder findings(Finding... findings)

      Analysis findings and insights related to this specific generated policy asset. These findings may include validation results, potential issues, or recommendations for improvement to help users evaluate the quality and appropriateness of the generated policy.

      Parameters:
      findings - Analysis findings and insights related to this specific generated policy asset. These findings may include validation results, potential issues, or recommendations for improvement to help users evaluate the quality and appropriateness of the generated policy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • findings

      Analysis findings and insights related to this specific generated policy asset. These findings may include validation results, potential issues, or recommendations for improvement to help users evaluate the quality and appropriateness of the generated policy.

      This is a convenience method that creates an instance of the Finding.Builder avoiding the need to create one manually via Finding.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to findings(List<Finding>).

      Parameters:
      findings - a consumer that will call methods on Finding.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: