/** * Creates a new note. * * <p>Sample code: * * <pre><code> * try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * String noteId = ""; * Note note = Note.newBuilder().build(); * Note response = grafeasV1Beta1Client.createNote(parent, noteId, note); * } * </code></pre> * * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the * note is to be created. * @param noteId The ID to use for this note. * @param note The note to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Note createNote(ProjectName parent, String noteId, Note note) { CreateNoteRequest request = CreateNoteRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setNoteId(noteId) .setNote(note) .build(); return createNote(request); }
/** * Creates a new note. * * <p>Sample code: * * <pre><code> * try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * String noteId = ""; * Note note = Note.newBuilder().build(); * Note response = grafeasV1Beta1Client.createNote(parent.toString(), noteId, note); * } * </code></pre> * * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the * note is to be created. * @param noteId The ID to use for this note. * @param note The note to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Note createNote(String parent, String noteId, Note note) { CreateNoteRequest request = CreateNoteRequest.newBuilder().setParent(parent).setNoteId(noteId).setNote(note).build(); return createNote(request); }