Skip to content

Commit 7196032

Browse files
Merge pull request #845 from microsoftgraph/v1.0/pipelinebuild/54101
Generated v1.0 models and request builders using Typewriter
2 parents b149f7d + 9472879 commit 7196032

File tree

151 files changed

+13810
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+13810
-32
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repositories {
1919
2020
dependencies {
2121
// Include the sdk as a dependency
22-
implementation 'com.microsoft.graph:microsoft-graph:4.2.0'
22+
implementation 'com.microsoft.graph:microsoft-graph:5.0.0'
2323
// Uncomment the line below if you are building an android application
2424
//implementation 'com.google.guava:guava:30.1.1-android'
2525
// This dependency is only needed if you are using the TokenCrendentialAuthProvider
@@ -36,7 +36,7 @@ Add the dependency in `dependencies` in pom.xml
3636
<!-- Include the sdk as a dependency -->
3737
<groupId>com.microsoft.graph</groupId>
3838
<artifactId>microsoft-graph</artifactId>
39-
<version>4.2.0</version>
39+
<version>5.0.0</version>
4040
</dependency>
4141
<dependency>
4242
<!-- This dependency is only needed if you are using the TokenCrendentialAuthProvider -->
@@ -135,15 +135,3 @@ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MI
135135
## 9. Third-party notices
136136

137137
[Third-party notices](THIRD%20PARTY%20NOTICES)
138-
139-
140-
141-
142-
143-
144-
145-
146-
147-
148-
149-

docs/upgrade-to-v4.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Microsoft Graph Java SDK v4 changelog and upgrade guide
2+
3+
Welcome to the Microsoft Graph Java SDK migration guide to v4. The purpose of this document is to list out any breaking change and migration work SDK users might run into while upgrading to the latest version of the SDK.
4+
5+
## Upgrade guide for breaking changes
6+
7+
### IdentitySet replaced by specialized types for Microsoft Teams APIs
8+
9+
The `IdentitySet` type has been replaced by specialized types inheriting from it and exposing more information for the Microsoft Teams APIs.
10+
11+
- The `ChatMessage.from` property is now of type `ChatMessageFromIdentitySet`
12+
- The `ChatMessageMention.mentioned` property is now of type `ChatMessageMentionedIdentitySet`
13+
- The `ChatMessageReaction.user` property is now of type `ChatMessageReactionIdentitySet`
14+
15+
If your application is reading/assigning the above-mentioned properties, you need to update the code to reference these new types instead. If your application was using the `additionalData` property to read any property that is now available on the new types, update the code to use these new properties instead.

docs/upgrade-to-v5.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Microsoft Graph Java SDK v5 changelog and upgrade guide
2+
3+
Welcome to the Microsoft Graph Java SDK migration guide to v5. The purpose of this document is to list out any breaking change and migration work SDK users might run into while upgrading to the latest version of the SDK.
4+
5+
## Upgrade guide for breaking changes
6+
7+
### ManagedAppProtection replaced by TargetedManagedAppProtection for some Security APIs
8+
9+
The `ManagedAppProtection` type used for the `targetApps` action as a parameter has been replaced by a new `TargetedManagedAppProtection` type that inherits from it and exposes new properties.
10+
11+
If your application is using the above-mentioned type, you need to update the code to reference the new type instead. If your application was using the `additionalData` property to read any property that is now available on the new type, update the code to use these new properties instead.

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ org.gradle.caching=true
2525

2626
mavenGroupId = com.microsoft.graph
2727
mavenArtifactId = microsoft-graph
28-
mavenMajorVersion = 4
29-
mavenMinorVersion = 2
28+
mavenMajorVersion = 5
29+
mavenMinorVersion = 0
3030
mavenPatchVersion = 0
3131
mavenArtifactSuffix =
3232

@@ -56,3 +56,4 @@ mavenCentralPublishingEnabled=false
5656

5757

5858

59+

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
as the dependency graph is not compatible with gradle https://docs.github.com/en/free-pro-team@latest/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems
55
build.gradle is the source of truth
66
-->
7-
<modelVersion>4.0.0</modelVersion>
7+
<modelVersion>5.0.0</modelVersion>
88

99
<groupId>com.microsoft.graph</groupId>
1010
<artifactId>microsoft-graph</artifactId>
@@ -50,4 +50,4 @@
5050
<scope>test</scope>
5151
</dependency>
5252
</dependencies>
53-
</project>
53+
</project>

src/main/java/com/microsoft/graph/externalconnectors/models/ExternalConnection.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
import com.microsoft.graph.http.BaseCollectionPage;
1212
import com.microsoft.graph.externalconnectors.models.Configuration;
1313
import com.microsoft.graph.externalconnectors.models.ConnectionState;
14+
import com.microsoft.graph.externalconnectors.models.ExternalGroup;
1415
import com.microsoft.graph.externalconnectors.models.ExternalItem;
1516
import com.microsoft.graph.externalconnectors.models.ConnectionOperation;
1617
import com.microsoft.graph.externalconnectors.models.Schema;
1718
import com.microsoft.graph.models.Entity;
19+
import com.microsoft.graph.externalconnectors.requests.ExternalGroupCollectionPage;
1820
import com.microsoft.graph.externalconnectors.requests.ExternalItemCollectionPage;
1921
import com.microsoft.graph.externalconnectors.requests.ConnectionOperationCollectionPage;
2022

@@ -69,6 +71,15 @@ public class ExternalConnection extends Entity implements IJsonBackedObject {
6971
@Nullable
7072
public ConnectionState state;
7173

74+
/**
75+
* The Groups.
76+
*
77+
*/
78+
@SerializedName(value = "groups", alternate = {"Groups"})
79+
@Expose
80+
@Nullable
81+
public ExternalGroupCollectionPage groups;
82+
7283
/**
7384
* The Items.
7485
* Read-only. Nullable.
@@ -106,6 +117,10 @@ public class ExternalConnection extends Entity implements IJsonBackedObject {
106117
public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {
107118

108119

120+
if (json.has("groups")) {
121+
groups = serializer.deserializeObject(json.get("groups"), ExternalGroupCollectionPage.class);
122+
}
123+
109124
if (json.has("items")) {
110125
items = serializer.deserializeObject(json.get("items"), ExternalItemCollectionPage.class);
111126
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Template Source: BaseEntity.java.tt
2+
// ------------------------------------------------------------------------------
3+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
4+
// ------------------------------------------------------------------------------
5+
6+
package com.microsoft.graph.externalconnectors.models;
7+
import com.microsoft.graph.serializer.ISerializer;
8+
import com.microsoft.graph.serializer.IJsonBackedObject;
9+
import com.microsoft.graph.serializer.AdditionalDataManager;
10+
import java.util.EnumSet;
11+
import com.microsoft.graph.http.BaseCollectionPage;
12+
import com.microsoft.graph.externalconnectors.models.Identity;
13+
import com.microsoft.graph.models.Entity;
14+
import com.microsoft.graph.externalconnectors.requests.IdentityCollectionPage;
15+
16+
17+
import com.google.gson.JsonObject;
18+
import com.google.gson.annotations.SerializedName;
19+
import com.google.gson.annotations.Expose;
20+
import javax.annotation.Nullable;
21+
import javax.annotation.Nonnull;
22+
23+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
24+
25+
/**
26+
* The class for the External Group.
27+
*/
28+
public class ExternalGroup extends Entity implements IJsonBackedObject {
29+
30+
31+
/**
32+
* The Description.
33+
* The description of the external group. Optional.
34+
*/
35+
@SerializedName(value = "description", alternate = {"Description"})
36+
@Expose
37+
@Nullable
38+
public String description;
39+
40+
/**
41+
* The Display Name.
42+
* The friendly name of the external group. Optional.
43+
*/
44+
@SerializedName(value = "displayName", alternate = {"DisplayName"})
45+
@Expose
46+
@Nullable
47+
public String displayName;
48+
49+
/**
50+
* The Members.
51+
* A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or other externalGroups as members.
52+
*/
53+
@SerializedName(value = "members", alternate = {"Members"})
54+
@Expose
55+
@Nullable
56+
public IdentityCollectionPage members;
57+
58+
59+
/**
60+
* Sets the raw JSON object
61+
*
62+
* @param serializer the serializer
63+
* @param json the JSON object to set this object to
64+
*/
65+
public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {
66+
67+
68+
if (json.has("members")) {
69+
members = serializer.deserializeObject(json.get("members"), IdentityCollectionPage.class);
70+
}
71+
}
72+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Template Source: BaseEntity.java.tt
2+
// ------------------------------------------------------------------------------
3+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
4+
// ------------------------------------------------------------------------------
5+
6+
package com.microsoft.graph.externalconnectors.models;
7+
import com.microsoft.graph.serializer.ISerializer;
8+
import com.microsoft.graph.serializer.IJsonBackedObject;
9+
import com.microsoft.graph.serializer.AdditionalDataManager;
10+
import java.util.EnumSet;
11+
import com.microsoft.graph.externalconnectors.models.IdentityType;
12+
import com.microsoft.graph.models.Entity;
13+
14+
15+
import com.google.gson.JsonObject;
16+
import com.google.gson.annotations.SerializedName;
17+
import com.google.gson.annotations.Expose;
18+
import javax.annotation.Nullable;
19+
import javax.annotation.Nonnull;
20+
21+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
22+
23+
/**
24+
* The class for the Identity.
25+
*/
26+
public class Identity extends Entity implements IJsonBackedObject {
27+
28+
29+
/**
30+
* The Type.
31+
*
32+
*/
33+
@SerializedName(value = "type", alternate = {"Type"})
34+
@Expose
35+
@Nullable
36+
public IdentityType type;
37+
38+
39+
/**
40+
* Sets the raw JSON object
41+
*
42+
* @param serializer the serializer
43+
* @param json the JSON object to set this object to
44+
*/
45+
public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {
46+
47+
}
48+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Template Source: Enum.java.tt
2+
// ------------------------------------------------------------------------------
3+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
4+
// ------------------------------------------------------------------------------
5+
6+
package com.microsoft.graph.externalconnectors.models;
7+
8+
9+
/**
10+
* The Enum Identity Type.
11+
*/
12+
public enum IdentityType
13+
{
14+
/**
15+
* user
16+
*/
17+
USER,
18+
/**
19+
* group
20+
*/
21+
GROUP,
22+
/**
23+
* external Group
24+
*/
25+
EXTERNAL_GROUP,
26+
/**
27+
* unknown Future Value
28+
*/
29+
UNKNOWN_FUTURE_VALUE,
30+
/**
31+
* For IdentityType values that were not expected from the service
32+
*/
33+
UNEXPECTED_VALUE
34+
}

src/main/java/com/microsoft/graph/externalconnectors/requests/ExternalConnectionRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import com.microsoft.graph.http.IRequestBuilder;
99
import com.microsoft.graph.core.ClientException;
1010
import com.microsoft.graph.externalconnectors.models.ExternalConnection;
11+
import com.microsoft.graph.externalconnectors.requests.ExternalGroupCollectionRequestBuilder;
12+
import com.microsoft.graph.externalconnectors.requests.ExternalGroupRequestBuilder;
1113
import com.microsoft.graph.externalconnectors.requests.ExternalItemCollectionRequestBuilder;
1214
import com.microsoft.graph.externalconnectors.requests.ExternalItemRequestBuilder;
1315
import com.microsoft.graph.externalconnectors.requests.ConnectionOperationCollectionRequestBuilder;

0 commit comments

Comments
 (0)