title: Spring Boot request body semi-required fields
body: <p>In our application user can write a message based on user id or screen name.</p>
  
  <pre><code>class Message {
      public final Long userId;
      public final String screenName;
      public final String text;
  
      @JsonCreator
      public Message(@JsonProperty(value = "user_id", required = ???) Long userId,
                     @JsonProperty(value = "screen_name", required = ???) String screenName,
                     @JsonProperty(value = "text", required = true) String text) {
          this.userId = userId;
          this.screenName = screenName;
          this.text = text;
      }
  }
  </code></pre>
  
  <p>Fields userId and screenName can't be optional at same time, one should be provided.</p>
  
  <p>How in Spring Boot to mark that they are semi-required?</p>