Skip to content

Commit f9b76ca

Browse files
committed
- adds missing mime content download for message
1 parent 2f5a7a5 commit f9b76ca

File tree

6 files changed

+380
-0
lines changed

6 files changed

+380
-0
lines changed

src/main/java/com/microsoft/graph/requests/extensions/IMessageRequestBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public interface IMessageRequestBuilder extends IRequestBuilder {
5858
ISingleValueLegacyExtendedPropertyCollectionRequestBuilder singleValueExtendedProperties();
5959

6060
ISingleValueLegacyExtendedPropertyRequestBuilder singleValueExtendedProperties(final String id);
61+
62+
IMessageStreamRequestBuilder content();
6163
IMessageCopyRequestBuilder copy(final String destinationId);
6264
IMessageMoveRequestBuilder move(final String destinationId);
6365
IMessageCreateForwardRequestBuilder createForward(final java.util.List<Recipient> toRecipients, final Message message, final String comment);
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.Message;
11+
import com.microsoft.graph.models.extensions.Recipient;
12+
import com.microsoft.graph.requests.extensions.IAttachmentCollectionRequestBuilder;
13+
import com.microsoft.graph.requests.extensions.IAttachmentRequestBuilder;
14+
import com.microsoft.graph.requests.extensions.IExtensionCollectionRequestBuilder;
15+
import com.microsoft.graph.requests.extensions.IExtensionRequestBuilder;
16+
import com.microsoft.graph.requests.extensions.IMultiValueLegacyExtendedPropertyCollectionRequestBuilder;
17+
import com.microsoft.graph.requests.extensions.IMultiValueLegacyExtendedPropertyRequestBuilder;
18+
import com.microsoft.graph.requests.extensions.ISingleValueLegacyExtendedPropertyCollectionRequestBuilder;
19+
import com.microsoft.graph.requests.extensions.ISingleValueLegacyExtendedPropertyRequestBuilder;
20+
import java.util.Arrays;
21+
import java.util.EnumSet;
22+
import com.microsoft.graph.http.IHttpStreamRequest;
23+
24+
import java.io.InputStream;
25+
26+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
27+
28+
/**
29+
* The interface for the Message Stream Request.
30+
*/
31+
public interface IMessageStreamRequest extends IHttpStreamRequest {
32+
33+
/**
34+
* Gets the contents of this stream
35+
*
36+
* @param callback the callback to be called after success or failure
37+
*/
38+
void get(final ICallback<InputStream> callback);
39+
40+
/**
41+
* Gets the contents of this stream
42+
*
43+
* @return the stream that the caller needs to close
44+
* @throws ClientException an exception occurs if there was an error while the request was sent
45+
*/
46+
InputStream get() throws ClientException;
47+
48+
/**
49+
* Uploads to the stream
50+
*
51+
* @param fileContents the contents of the stream to upload
52+
* @param callback the callback to be called after success or failure
53+
*/
54+
void put(final byte[] fileContents, final ICallback<? super Message> callback);
55+
56+
/**
57+
* Uploads to the stream
58+
*
59+
* @param fileContents the contents of the stream to upload
60+
* @return the result of the upload
61+
* @throws ClientException an exception occurs if there was an error while the request was sent
62+
*/
63+
Message put(final byte[] fileContents) throws ClientException;
64+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.Message;
11+
import com.microsoft.graph.models.extensions.Recipient;
12+
import com.microsoft.graph.requests.extensions.IAttachmentCollectionRequestBuilder;
13+
import com.microsoft.graph.requests.extensions.IAttachmentRequestBuilder;
14+
import com.microsoft.graph.requests.extensions.IExtensionCollectionRequestBuilder;
15+
import com.microsoft.graph.requests.extensions.IExtensionRequestBuilder;
16+
import com.microsoft.graph.requests.extensions.IMultiValueLegacyExtendedPropertyCollectionRequestBuilder;
17+
import com.microsoft.graph.requests.extensions.IMultiValueLegacyExtendedPropertyRequestBuilder;
18+
import com.microsoft.graph.requests.extensions.ISingleValueLegacyExtendedPropertyCollectionRequestBuilder;
19+
import com.microsoft.graph.requests.extensions.ISingleValueLegacyExtendedPropertyRequestBuilder;
20+
import java.util.Arrays;
21+
import java.util.EnumSet;
22+
import com.microsoft.graph.requests.extensions.IMessageStreamRequestBuilder;
23+
24+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
25+
26+
/**
27+
* The interface for the Message Stream Request Builder.
28+
*/
29+
public interface IMessageStreamRequestBuilder extends IRequestBuilder {
30+
31+
/**
32+
* Creates the request
33+
*
34+
* @param requestOptions the options for this request
35+
* @return the IMessageStreamRequest instance
36+
*/
37+
IMessageStreamRequest buildRequest(final com.microsoft.graph.options.Option... requestOptions);
38+
39+
/**
40+
* Creates the request with specific options instead of the existing options
41+
*
42+
* @param requestOptions the options for this request
43+
* @return the IMessageStreamRequest instance
44+
*/
45+
IMessageStreamRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions);
46+
47+
IAttachmentCollectionRequestBuilder attachments();
48+
49+
IAttachmentRequestBuilder attachments(final String id);
50+
51+
IExtensionCollectionRequestBuilder extensions();
52+
53+
IExtensionRequestBuilder extensions(final String id);
54+
55+
IMultiValueLegacyExtendedPropertyCollectionRequestBuilder multiValueExtendedProperties();
56+
57+
IMultiValueLegacyExtendedPropertyRequestBuilder multiValueExtendedProperties(final String id);
58+
59+
ISingleValueLegacyExtendedPropertyCollectionRequestBuilder singleValueExtendedProperties();
60+
61+
ISingleValueLegacyExtendedPropertyRequestBuilder singleValueExtendedProperties(final String id);
62+
63+
64+
65+
IMessageCopyRequestBuilder copy(final String destinationId);
66+
IMessageMoveRequestBuilder move(final String destinationId);
67+
IMessageCreateForwardRequestBuilder createForward(final java.util.List<Recipient> toRecipients, final Message message, final String comment);
68+
IMessageCreateReplyRequestBuilder createReply(final Message message, final String comment);
69+
IMessageCreateReplyAllRequestBuilder createReplyAll(final Message message, final String comment);
70+
IMessageForwardRequestBuilder forward(final java.util.List<Recipient> toRecipients, final Message message, final String comment);
71+
IMessageReplyRequestBuilder reply(final Message message, final String comment);
72+
IMessageReplyAllRequestBuilder replyAll(final Message message, final String comment);
73+
IMessageSendRequestBuilder send();
74+
75+
IMessageDeltaCollectionRequestBuilder delta();
76+
77+
}

src/main/java/com/microsoft/graph/requests/extensions/MessageRequestBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ public ISingleValueLegacyExtendedPropertyRequestBuilder singleValueExtendedPrope
9898
return new SingleValueLegacyExtendedPropertyRequestBuilder(getRequestUrlWithAdditionalSegment("singleValueExtendedProperties") + "/" + id, getClient(), null);
9999
}
100100

