/*******************************************************************************
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.Entity;
/**
* The type EntityFetcher.
*/
public class EntityFetcher extends OrcEntityFetcher<Entity,EntityOperations>
implements Readable<Entity> {
/**
* Instantiates a new EntityFetcher.
*
* @param urlComponent the url component
* @param parent the parent
*/
public EntityFetcher(String urlComponent, OrcExecutable parent) {
super(urlComponent, parent, Entity.class, EntityOperations.class);
}
/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public EntityFetcher addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}
/**
* Add header.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public EntityFetcher addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}
public AttachmentFetcher asAttachment(){
return new AttachmentFetcher(this.urlComponent, this.parent);
}
public ItemFetcher asItem(){
return new ItemFetcher(this.urlComponent, this.parent);
}
public UserFetcher asUser(){
return new UserFetcher(this.urlComponent, this.parent);
}
public FolderFetcher asFolder(){
return new FolderFetcher(this.urlComponent, this.parent);
}
public CalendarFetcher asCalendar(){
return new CalendarFetcher(this.urlComponent, this.parent);
}
public CalendarGroupFetcher asCalendarGroup(){
return new CalendarGroupFetcher(this.urlComponent, this.parent);
}
public ContactFolderFetcher asContactFolder(){
return new ContactFolderFetcher(this.urlComponent, this.parent);
}
}