protected ProgressEvent validate()

in aws-ec2-transitgatewaymulticastgroupmember/src/main/java/software/amazon/ec2/transitgatewaymulticastgroupmember/workflow/create/CreatePrecheck.java [48:65]


    protected ProgressEvent<ResourceModel, CallbackContext> validate() {
        if(!this.model.getTransitGatewayMulticastDomainId().startsWith("tgw-mcast-domain-") || this.model.getGroupIpAddress().split("[.]").length != 4 || !this.model.getNetworkInterfaceId().startsWith("eni-")) {
            return this.invalidModel();
        } else {
            ResourceModel current = this.makeRequest();
            if(current != null) {
                CfnResourceConflictException exception =  new CfnResourceConflictException(ResourceModel.TYPE_NAME, model.getPrimaryIdentifier().toString().replace("/properties/", ""), "Cannot be modified by ACTION: CREATE. A resource with the primary identifier already exists");
                return ProgressEvent.<ResourceModel, CallbackContext>builder()
                        .resourceModel(model)
                        .status(OperationStatus.FAILED)
                        .errorCode(HandlerErrorCode.AlreadyExists)
                        .message(exception.getMessage())
                        .build();
            } else {
                return this.progress;
            }
        }
    }