Skip to content

Commit 6f0f06e

Browse files
🐛 Add behavior and remove unused methods from PI v3
1 parent 8821cf3 commit 6f0f06e

File tree

3 files changed

+113
-37
lines changed

3 files changed

+113
-37
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.watson.developer_cloud.personality_insights.v3.model;
15+
16+
import com.google.gson.annotations.SerializedName;
17+
import com.ibm.watson.developer_cloud.service.model.GenericModel;
18+
19+
/**
20+
* Personality Behavior information.
21+
*/
22+
public class Behavior extends GenericModel {
23+
24+
@SerializedName("trait_id")
25+
private String traitId;
26+
27+
private String name;
28+
private String category;
29+
private Double percentage;
30+
31+
/**
32+
* Gets the unique identifier of the characteristic to which the results pertain.
33+
*
34+
* @return the trait id
35+
*/
36+
public String getTraitId() {
37+
return traitId;
38+
}
39+
40+
/**
41+
* Sets the unique identifier of the characteristic to which the results pertain.
42+
*
43+
* @param traitId the new trait id
44+
*/
45+
public void setTraitId(String traitId) {
46+
this.traitId = traitId;
47+
}
48+
49+
/**
50+
* Gets the user-visible name of the characteristic.
51+
*
52+
* @return the name
53+
*/
54+
public String getName() {
55+
return name;
56+
}
57+
58+
/**
59+
* Sets the user-visible name of the characteristic.
60+
*
61+
* @param name the new name
62+
*/
63+
public void setName(String name) {
64+
this.name = name;
65+
}
66+
67+
/**
68+
* Gets the category of the characteristic.
69+
*
70+
* @return the category
71+
*/
72+
public String getCategory() {
73+
return category;
74+
}
75+
76+
/**
77+
* Sets the category of the characteristic.
78+
*
79+
* @param category the new category
80+
*/
81+
public void setCategory(String category) {
82+
this.category = category;
83+
}
84+
85+
/**
86+
* Gets the percentage of timestamped input data that occurred during that day of the week or hour of the day. The
87+
* range is 0 to 1.
88+
*
89+
* @return the percentage
90+
*/
91+
public Double getPercentage() {
92+
return percentage;
93+
}
94+
95+
/**
96+
* Sets the percentage of timestamped input data that occurred during that day of the week or hour of the day. The
97+
* range is 0 to 1.
98+
*
99+
* @param percentage the new percentage
100+
*/
101+
public void setPercentage(Double percentage) {
102+
this.percentage = percentage;
103+
}
104+
105+
}

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ContentItem.java

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,6 @@ public void setCreated(Date created) {
121121
this.created = created;
122122
}
123123

124-
125-
/**
126-
* Indicates whether this content item is a forwarded/copied version of another content item.
127-
*
128-
* @param forward set true if the content is a forwarded/copied version of another content item.
129-
*/
130-
public void setForward(boolean forward) {
131-
this.forward = forward;
132-
}
133-
134124
/**
135125
* Sets the unique identifier for this content item.
136126
*
@@ -149,25 +139,6 @@ public void setLanguage(String language) {
149139
this.language = language;
150140
}
151141

152-
/**
153-
* Sets the unique id of the parent content item. Used to identify hierarchical relationships between posts/replies,
154-
* messages/replies, etc.,
155-
*
156-
* @param parentId the parent identifier
157-
*/
158-
public void setParentid(String parentId) {
159-
this.parentId = parentId;
160-
}
161-
162-
/**
163-
* Indicates whether this content item is a reply to another content item.
164-
*
165-
* @param reply true if is a reply
166-
*/
167-
public void setReply(boolean reply) {
168-
this.reply = reply;
169-
}
170-
171142
/**
172143
* Sets the date that identifies when this content was last updated..
173144
*
@@ -218,18 +189,18 @@ public void setParentId(String parentId) {
218189
}
219190

220191
/**
221-
* Sets the forward.
192+
* Indicates whether this content item is a forwarded/copied version of another content item.
222193
*
223-
* @param forward the new forward
194+
* @param forward set true if the content is a forwarded/copied version of another content item.
224195
*/
225196
public void setForward(Boolean forward) {
226197
this.forward = forward;
227198
}
228199

229200
/**
230-
* Sets the reply.
201+
* Indicates whether this content item is a reply to another content item.
231202
*
232-
* @param reply the new reply
203+
* @param reply true if is a reply
233204
*/
234205
public void setReply(Boolean reply) {
235206
this.reply = reply;

personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/Profile.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void setMessage(String message) {
8181
private List<Trait> personality;
8282
private List<Trait> needs;
8383
private List<Trait> values;
84-
private List<Trait> behavior;
84+
private List<Behavior> behavior;
8585

8686
@SerializedName("consumption_preferences")
8787
private List<ConsumptionPreferences> consumptionPreferences;
@@ -103,7 +103,7 @@ public String getWordCountMessage() {
103103
*
104104
* @return the behavior
105105
*/
106-
public List<Trait> getBehavior() {
106+
public List<Behavior> getBehavior() {
107107
return behavior;
108108
}
109109

@@ -112,9 +112,9 @@ public List<Trait> getBehavior() {
112112
* The results include information about the distribution of the content over the days of the week and the hours of
113113
* the day.
114114
*
115-
* @param behavior the new behavior
115+
* @param behavior the new behaviors
116116
*/
117-
public void setBehavior(List<Trait> behavior) {
117+
public void setBehavior(List<Behavior> behavior) {
118118
this.behavior = behavior;
119119
}
120120

0 commit comments

Comments
 (0)