public Builder validate()

in tchannel-core/src/main/java/com/uber/tchannel/messages/Request.java [430:448]


        public Builder validate() {
            if (service == null) {
                throw new IllegalStateException("`service` cannot be null.");
            }

            if (arg1 == null && endpoint == null) {
                throw new IllegalStateException("`arg1` or `endpoint` cannot be null.");
            }

            if (ttl <= 0) {
                throw new IllegalStateException("`timeout` must be greater than 0.");
            }

            if (retryLimit < 0) {
                throw new IllegalStateException("`retryLimit` must be greater equal to 0.");
            }

            return this;
        }