All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.inspector.model.InvalidCrossAccountRoleException Maven / Gradle / Ivy

/*
 * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.inspector.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Amazon Inspector cannot assume the cross-account role that it needs to list your EC2 instances during the assessment * run. *

*/ @Generated("software.amazon.awssdk:codegen") public class InvalidCrossAccountRoleException extends InspectorException implements ToCopyableBuilder { private final Boolean canRetry; private final String inspectorErrorCode; private InvalidCrossAccountRoleException(BuilderImpl builder) { super(builder.message); this.canRetry = builder.canRetry; this.inspectorErrorCode = builder.inspectorErrorCode; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } /** *

* You can immediately retry your request. *

* * @return You can immediately retry your request. */ public Boolean canRetry() { return canRetry; } /** *

* Code that indicates the type of error that is generated. *

* * @return Code that indicates the type of error that is generated. * @see InvalidCrossAccountRoleErrorCode */ public String inspectorErrorCode() { return inspectorErrorCode; } public interface Builder extends CopyableBuilder { /** *

* You can immediately retry your request. *

* * @param canRetry * You can immediately retry your request. * @return Returns a reference to this object so that method calls can be chained together. */ Builder canRetry(Boolean canRetry); /** *

* Code that indicates the type of error that is generated. *

* * @param inspectorErrorCode * Code that indicates the type of error that is generated. * @return Returns a reference to this object so that method calls can be chained together. * @see InvalidCrossAccountRoleErrorCode */ Builder inspectorErrorCode(String inspectorErrorCode); /** *

* Code that indicates the type of error that is generated. *

* * @param inspectorErrorCode * Code that indicates the type of error that is generated. * @return Returns a reference to this object so that method calls can be chained together. * @see InvalidCrossAccountRoleErrorCode */ Builder inspectorErrorCode(InvalidCrossAccountRoleErrorCode inspectorErrorCode); Builder message(String message); } private static final class BuilderImpl implements Builder { private Boolean canRetry; private String inspectorErrorCode; private String message; private BuilderImpl() { } private BuilderImpl(InvalidCrossAccountRoleException model) { setCanRetry(model.canRetry); setInspectorErrorCode(model.inspectorErrorCode); this.message = model.getMessage(); } public final Boolean getCanRetry() { return canRetry; } @Override public final Builder canRetry(Boolean canRetry) { this.canRetry = canRetry; return this; } @JsonProperty("canRetry") public final void setCanRetry(Boolean canRetry) { this.canRetry = canRetry; } public final String getInspectorErrorCode() { return inspectorErrorCode; } @Override public final Builder inspectorErrorCode(String inspectorErrorCode) { this.inspectorErrorCode = inspectorErrorCode; return this; } @Override public final Builder inspectorErrorCode(InvalidCrossAccountRoleErrorCode inspectorErrorCode) { this.inspectorErrorCode(inspectorErrorCode.toString()); return this; } @JsonProperty("errorCode") public final void setInspectorErrorCode(String inspectorErrorCode) { this.inspectorErrorCode = inspectorErrorCode; } public final void setInspectorErrorCode(InvalidCrossAccountRoleErrorCode inspectorErrorCode) { this.inspectorErrorCode(inspectorErrorCode.toString()); } public String getMessage() { return message; } public String message() { return message; } public void setMessage(String message) { this.message = message; } @Override public Builder message(String message) { this.message = message; return this; } @Override public InvalidCrossAccountRoleException build() { return new InvalidCrossAccountRoleException(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy