Interface ValidationException.Builder

  • Method Details

    • reason

      The single coarse reason the request was rejected, for a caller that does not care which field.

      Parameters:
      reason - The single coarse reason the request was rejected, for a caller that does not care which field.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • reason

      The single coarse reason the request was rejected, for a caller that does not care which field.

      Parameters:
      reason - The single coarse reason the request was rejected, for a caller that does not care which field.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • fieldList

      Every field that failed, not just the first.

      ⚠️ **Every field, deliberately.** The convention comment carried by most internal models — *"if more than one field caused the error, pick one and elaborate in the message"* — is the reading this service does NOT take: a partner editing a form would then discover their errors one request at a time. The whole request is validated and the full set reported, so one round of fixes is one call.

      Each entry names a member of the request just sent, and only that: the value to change and send again. A template field value is `Name` `FieldValues` with the template field in `FieldId`, one entry per failing field.

      When it is present. Only when the refusal points at something the partner fixes in a form, and then every such refusal carries it: - `UpdateCampaignAsset`: `FieldValues` (including a file the content scan declined, which is why a partner handles image failures and text failures the same way, through this list), `Layout`, `SendMode` and `ScheduledSendAt`; - `CreateCampaign` and `UpdateCampaign`: campaign settings and files; - `GetCampaignTemplate`: `Identifier`.

      Every other `ValidationException` carries `Message` only — tags, ARNs, social connections, exports, and `CAMPAIGN_INCOMPLETE`, whose missing settings are not members of the request it refuses.

      Parameters:
      fieldList - Every field that failed, not just the first.

      ⚠️ **Every field, deliberately.** The convention comment carried by most internal models — *"if more than one field caused the error, pick one and elaborate in the message"* — is the reading this service does NOT take: a partner editing a form would then discover their errors one request at a time. The whole request is validated and the full set reported, so one round of fixes is one call.

      Each entry names a member of the request just sent, and only that: the value to change and send again. A template field value is `Name` `FieldValues` with the template field in `FieldId`, one entry per failing field.

      When it is present. Only when the refusal points at something the partner fixes in a form, and then every such refusal carries it: - `UpdateCampaignAsset`: `FieldValues` (including a file the content scan declined, which is why a partner handles image failures and text failures the same way, through this list), `Layout`, `SendMode` and `ScheduledSendAt`; - `CreateCampaign` and `UpdateCampaign`: campaign settings and files; - `GetCampaignTemplate`: `Identifier`.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fieldList

      Every field that failed, not just the first.

      ⚠️ **Every field, deliberately.** The convention comment carried by most internal models — *"if more than one field caused the error, pick one and elaborate in the message"* — is the reading this service does NOT take: a partner editing a form would then discover their errors one request at a time. The whole request is validated and the full set reported, so one round of fixes is one call.

      Each entry names a member of the request just sent, and only that: the value to change and send again. A template field value is `Name` `FieldValues` with the template field in `FieldId`, one entry per failing field.

      When it is present. Only when the refusal points at something the partner fixes in a form, and then every such refusal carries it: - `UpdateCampaignAsset`: `FieldValues` (including a file the content scan declined, which is why a partner handles image failures and text failures the same way, through this list), `Layout`, `SendMode` and `ScheduledSendAt`; - `CreateCampaign` and `UpdateCampaign`: campaign settings and files; - `GetCampaignTemplate`: `Identifier`.

      Every other `ValidationException` carries `Message` only — tags, ARNs, social connections, exports, and `CAMPAIGN_INCOMPLETE`, whose missing settings are not members of the request it refuses.

      Parameters:
      fieldList - Every field that failed, not just the first.

      ⚠️ **Every field, deliberately.** The convention comment carried by most internal models — *"if more than one field caused the error, pick one and elaborate in the message"* — is the reading this service does NOT take: a partner editing a form would then discover their errors one request at a time. The whole request is validated and the full set reported, so one round of fixes is one call.

      Each entry names a member of the request just sent, and only that: the value to change and send again. A template field value is `Name` `FieldValues` with the template field in `FieldId`, one entry per failing field.

      When it is present. Only when the refusal points at something the partner fixes in a form, and then every such refusal carries it: - `UpdateCampaignAsset`: `FieldValues` (including a file the content scan declined, which is why a partner handles image failures and text failures the same way, through this list), `Layout`, `SendMode` and `ScheduledSendAt`; - `CreateCampaign` and `UpdateCampaign`: campaign settings and files; - `GetCampaignTemplate`: `Identifier`.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fieldList

      Every field that failed, not just the first.

      ⚠️ **Every field, deliberately.** The convention comment carried by most internal models — *"if more than one field caused the error, pick one and elaborate in the message"* — is the reading this service does NOT take: a partner editing a form would then discover their errors one request at a time. The whole request is validated and the full set reported, so one round of fixes is one call.

      Each entry names a member of the request just sent, and only that: the value to change and send again. A template field value is `Name` `FieldValues` with the template field in `FieldId`, one entry per failing field.

      When it is present. Only when the refusal points at something the partner fixes in a form, and then every such refusal carries it: - `UpdateCampaignAsset`: `FieldValues` (including a file the content scan declined, which is why a partner handles image failures and text failures the same way, through this list), `Layout`, `SendMode` and `ScheduledSendAt`; - `CreateCampaign` and `UpdateCampaign`: campaign settings and files; - `GetCampaignTemplate`: `Identifier`.

      Every other `ValidationException` carries `Message` only — tags, ARNs, social connections, exports, and `CAMPAIGN_INCOMPLETE`, whose missing settings are not members of the request it refuses. This is a convenience method that creates an instance of the ValidationExceptionField.Builder avoiding the need to create one manually via ValidationExceptionField.builder().

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

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

      ValidationException.Builder awsErrorDetails(AwsErrorDetails awsErrorDetails)
      Description copied from interface: AwsServiceException.Builder
      Specifies the additional awsErrorDetails from the service response.
      Specified by:
      awsErrorDetails in interface AwsServiceException.Builder
      Specified by:
      awsErrorDetails in interface PartnerCentralMarketingException.Builder
      Parameters:
      awsErrorDetails - Object containing additional details from the response.
      Returns:
      This object for method chaining.
    • message

      Description copied from interface: SdkException.Builder
      Specifies the details of this exception.
      Specified by:
      message in interface AwsServiceException.Builder
      Specified by:
      message in interface PartnerCentralMarketingException.Builder
      Specified by:
      message in interface SdkException.Builder
      Specified by:
      message in interface SdkServiceException.Builder
      Parameters:
      message - The details of this exception.
      Returns:
      This method for object chaining
    • requestId

      ValidationException.Builder requestId(String requestId)
      Description copied from interface: SdkServiceException.Builder
      Specifies the requestId returned by the called service.
      Specified by:
      requestId in interface AwsServiceException.Builder
      Specified by:
      requestId in interface PartnerCentralMarketingException.Builder
      Specified by:
      requestId in interface SdkServiceException.Builder
      Parameters:
      requestId - A string that identifies the request made to a service.
      Returns:
      This object for method chaining.
    • statusCode

      ValidationException.Builder statusCode(int statusCode)
      Description copied from interface: SdkServiceException.Builder
      Specifies the status code returned by the service.
      Specified by:
      statusCode in interface AwsServiceException.Builder
      Specified by:
      statusCode in interface PartnerCentralMarketingException.Builder
      Specified by:
      statusCode in interface SdkServiceException.Builder
      Parameters:
      statusCode - an int containing the status code returned by the service.
      Returns:
      This method for object chaining.
    • cause

      Description copied from interface: SdkException.Builder
      Specifies the exception that caused this exception to occur.
      Specified by:
      cause in interface AwsServiceException.Builder
      Specified by:
      cause in interface PartnerCentralMarketingException.Builder
      Specified by:
      cause in interface SdkException.Builder
      Specified by:
      cause in interface SdkServiceException.Builder
      Parameters:
      cause - The exception that caused this exception to occur.
      Returns:
      This object for method chaining.
    • writableStackTrace

      ValidationException.Builder writableStackTrace(Boolean writableStackTrace)
      Description copied from interface: SdkException.Builder
      Specifies whether the stack trace in this exception can be written.
      Specified by:
      writableStackTrace in interface PartnerCentralMarketingException.Builder
      Specified by:
      writableStackTrace in interface SdkException.Builder
      Specified by:
      writableStackTrace in interface SdkServiceException.Builder
      Parameters:
      writableStackTrace - Whether the stack trace can be written.
      Returns:
      This method for object chaining
    • numAttempts

      ValidationException.Builder numAttempts(Integer numAttempts)
      Specified by:
      numAttempts in interface AwsServiceException.Builder
      Specified by:
      numAttempts in interface PartnerCentralMarketingException.Builder
      Specified by:
      numAttempts in interface SdkException.Builder
      Specified by:
      numAttempts in interface SdkServiceException.Builder
      Parameters:
      numAttempts - The attempt count
      Returns:
      This method for object chaining