/*******************************************************************************
**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).
Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved.
Licensed under the Apache License 2.0; see LICENSE in the source repository
root for authoritative license information.
******************************************************************************/
package com.microsoft.services.graph.fetchers;
import com.microsoft.services.graph.*;
import com.google.common.util.concurrent.*;
import com.microsoft.services.orc.core.*;
import com.microsoft.services.orc.core.Readable;
/**
* The type Event
.
*/
public class EventFetcher extends OrcEntityFetcher<Event,EventOperations>
implements Readable<Event> {
/**
* Instantiates a new EventFetcher.
*
* @param urlComponent the url component
* @param parent the parent
*/
public EventFetcher(String urlComponent, OrcExecutable parent) {
super(urlComponent, parent, Event.class, EventOperations.class);
}
/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public EventFetcher addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}
/**
* Add header.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public EventFetcher addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}
/**
* Gets attachments.
*
* @return the attachments
*/
public OrcCollectionFetcher<Attachment, AttachmentFetcher, AttachmentCollectionOperations> getAttachments() {
return new OrcCollectionFetcher<Attachment, AttachmentFetcher, AttachmentCollectionOperations>("Attachments", this, Attachment.class, AttachmentCollectionOperations.class);
}
/**
* Gets attachment.
*
* @return the attachment
*/
public AttachmentFetcher getAttachment(String id){
return new OrcCollectionFetcher<Attachment, AttachmentFetcher, AttachmentCollectionOperations>("Attachments", this, Attachment.class, AttachmentCollectionOperations.class).getById(id);
}
/**
* Gets calendar.
*
* @return the calendar
*/
public CalendarFetcher getCalendar() {
return new CalendarFetcher("Calendar", this);
}
/**
* Gets instances.
*
* @return the instances
*/
public OrcCollectionFetcher<Event, EventFetcher, EventCollectionOperations> getInstances() {
return new OrcCollectionFetcher<Event, EventFetcher, EventCollectionOperations>("Instances", this, Event.class, EventCollectionOperations.class);
}
/**
* Gets instance.
*
* @return the instance
*/
public EventFetcher getInstance(String id){
return new OrcCollectionFetcher<Event, EventFetcher, EventCollectionOperations>("Instances", this, Event.class, EventCollectionOperations.class).getById(id);
}
}