Interface ValidationException.Builder
- All Superinterfaces:
AwsServiceException.Builder,Buildable,CopyableBuilder<ValidationException.Builder,,ValidationException> PartnerCentralMarketingException.Builder,SdkBuilder<ValidationException.Builder,,ValidationException> SdkException.Builder,SdkPojo,SdkServiceException.Builder
- Enclosing class:
ValidationException
-
Method Summary
Modifier and TypeMethodDescriptionawsErrorDetails(AwsErrorDetails awsErrorDetails) Specifies the additional awsErrorDetails from the service response.Specifies the exception that caused this exception to occur.fieldList(Collection<ValidationExceptionField> fieldList) Every field that failed, not just the first.fieldList(Consumer<ValidationExceptionField.Builder>... fieldList) Every field that failed, not just the first.fieldList(ValidationExceptionField... fieldList) Every field that failed, not just the first.Specifies the details of this exception.numAttempts(Integer numAttempts) The single coarse reason the request was rejected, for a caller that does not care which field.reason(ValidationExceptionReason reason) The single coarse reason the request was rejected, for a caller that does not care which field.Specifies the requestId returned by the called service.statusCode(int statusCode) Specifies the status code returned by the service.writableStackTrace(Boolean writableStackTrace) Specifies whether the stack trace in this exception can be written.Methods inherited from interface software.amazon.awssdk.awscore.exception.AwsServiceException.Builder
awsErrorDetails, build, clockSkew, clockSkew, extendedRequestIdMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.exception.SdkException.Builder
cause, message, numAttempts, writableStackTraceMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFieldsMethods inherited from interface software.amazon.awssdk.core.exception.SdkServiceException.Builder
extendedRequestId, requestId, statusCode
-
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.Builderavoiding the need to create one manually viaValidationExceptionField.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tofieldList(List<ValidationExceptionField>).- Parameters:
fieldList- a consumer that will call methods onValidationExceptionField.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
awsErrorDetails
Description copied from interface:AwsServiceException.BuilderSpecifies the additional awsErrorDetails from the service response.- Specified by:
awsErrorDetailsin interfaceAwsServiceException.Builder- Specified by:
awsErrorDetailsin interfacePartnerCentralMarketingException.Builder- Parameters:
awsErrorDetails- Object containing additional details from the response.- Returns:
- This object for method chaining.
-
message
Description copied from interface:SdkException.BuilderSpecifies the details of this exception.- Specified by:
messagein interfaceAwsServiceException.Builder- Specified by:
messagein interfacePartnerCentralMarketingException.Builder- Specified by:
messagein interfaceSdkException.Builder- Specified by:
messagein interfaceSdkServiceException.Builder- Parameters:
message- The details of this exception.- Returns:
- This method for object chaining
-
requestId
Description copied from interface:SdkServiceException.BuilderSpecifies the requestId returned by the called service.- Specified by:
requestIdin interfaceAwsServiceException.Builder- Specified by:
requestIdin interfacePartnerCentralMarketingException.Builder- Specified by:
requestIdin interfaceSdkServiceException.Builder- Parameters:
requestId- A string that identifies the request made to a service.- Returns:
- This object for method chaining.
-
statusCode
Description copied from interface:SdkServiceException.BuilderSpecifies the status code returned by the service.- Specified by:
statusCodein interfaceAwsServiceException.Builder- Specified by:
statusCodein interfacePartnerCentralMarketingException.Builder- Specified by:
statusCodein interfaceSdkServiceException.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.BuilderSpecifies the exception that caused this exception to occur.- Specified by:
causein interfaceAwsServiceException.Builder- Specified by:
causein interfacePartnerCentralMarketingException.Builder- Specified by:
causein interfaceSdkException.Builder- Specified by:
causein interfaceSdkServiceException.Builder- Parameters:
cause- The exception that caused this exception to occur.- Returns:
- This object for method chaining.
-
writableStackTrace
Description copied from interface:SdkException.BuilderSpecifies whether the stack trace in this exception can be written.- Specified by:
writableStackTracein interfacePartnerCentralMarketingException.Builder- Specified by:
writableStackTracein interfaceSdkException.Builder- Specified by:
writableStackTracein interfaceSdkServiceException.Builder- Parameters:
writableStackTrace- Whether the stack trace can be written.- Returns:
- This method for object chaining
-
numAttempts
- Specified by:
numAttemptsin interfaceAwsServiceException.Builder- Specified by:
numAttemptsin interfacePartnerCentralMarketingException.Builder- Specified by:
numAttemptsin interfaceSdkException.Builder- Specified by:
numAttemptsin interfaceSdkServiceException.Builder- Parameters:
numAttempts- The attempt count- Returns:
- This method for object chaining
-