101+
public IMessageStreamRequestBuilder content() {
102+
return new MessageStreamRequestBuilder(getRequestUrlWithAdditionalSegment("$value"), getClient(), null);
103+
}
104+
101105
public IMessageCopyRequestBuilder copy(final String destinationId) {
102106
return new MessageCopyRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.copy"), getClient(), null, destinationId);
103107
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.Message;
11+
import com.microsoft.graph.models.extensions.Recipient;
12+
import com.microsoft.graph.requests.extensions.IAttachmentCollectionRequestBuilder;
13+
import com.microsoft.graph.requests.extensions.IAttachmentRequestBuilder;
14+
import com.microsoft.graph.requests.extensions.AttachmentCollectionRequestBuilder;
15+
import com.microsoft.graph.requests.extensions.AttachmentRequestBuilder;
16+
import com.microsoft.graph.requests.extensions.IExtensionCollectionRequestBuilder;
17+
import com.microsoft.graph.requests.extensions.IExtensionRequestBuilder;
18+
import com.microsoft.graph.requests.extensions.ExtensionCollectionRequestBuilder;
19+
import com.microsoft.graph.requests.extensions.ExtensionRequestBuilder;
20+
import com.microsoft.graph.requests.extensions.IMultiValueLegacyExtendedPropertyCollectionRequestBuilder;
21+
import com.microsoft.graph.requests.extensions.IMultiValueLegacyExtendedPropertyRequestBuilder;
22+
import com.microsoft.graph.requests.extensions.MultiValueLegacyExtendedPropertyCollectionRequestBuilder;
23+
import com.microsoft.graph.requests.extensions.MultiValueLegacyExtendedPropertyRequestBuilder;
24+
import com.microsoft.graph.requests.extensions.ISingleValueLegacyExtendedPropertyCollectionRequestBuilder;
25+
import com.microsoft.graph.requests.extensions.ISingleValueLegacyExtendedPropertyRequestBuilder;
26+
import com.microsoft.graph.requests.extensions.SingleValueLegacyExtendedPropertyCollectionRequestBuilder;
27+
import com.microsoft.graph.requests.extensions.SingleValueLegacyExtendedPropertyRequestBuilder;
28+
import java.util.Arrays;
29+
import java.util.EnumSet;
30+
import com.microsoft.graph.core.IBaseClient;
31+
import com.microsoft.graph.http.BaseStreamRequest;
32+
33+
import java.io.InputStream;
34+
35+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
36+
37+
/**
38+
* The class for the Message Stream Request.
39+
*/
40+
public class MessageStreamRequest extends BaseStreamRequest<Message> implements IMessageStreamRequest {
41+
42+
/**
43+
* The request for the Message
44+
*
45+
* @param requestUrl the request URL
46+
* @param client the service client
47+
* @param requestOptions the options for this request
48+
*/
49+
public MessageStreamRequest(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
50+
super(requestUrl, client, requestOptions, Message.class);
51+
}
52+
53+
/**
54+
* Gets the contents of this stream
55+
*
56+
* @param callback the callback to be called after success or failure
57+
*/
58+
public void get(final ICallback<InputStream> callback) {
59+
send(callback);
60+
}
61+
62+
/**
63+
* Gets the contents of this stream
64+
*
65+
* @return the stream that the caller needs to close
66+
* @throws ClientException an exception occurs if there was an error while the request was sent
67+
*/
68+
public InputStream get() throws ClientException {
69+
return send();
70+
}
71+
72+
/**
73+
* Uploads to the stream
74+
*
75+
* @param fileContents the contents of the stream to upload
76+
* @param callback the callback to be called after success or failure
77+
*/
78+
public void put(final byte[] fileContents, final ICallback<? super Message> callback) {
79+
send(fileContents, callback);
80+
}
81+
82+
/**
83+
* Uploads to the stream
84+
*
85+
* @param fileContents the contents of the stream to upload
86+
* @return the result of the upload
87+
* @throws ClientException an exception occurs if there was an error while the request was sent
88+
*/
89+
public Message put(final byte[] fileContents) throws ClientException {
90+
return send(fileContents);
91+
}
92+
}

0 commit comments

Comments
 (0)