/******************************************************************************* Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the MIT or Apache License; see LICENSE in the source repository root for authoritative license information. **NOTE** This code was generated by a tool and will occasionally be overwritten. We welcome comments and issues regarding this code; they will be addressed in the generation tool. If you wish to submit pull requests, please do so for the templates in that tool. This code was generated by Vipr (https://github.com/microsoft/vipr) using the T4TemplateWriter (https://github.com/msopentech/vipr-t4templatewriter). ******************************************************************************/ package com.microsoft.services.outlook.fetchers; import com.microsoft.services.orc.core.*; import com.microsoft.services.orc.core.Readable; import com.microsoft.services.outlook.Folder; import com.microsoft.services.outlook.Message; /** * The type FolderFetcher. */ public class FolderFetcher extends OrcEntityFetcher<Folder,FolderOperations> implements Readable<Folder> { /** * Instantiates a new FolderFetcher. * * @param urlComponent the url component * @param parent the parent */ public FolderFetcher(String urlComponent, OrcExecutable parent) { super(urlComponent, parent, Folder.class, FolderOperations.class); } /** * Add parameter. * * @param name the name * @param value the value * @return the fetcher */ public FolderFetcher addParameter(String name, Object value) { addCustomParameter(name, value); return this; } /** * Add header. * * @param name the name * @param value the value * @return the fetcher */ public FolderFetcher addHeader(String name, String value) { addCustomHeader(name, value); return this; } /** * Gets child folders. * * @return the child folders */ public OrcCollectionFetcher<Folder, FolderFetcher, FolderCollectionOperations> getChildFolders() { return new OrcCollectionFetcher<Folder, FolderFetcher, FolderCollectionOperations>("ChildFolders", this, Folder.class, FolderCollectionOperations.class); } /** * Gets child folder. * * @return the child folder */ public FolderFetcher getChildFolder(String id){ return new OrcCollectionFetcher<Folder, FolderFetcher, FolderCollectionOperations>("ChildFolders", this, Folder.class, FolderCollectionOperations.class).getById(id); } /** * Gets messages. * * @return the messages */ public OrcCollectionFetcher<Message, MessageFetcher, MessageCollectionOperations> getMessages() { return new OrcCollectionFetcher<Message, MessageFetcher, MessageCollectionOperations>("Messages", this, Message.class, MessageCollectionOperations.class); } /** * Gets message. * * @return the message */ public MessageFetcher getMessage(String id){ return new OrcCollectionFetcher<Message, MessageFetcher, MessageCollectionOperations>("Messages", this, Message.class, MessageCollectionOperations.class).getById(id); } }