/** * Creates a new label. * * Create a request for the method "labels.create". * * This request holds the parameters needed by the the gmail server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. <p> {@link * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor. </p> * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Label} * @since 1.13 */ protected Create(java.lang.String userId, com.google.api.services.gmail.model.Label content) { super(Gmail.this, "POST", REST_PATH, content, com.google.api.services.gmail.model.Label.class); this.userId = com.google.api.client.util.Preconditions.checkNotNull(userId, "Required parameter userId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getLabelListVisibility(), "Label.getLabelListVisibility()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getMessageListVisibility(), "Label.getMessageListVisibility()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getName(), "Label.getName()"); }