@vendasta/social-posts 5.11.0 → 5.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -873,10 +873,25 @@ function enumStringToValue$5(enumRef, value) {
873
873
  }
874
874
  return enumRef[value];
875
875
  }
876
- class Link {
876
+ class FacebookPostStats {
877
877
  static fromProto(proto) {
878
- let m = new Link();
878
+ let m = new FacebookPostStats();
879
879
  m = Object.assign(m, proto);
880
+ if (proto.commentCount) {
881
+ m.commentCount = parseInt(proto.commentCount, 10);
882
+ }
883
+ if (proto.shareCount) {
884
+ m.shareCount = parseInt(proto.shareCount, 10);
885
+ }
886
+ if (proto.likeCount) {
887
+ m.likeCount = parseInt(proto.likeCount, 10);
888
+ }
889
+ if (proto.reactions) {
890
+ m.reactions = parseInt(proto.reactions, 10);
891
+ }
892
+ if (proto.peopleReached) {
893
+ m.peopleReached = parseInt(proto.peopleReached, 10);
894
+ }
880
895
  return m;
881
896
  }
882
897
  constructor(kwargs) {
@@ -887,31 +902,40 @@ class Link {
887
902
  }
888
903
  toApiJson() {
889
904
  const toReturn = {};
890
- if (typeof this.name !== 'undefined') {
891
- toReturn['name'] = this.name;
905
+ if (typeof this.commentCount !== 'undefined') {
906
+ toReturn['commentCount'] = this.commentCount;
892
907
  }
893
- if (typeof this.picture !== 'undefined') {
894
- toReturn['picture'] = this.picture;
908
+ if (typeof this.shareCount !== 'undefined') {
909
+ toReturn['shareCount'] = this.shareCount;
895
910
  }
896
- if (typeof this.description !== 'undefined') {
897
- toReturn['description'] = this.description;
911
+ if (typeof this.likeCount !== 'undefined') {
912
+ toReturn['likeCount'] = this.likeCount;
898
913
  }
899
- if (typeof this.title !== 'undefined') {
900
- toReturn['title'] = this.title;
914
+ if (typeof this.hasLike !== 'undefined') {
915
+ toReturn['hasLike'] = this.hasLike;
901
916
  }
902
- if (typeof this.url !== 'undefined') {
903
- toReturn['url'] = this.url;
917
+ if (typeof this.canLike !== 'undefined') {
918
+ toReturn['canLike'] = this.canLike;
904
919
  }
905
- if (typeof this.shortcode !== 'undefined') {
906
- toReturn['shortcode'] = this.shortcode;
920
+ if (typeof this.reactions !== 'undefined') {
921
+ toReturn['reactions'] = this.reactions;
922
+ }
923
+ if (typeof this.peopleReached !== 'undefined') {
924
+ toReturn['peopleReached'] = this.peopleReached;
907
925
  }
908
926
  return toReturn;
909
927
  }
910
928
  }
911
- class Metadata {
929
+ class SocialPostStats {
912
930
  static fromProto(proto) {
913
- let m = new Metadata();
931
+ let m = new SocialPostStats();
914
932
  m = Object.assign(m, proto);
933
+ if (proto.facebookPostStats) {
934
+ m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
935
+ }
936
+ if (proto.twitterPostStats) {
937
+ m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
938
+ }
915
939
  return m;
916
940
  }
917
941
  constructor(kwargs) {
@@ -922,19 +946,28 @@ class Metadata {
922
946
  }
923
947
  toApiJson() {
924
948
  const toReturn = {};
925
- if (typeof this.name !== 'undefined') {
926
- toReturn['name'] = this.name;
949
+ if (typeof this.internalPostId !== 'undefined') {
950
+ toReturn['internalPostId'] = this.internalPostId;
927
951
  }
928
- if (typeof this.value !== 'undefined') {
929
- toReturn['value'] = this.value;
952
+ if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
953
+ toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
954
+ }
955
+ if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
956
+ toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
930
957
  }
931
958
  return toReturn;
932
959
  }
933
960
  }
934
- class PostAction {
961
+ class TwitterPostStats {
935
962
  static fromProto(proto) {
936
- let m = new PostAction();
963
+ let m = new TwitterPostStats();
937
964
  m = Object.assign(m, proto);
965
+ if (proto.favourites) {
966
+ m.favourites = parseInt(proto.favourites, 10);
967
+ }
968
+ if (proto.retweets) {
969
+ m.retweets = parseInt(proto.retweets, 10);
970
+ }
938
971
  return m;
939
972
  }
940
973
  constructor(kwargs) {
@@ -945,24 +978,34 @@ class PostAction {
945
978
  }
946
979
  toApiJson() {
947
980
  const toReturn = {};
948
- if (typeof this.type !== 'undefined') {
949
- toReturn['type'] = this.type;
981
+ if (typeof this.favourites !== 'undefined') {
982
+ toReturn['favourites'] = this.favourites;
950
983
  }
951
- if (typeof this.linkUrl !== 'undefined') {
952
- toReturn['linkUrl'] = this.linkUrl;
984
+ if (typeof this.hasFavourited !== 'undefined') {
985
+ toReturn['hasFavourited'] = this.hasFavourited;
986
+ }
987
+ if (typeof this.retweets !== 'undefined') {
988
+ toReturn['retweets'] = this.retweets;
989
+ }
990
+ if (typeof this.hasRetweeted !== 'undefined') {
991
+ toReturn['hasRetweeted'] = this.hasRetweeted;
953
992
  }
954
993
  return toReturn;
955
994
  }
956
995
  }
957
- class PostContent {
996
+
997
+ function enumStringToValue$4(enumRef, value) {
998
+ if (typeof value === 'number') {
999
+ return value;
1000
+ }
1001
+ return enumRef[value];
1002
+ }
1003
+ class TenorGifMediaEntry {
958
1004
  static fromProto(proto) {
959
- let m = new PostContent();
1005
+ let m = new TenorGifMediaEntry();
960
1006
  m = Object.assign(m, proto);
961
- if (proto.media) {
962
- m.media = proto.media.map(PostMedia.fromProto);
963
- }
964
- if (proto.link) {
965
- m.link = proto.link.map(Link.fromProto);
1007
+ if (proto.value) {
1008
+ m.value = TenorMediaObject.fromProto(proto.value);
966
1009
  }
967
1010
  return m;
968
1011
  }
@@ -974,33 +1017,21 @@ class PostContent {
974
1017
  }
975
1018
  toApiJson() {
976
1019
  const toReturn = {};
977
- if (typeof this.postText !== 'undefined') {
978
- toReturn['postText'] = this.postText;
979
- }
980
- if (typeof this.media !== 'undefined' && this.media !== null) {
981
- toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
982
- }
983
- if (typeof this.link !== 'undefined' && this.link !== null) {
984
- toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
985
- }
986
- if (typeof this.description !== 'undefined') {
987
- toReturn['description'] = this.description;
1020
+ if (typeof this.key !== 'undefined') {
1021
+ toReturn['key'] = this.key;
988
1022
  }
989
- if (typeof this.title !== 'undefined') {
990
- toReturn['title'] = this.title;
1023
+ if (typeof this.value !== 'undefined' && this.value !== null) {
1024
+ toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
991
1025
  }
992
1026
  return toReturn;
993
1027
  }
994
1028
  }
995
- class PostCustomization {
1029
+ class TenorGif {
996
1030
  static fromProto(proto) {
997
- let m = new PostCustomization();
1031
+ let m = new TenorGif();
998
1032
  m = Object.assign(m, proto);
999
- if (proto.event) {
1000
- m.event = PostEvent.fromProto(proto.event);
1001
- }
1002
- if (proto.action) {
1003
- m.action = PostAction.fromProto(proto.action);
1033
+ if (proto.media) {
1034
+ m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
1004
1035
  }
1005
1036
  return m;
1006
1037
  }
@@ -1012,24 +1043,36 @@ class PostCustomization {
1012
1043
  }
1013
1044
  toApiJson() {
1014
1045
  const toReturn = {};
1015
- if (typeof this.event !== 'undefined' && this.event !== null) {
1016
- toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
1046
+ if (typeof this.media !== 'undefined' && this.media !== null) {
1047
+ toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
1017
1048
  }
1018
- if (typeof this.action !== 'undefined' && this.action !== null) {
1019
- toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
1049
+ if (typeof this.tags !== 'undefined') {
1050
+ toReturn['tags'] = this.tags;
1051
+ }
1052
+ if (typeof this.hasAudio !== 'undefined') {
1053
+ toReturn['hasAudio'] = this.hasAudio;
1054
+ }
1055
+ if (typeof this.title !== 'undefined') {
1056
+ toReturn['title'] = this.title;
1057
+ }
1058
+ if (typeof this.id !== 'undefined') {
1059
+ toReturn['id'] = this.id;
1060
+ }
1061
+ if (typeof this.created !== 'undefined') {
1062
+ toReturn['created'] = this.created;
1020
1063
  }
1021
1064
  return toReturn;
1022
1065
  }
1023
1066
  }
1024
- class PostEvent {
1067
+ class TenorMediaObject {
1025
1068
  static fromProto(proto) {
1026
- let m = new PostEvent();
1069
+ let m = new TenorMediaObject();
1027
1070
  m = Object.assign(m, proto);
1028
- if (proto.start) {
1029
- m.start = new Date(proto.start);
1071
+ if (proto.dimensions) {
1072
+ m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
1030
1073
  }
1031
- if (proto.end) {
1032
- m.end = new Date(proto.end);
1074
+ if (proto.size) {
1075
+ m.size = parseInt(proto.size, 10);
1033
1076
  }
1034
1077
  return m;
1035
1078
  }
@@ -1041,24 +1084,37 @@ class PostEvent {
1041
1084
  }
1042
1085
  toApiJson() {
1043
1086
  const toReturn = {};
1044
- if (typeof this.title !== 'undefined') {
1045
- toReturn['title'] = this.title;
1087
+ if (typeof this.preview !== 'undefined') {
1088
+ toReturn['preview'] = this.preview;
1046
1089
  }
1047
- if (typeof this.start !== 'undefined' && this.start !== null) {
1048
- toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
1090
+ if (typeof this.url !== 'undefined') {
1091
+ toReturn['url'] = this.url;
1049
1092
  }
1050
- if (typeof this.end !== 'undefined' && this.end !== null) {
1051
- toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
1093
+ if (typeof this.dimensions !== 'undefined') {
1094
+ toReturn['dimensions'] = this.dimensions;
1095
+ }
1096
+ if (typeof this.size !== 'undefined') {
1097
+ toReturn['size'] = this.size;
1052
1098
  }
1053
1099
  return toReturn;
1054
1100
  }
1055
1101
  }
1056
- class PostMedia {
1102
+
1103
+ function enumStringToValue$3(enumRef, value) {
1104
+ if (typeof value === 'number') {
1105
+ return value;
1106
+ }
1107
+ return enumRef[value];
1108
+ }
1109
+ class CreateMultilocationPostRequest {
1057
1110
  static fromProto(proto) {
1058
- let m = new PostMedia();
1111
+ let m = new CreateMultilocationPostRequest();
1059
1112
  m = Object.assign(m, proto);
1060
- if (proto.metadata) {
1061
- m.metadata = proto.metadata.map(Metadata.fromProto);
1113
+ if (proto.scheduledDate) {
1114
+ m.scheduledDate = new Date(proto.scheduledDate);
1115
+ }
1116
+ if (proto.locations) {
1117
+ m.locations = proto.locations.map(Location.fromProto);
1062
1118
  }
1063
1119
  return m;
1064
1120
  }
@@ -1070,42 +1126,39 @@ class PostMedia {
1070
1126
  }
1071
1127
  toApiJson() {
1072
1128
  const toReturn = {};
1073
- if (typeof this.mediaId !== 'undefined') {
1074
- toReturn['mediaId'] = this.mediaId;
1129
+ if (typeof this.brandId !== 'undefined') {
1130
+ toReturn['brandId'] = this.brandId;
1075
1131
  }
1076
- if (typeof this.mediaUrl !== 'undefined') {
1077
- toReturn['mediaUrl'] = this.mediaUrl;
1132
+ if (typeof this.text !== 'undefined') {
1133
+ toReturn['text'] = this.text;
1078
1134
  }
1079
- if (typeof this.mediaType !== 'undefined') {
1080
- toReturn['mediaType'] = this.mediaType;
1135
+ if (typeof this.media !== 'undefined') {
1136
+ toReturn['media'] = this.media;
1081
1137
  }
1082
- if (typeof this.containerId !== 'undefined') {
1083
- toReturn['containerId'] = this.containerId;
1138
+ if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
1139
+ toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
1084
1140
  }
1085
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
1086
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
1141
+ if (typeof this.locations !== 'undefined' && this.locations !== null) {
1142
+ toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1143
+ }
1144
+ if (typeof this.gifs !== 'undefined') {
1145
+ toReturn['gifs'] = this.gifs;
1146
+ }
1147
+ if (typeof this.videos !== 'undefined') {
1148
+ toReturn['videos'] = this.videos;
1087
1149
  }
1088
1150
  return toReturn;
1089
1151
  }
1090
1152
  }
1091
- class SocialPost {
1153
+ class CreateMultilocationPostResponse {
1092
1154
  static fromProto(proto) {
1093
- let m = new SocialPost();
1155
+ let m = new CreateMultilocationPostResponse();
1094
1156
  m = Object.assign(m, proto);
1095
- if (proto.postContent) {
1096
- m.postContent = PostContent.fromProto(proto.postContent);
1097
- }
1098
- if (proto.scheduled) {
1099
- m.scheduled = new Date(proto.scheduled);
1100
- }
1101
- if (proto.customization) {
1102
- m.customization = PostCustomization.fromProto(proto.customization);
1103
- }
1104
- if (proto.postType) {
1105
- m.postType = enumStringToValue$5(PostType$1, proto.postType);
1157
+ if (proto.post) {
1158
+ m.post = MultilocationPost.fromProto(proto.post);
1106
1159
  }
1107
- if (proto.metadata) {
1108
- m.metadata = proto.metadata.map(Metadata.fromProto);
1160
+ if (proto.errors) {
1161
+ m.errors = proto.errors.map(MultilocationPostError.fromProto);
1109
1162
  }
1110
1163
  return m;
1111
1164
  }
@@ -1117,58 +1170,30 @@ class SocialPost {
1117
1170
  }
1118
1171
  toApiJson() {
1119
1172
  const toReturn = {};
1120
- if (typeof this.businessId !== 'undefined') {
1121
- toReturn['businessId'] = this.businessId;
1173
+ if (typeof this.post !== 'undefined' && this.post !== null) {
1174
+ toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
1122
1175
  }
1123
- if (typeof this.socialServiceId !== 'undefined') {
1124
- toReturn['socialServiceId'] = this.socialServiceId;
1125
- }
1126
- if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
1127
- toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
1128
- }
1129
- if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
1130
- toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
1131
- }
1132
- if (typeof this.customization !== 'undefined' && this.customization !== null) {
1133
- toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
1134
- }
1135
- if (typeof this.postType !== 'undefined') {
1136
- toReturn['postType'] = this.postType;
1137
- }
1138
- if (typeof this.internalPostId !== 'undefined') {
1139
- toReturn['internalPostId'] = this.internalPostId;
1140
- }
1141
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
1142
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
1176
+ if (typeof this.errors !== 'undefined' && this.errors !== null) {
1177
+ toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
1143
1178
  }
1144
1179
  return toReturn;
1145
1180
  }
1146
1181
  }
1147
-
1148
- function enumStringToValue$4(enumRef, value) {
1149
- if (typeof value === 'number') {
1150
- return value;
1151
- }
1152
- return enumRef[value];
1153
- }
1154
- class FacebookPostStats {
1182
+ class CreatePostTemplateRequest {
1155
1183
  static fromProto(proto) {
1156
- let m = new FacebookPostStats();
1184
+ let m = new CreatePostTemplateRequest();
1157
1185
  m = Object.assign(m, proto);
1158
- if (proto.commentCount) {
1159
- m.commentCount = parseInt(proto.commentCount, 10);
1160
- }
1161
- if (proto.shareCount) {
1162
- m.shareCount = parseInt(proto.shareCount, 10);
1186
+ if (proto.postDateTime) {
1187
+ m.postDateTime = new Date(proto.postDateTime);
1163
1188
  }
1164
- if (proto.likeCount) {
1165
- m.likeCount = parseInt(proto.likeCount, 10);
1189
+ if (proto.mediaEntries) {
1190
+ m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
1166
1191
  }
1167
- if (proto.reactions) {
1168
- m.reactions = parseInt(proto.reactions, 10);
1192
+ if (proto.metaData) {
1193
+ m.metaData = proto.metaData.map(MetaData.fromProto);
1169
1194
  }
1170
- if (proto.peopleReached) {
1171
- m.peopleReached = parseInt(proto.peopleReached, 10);
1195
+ if (proto.postType) {
1196
+ m.postType = enumStringToValue$3(PostType$1, proto.postType);
1172
1197
  }
1173
1198
  return m;
1174
1199
  }
@@ -1180,40 +1205,55 @@ class FacebookPostStats {
1180
1205
  }
1181
1206
  toApiJson() {
1182
1207
  const toReturn = {};
1183
- if (typeof this.commentCount !== 'undefined') {
1184
- toReturn['commentCount'] = this.commentCount;
1208
+ if (typeof this.accountGroupId !== 'undefined') {
1209
+ toReturn['accountGroupId'] = this.accountGroupId;
1185
1210
  }
1186
- if (typeof this.shareCount !== 'undefined') {
1187
- toReturn['shareCount'] = this.shareCount;
1211
+ if (typeof this.title !== 'undefined') {
1212
+ toReturn['title'] = this.title;
1188
1213
  }
1189
- if (typeof this.likeCount !== 'undefined') {
1190
- toReturn['likeCount'] = this.likeCount;
1214
+ if (typeof this.postText !== 'undefined') {
1215
+ toReturn['postText'] = this.postText;
1191
1216
  }
1192
- if (typeof this.hasLike !== 'undefined') {
1193
- toReturn['hasLike'] = this.hasLike;
1217
+ if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
1218
+ toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
1194
1219
  }
1195
- if (typeof this.canLike !== 'undefined') {
1196
- toReturn['canLike'] = this.canLike;
1220
+ if (typeof this.gmbPostCustomization !== 'undefined') {
1221
+ toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
1197
1222
  }
1198
- if (typeof this.reactions !== 'undefined') {
1199
- toReturn['reactions'] = this.reactions;
1223
+ if (typeof this.imageUrl !== 'undefined') {
1224
+ toReturn['imageUrl'] = this.imageUrl;
1200
1225
  }
1201
- if (typeof this.peopleReached !== 'undefined') {
1202
- toReturn['peopleReached'] = this.peopleReached;
1226
+ if (typeof this.imagePath !== 'undefined') {
1227
+ toReturn['imagePath'] = this.imagePath;
1228
+ }
1229
+ if (typeof this.imageSize !== 'undefined') {
1230
+ toReturn['imageSize'] = this.imageSize;
1231
+ }
1232
+ if (typeof this.previews !== 'undefined') {
1233
+ toReturn['previews'] = this.previews;
1234
+ }
1235
+ if (typeof this.options !== 'undefined') {
1236
+ toReturn['options'] = this.options;
1237
+ }
1238
+ if (typeof this.videoUrl !== 'undefined') {
1239
+ toReturn['videoUrl'] = this.videoUrl;
1240
+ }
1241
+ if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
1242
+ toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
1243
+ }
1244
+ if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
1245
+ toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
1246
+ }
1247
+ if (typeof this.postType !== 'undefined') {
1248
+ toReturn['postType'] = this.postType;
1203
1249
  }
1204
1250
  return toReturn;
1205
1251
  }
1206
1252
  }
1207
- class SocialPostStats {
1253
+ class CreatePostTemplateResponse {
1208
1254
  static fromProto(proto) {
1209
- let m = new SocialPostStats();
1255
+ let m = new CreatePostTemplateResponse();
1210
1256
  m = Object.assign(m, proto);
1211
- if (proto.facebookPostStats) {
1212
- m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
1213
- }
1214
- if (proto.twitterPostStats) {
1215
- m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
1216
- }
1217
1257
  return m;
1218
1258
  }
1219
1259
  constructor(kwargs) {
@@ -1224,27 +1264,21 @@ class SocialPostStats {
1224
1264
  }
1225
1265
  toApiJson() {
1226
1266
  const toReturn = {};
1227
- if (typeof this.internalPostId !== 'undefined') {
1228
- toReturn['internalPostId'] = this.internalPostId;
1229
- }
1230
- if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
1231
- toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
1232
- }
1233
- if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
1234
- toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
1267
+ if (typeof this.templateId !== 'undefined') {
1268
+ toReturn['templateId'] = this.templateId;
1235
1269
  }
1236
1270
  return toReturn;
1237
1271
  }
1238
1272
  }
1239
- class TwitterPostStats {
1273
+ class DateRangeFilter {
1240
1274
  static fromProto(proto) {
1241
- let m = new TwitterPostStats();
1275
+ let m = new DateRangeFilter();
1242
1276
  m = Object.assign(m, proto);
1243
- if (proto.favourites) {
1244
- m.favourites = parseInt(proto.favourites, 10);
1277
+ if (proto.beginRange) {
1278
+ m.beginRange = new Date(proto.beginRange);
1245
1279
  }
1246
- if (proto.retweets) {
1247
- m.retweets = parseInt(proto.retweets, 10);
1280
+ if (proto.endRange) {
1281
+ m.endRange = new Date(proto.endRange);
1248
1282
  }
1249
1283
  return m;
1250
1284
  }
@@ -1256,35 +1290,19 @@ class TwitterPostStats {
1256
1290
  }
1257
1291
  toApiJson() {
1258
1292
  const toReturn = {};
1259
- if (typeof this.favourites !== 'undefined') {
1260
- toReturn['favourites'] = this.favourites;
1261
- }
1262
- if (typeof this.hasFavourited !== 'undefined') {
1263
- toReturn['hasFavourited'] = this.hasFavourited;
1264
- }
1265
- if (typeof this.retweets !== 'undefined') {
1266
- toReturn['retweets'] = this.retweets;
1293
+ if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
1294
+ toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
1267
1295
  }
1268
- if (typeof this.hasRetweeted !== 'undefined') {
1269
- toReturn['hasRetweeted'] = this.hasRetweeted;
1296
+ if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
1297
+ toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
1270
1298
  }
1271
1299
  return toReturn;
1272
1300
  }
1273
1301
  }
1274
-
1275
- function enumStringToValue$3(enumRef, value) {
1276
- if (typeof value === 'number') {
1277
- return value;
1278
- }
1279
- return enumRef[value];
1280
- }
1281
- class TenorGifMediaEntry {
1302
+ class DeleteHashtagsRequest {
1282
1303
  static fromProto(proto) {
1283
- let m = new TenorGifMediaEntry();
1304
+ let m = new DeleteHashtagsRequest();
1284
1305
  m = Object.assign(m, proto);
1285
- if (proto.value) {
1286
- m.value = TenorMediaObject.fromProto(proto.value);
1287
- }
1288
1306
  return m;
1289
1307
  }
1290
1308
  constructor(kwargs) {
@@ -1295,22 +1313,22 @@ class TenorGifMediaEntry {
1295
1313
  }
1296
1314
  toApiJson() {
1297
1315
  const toReturn = {};
1298
- if (typeof this.key !== 'undefined') {
1299
- toReturn['key'] = this.key;
1316
+ if (typeof this.keyword !== 'undefined') {
1317
+ toReturn['keyword'] = this.keyword;
1300
1318
  }
1301
- if (typeof this.value !== 'undefined' && this.value !== null) {
1302
- toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
1319
+ if (typeof this.businessId !== 'undefined') {
1320
+ toReturn['businessId'] = this.businessId;
1321
+ }
1322
+ if (typeof this.partnerId !== 'undefined') {
1323
+ toReturn['partnerId'] = this.partnerId;
1303
1324
  }
1304
1325
  return toReturn;
1305
1326
  }
1306
1327
  }
1307
- class TenorGif {
1328
+ class DeleteMultilocationPostRequest {
1308
1329
  static fromProto(proto) {
1309
- let m = new TenorGif();
1330
+ let m = new DeleteMultilocationPostRequest();
1310
1331
  m = Object.assign(m, proto);
1311
- if (proto.media) {
1312
- m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
1313
- }
1314
1332
  return m;
1315
1333
  }
1316
1334
  constructor(kwargs) {
@@ -1321,37 +1339,42 @@ class TenorGif {
1321
1339
  }
1322
1340
  toApiJson() {
1323
1341
  const toReturn = {};
1324
- if (typeof this.media !== 'undefined' && this.media !== null) {
1325
- toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
1326
- }
1327
- if (typeof this.tags !== 'undefined') {
1328
- toReturn['tags'] = this.tags;
1342
+ if (typeof this.brandId !== 'undefined') {
1343
+ toReturn['brandId'] = this.brandId;
1329
1344
  }
1330
- if (typeof this.hasAudio !== 'undefined') {
1331
- toReturn['hasAudio'] = this.hasAudio;
1345
+ if (typeof this.multilocationId !== 'undefined') {
1346
+ toReturn['multilocationId'] = this.multilocationId;
1332
1347
  }
1333
- if (typeof this.title !== 'undefined') {
1334
- toReturn['title'] = this.title;
1348
+ return toReturn;
1349
+ }
1350
+ }
1351
+ class DeletePostTemplateRequest {
1352
+ static fromProto(proto) {
1353
+ let m = new DeletePostTemplateRequest();
1354
+ m = Object.assign(m, proto);
1355
+ return m;
1356
+ }
1357
+ constructor(kwargs) {
1358
+ if (!kwargs) {
1359
+ return;
1335
1360
  }
1336
- if (typeof this.id !== 'undefined') {
1337
- toReturn['id'] = this.id;
1361
+ Object.assign(this, kwargs);
1362
+ }
1363
+ toApiJson() {
1364
+ const toReturn = {};
1365
+ if (typeof this.accountGroupId !== 'undefined') {
1366
+ toReturn['accountGroupId'] = this.accountGroupId;
1338
1367
  }
1339
- if (typeof this.created !== 'undefined') {
1340
- toReturn['created'] = this.created;
1368
+ if (typeof this.templateId !== 'undefined') {
1369
+ toReturn['templateId'] = this.templateId;
1341
1370
  }
1342
1371
  return toReturn;
1343
1372
  }
1344
1373
  }
1345
- class TenorMediaObject {
1374
+ class DeleteSocialPostRequest {
1346
1375
  static fromProto(proto) {
1347
- let m = new TenorMediaObject();
1376
+ let m = new DeleteSocialPostRequest();
1348
1377
  m = Object.assign(m, proto);
1349
- if (proto.dimensions) {
1350
- m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
1351
- }
1352
- if (proto.size) {
1353
- m.size = parseInt(proto.size, 10);
1354
- }
1355
1378
  return m;
1356
1379
  }
1357
1380
  constructor(kwargs) {
@@ -1362,35 +1385,25 @@ class TenorMediaObject {
1362
1385
  }
1363
1386
  toApiJson() {
1364
1387
  const toReturn = {};
1365
- if (typeof this.preview !== 'undefined') {
1366
- toReturn['preview'] = this.preview;
1367
- }
1368
- if (typeof this.url !== 'undefined') {
1369
- toReturn['url'] = this.url;
1370
- }
1371
- if (typeof this.dimensions !== 'undefined') {
1372
- toReturn['dimensions'] = this.dimensions;
1388
+ if (typeof this.businessId !== 'undefined') {
1389
+ toReturn['businessId'] = this.businessId;
1373
1390
  }
1374
- if (typeof this.size !== 'undefined') {
1375
- toReturn['size'] = this.size;
1391
+ if (typeof this.socialPostId !== 'undefined') {
1392
+ toReturn['socialPostId'] = this.socialPostId;
1376
1393
  }
1377
1394
  return toReturn;
1378
1395
  }
1379
1396
  }
1380
-
1381
- function enumStringToValue$2(enumRef, value) {
1382
- if (typeof value === 'number') {
1383
- return value;
1384
- }
1385
- return enumRef[value];
1386
- }
1387
- class CreateMultilocationPostRequest {
1397
+ class EditMultilocationPostRequest {
1388
1398
  static fromProto(proto) {
1389
- let m = new CreateMultilocationPostRequest();
1399
+ let m = new EditMultilocationPostRequest();
1390
1400
  m = Object.assign(m, proto);
1391
1401
  if (proto.scheduledDate) {
1392
1402
  m.scheduledDate = new Date(proto.scheduledDate);
1393
1403
  }
1404
+ if (proto.fieldMask) {
1405
+ m.fieldMask = FieldMask.fromProto(proto.fieldMask);
1406
+ }
1394
1407
  if (proto.locations) {
1395
1408
  m.locations = proto.locations.map(Location.fromProto);
1396
1409
  }
@@ -1407,6 +1420,9 @@ class CreateMultilocationPostRequest {
1407
1420
  if (typeof this.brandId !== 'undefined') {
1408
1421
  toReturn['brandId'] = this.brandId;
1409
1422
  }
1423
+ if (typeof this.multilocationId !== 'undefined') {
1424
+ toReturn['multilocationId'] = this.multilocationId;
1425
+ }
1410
1426
  if (typeof this.text !== 'undefined') {
1411
1427
  toReturn['text'] = this.text;
1412
1428
  }
@@ -1416,8 +1432,8 @@ class CreateMultilocationPostRequest {
1416
1432
  if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
1417
1433
  toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
1418
1434
  }
1419
- if (typeof this.locations !== 'undefined' && this.locations !== null) {
1420
- toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1435
+ if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
1436
+ toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
1421
1437
  }
1422
1438
  if (typeof this.gifs !== 'undefined') {
1423
1439
  toReturn['gifs'] = this.gifs;
@@ -1425,12 +1441,15 @@ class CreateMultilocationPostRequest {
1425
1441
  if (typeof this.videos !== 'undefined') {
1426
1442
  toReturn['videos'] = this.videos;
1427
1443
  }
1444
+ if (typeof this.locations !== 'undefined' && this.locations !== null) {
1445
+ toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1446
+ }
1428
1447
  return toReturn;
1429
1448
  }
1430
1449
  }
1431
- class CreateMultilocationPostResponse {
1450
+ class EditMultilocationPostResponse {
1432
1451
  static fromProto(proto) {
1433
- let m = new CreateMultilocationPostResponse();
1452
+ let m = new EditMultilocationPostResponse();
1434
1453
  m = Object.assign(m, proto);
1435
1454
  if (proto.post) {
1436
1455
  m.post = MultilocationPost.fromProto(proto.post);
@@ -1457,21 +1476,12 @@ class CreateMultilocationPostResponse {
1457
1476
  return toReturn;
1458
1477
  }
1459
1478
  }
1460
- class CreatePostTemplateRequest {
1479
+ class PartnerListScheduledSocialPostsRequestFilters {
1461
1480
  static fromProto(proto) {
1462
- let m = new CreatePostTemplateRequest();
1481
+ let m = new PartnerListScheduledSocialPostsRequestFilters();
1463
1482
  m = Object.assign(m, proto);
1464
- if (proto.postDateTime) {
1465
- m.postDateTime = new Date(proto.postDateTime);
1466
- }
1467
- if (proto.mediaEntries) {
1468
- m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
1469
- }
1470
- if (proto.metaData) {
1471
- m.metaData = proto.metaData.map(MetaData.fromProto);
1472
- }
1473
- if (proto.postType) {
1474
- m.postType = enumStringToValue$2(PostType$1, proto.postType);
1483
+ if (proto.dateRange) {
1484
+ m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
1475
1485
  }
1476
1486
  return m;
1477
1487
  }
@@ -1483,54 +1493,47 @@ class CreatePostTemplateRequest {
1483
1493
  }
1484
1494
  toApiJson() {
1485
1495
  const toReturn = {};
1486
- if (typeof this.accountGroupId !== 'undefined') {
1487
- toReturn['accountGroupId'] = this.accountGroupId;
1488
- }
1489
- if (typeof this.title !== 'undefined') {
1490
- toReturn['title'] = this.title;
1491
- }
1492
- if (typeof this.postText !== 'undefined') {
1493
- toReturn['postText'] = this.postText;
1494
- }
1495
- if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
1496
- toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
1497
- }
1498
- if (typeof this.gmbPostCustomization !== 'undefined') {
1499
- toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
1500
- }
1501
- if (typeof this.imageUrl !== 'undefined') {
1502
- toReturn['imageUrl'] = this.imageUrl;
1503
- }
1504
- if (typeof this.imagePath !== 'undefined') {
1505
- toReturn['imagePath'] = this.imagePath;
1506
- }
1507
- if (typeof this.imageSize !== 'undefined') {
1508
- toReturn['imageSize'] = this.imageSize;
1496
+ if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
1497
+ toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
1509
1498
  }
1510
- if (typeof this.previews !== 'undefined') {
1511
- toReturn['previews'] = this.previews;
1499
+ if (typeof this.partnerId !== 'undefined') {
1500
+ toReturn['partnerId'] = this.partnerId;
1512
1501
  }
1513
- if (typeof this.options !== 'undefined') {
1514
- toReturn['options'] = this.options;
1502
+ return toReturn;
1503
+ }
1504
+ }
1505
+ class GenerateCSVForPerformanceStatsRequest {
1506
+ static fromProto(proto) {
1507
+ let m = new GenerateCSVForPerformanceStatsRequest();
1508
+ m = Object.assign(m, proto);
1509
+ if (proto.postData) {
1510
+ m.postData = proto.postData.map(PostData.fromProto);
1515
1511
  }
1516
- if (typeof this.videoUrl !== 'undefined') {
1517
- toReturn['videoUrl'] = this.videoUrl;
1512
+ return m;
1513
+ }
1514
+ constructor(kwargs) {
1515
+ if (!kwargs) {
1516
+ return;
1518
1517
  }
1519
- if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
1520
- toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
1518
+ Object.assign(this, kwargs);
1519
+ }
1520
+ toApiJson() {
1521
+ const toReturn = {};
1522
+ if (typeof this.businessId !== 'undefined') {
1523
+ toReturn['businessId'] = this.businessId;
1521
1524
  }
1522
- if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
1523
- toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
1525
+ if (typeof this.postData !== 'undefined' && this.postData !== null) {
1526
+ toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
1524
1527
  }
1525
- if (typeof this.postType !== 'undefined') {
1526
- toReturn['postType'] = this.postType;
1528
+ if (typeof this.includeHeaders !== 'undefined') {
1529
+ toReturn['includeHeaders'] = this.includeHeaders;
1527
1530
  }
1528
1531
  return toReturn;
1529
1532
  }
1530
1533
  }
1531
- class CreatePostTemplateResponse {
1534
+ class GenerateCSVForPerformanceStatsResponse {
1532
1535
  static fromProto(proto) {
1533
- let m = new CreatePostTemplateResponse();
1536
+ let m = new GenerateCSVForPerformanceStatsResponse();
1534
1537
  m = Object.assign(m, proto);
1535
1538
  return m;
1536
1539
  }
@@ -1542,22 +1545,36 @@ class CreatePostTemplateResponse {
1542
1545
  }
1543
1546
  toApiJson() {
1544
1547
  const toReturn = {};
1545
- if (typeof this.templateId !== 'undefined') {
1546
- toReturn['templateId'] = this.templateId;
1548
+ if (typeof this.generatedId !== 'undefined') {
1549
+ toReturn['generatedId'] = this.generatedId;
1547
1550
  }
1548
1551
  return toReturn;
1549
1552
  }
1550
1553
  }
1551
- class DateRangeFilter {
1554
+ class GetGeneratedCSVForPerformanceStatsRequest {
1552
1555
  static fromProto(proto) {
1553
- let m = new DateRangeFilter();
1556
+ let m = new GetGeneratedCSVForPerformanceStatsRequest();
1554
1557
  m = Object.assign(m, proto);
1555
- if (proto.beginRange) {
1556
- m.beginRange = new Date(proto.beginRange);
1558
+ return m;
1559
+ }
1560
+ constructor(kwargs) {
1561
+ if (!kwargs) {
1562
+ return;
1557
1563
  }
1558
- if (proto.endRange) {
1559
- m.endRange = new Date(proto.endRange);
1564
+ Object.assign(this, kwargs);
1565
+ }
1566
+ toApiJson() {
1567
+ const toReturn = {};
1568
+ if (typeof this.generatedId !== 'undefined') {
1569
+ toReturn['generatedId'] = this.generatedId;
1560
1570
  }
1571
+ return toReturn;
1572
+ }
1573
+ }
1574
+ class GetGeneratedCSVForPerformanceStatsResponse {
1575
+ static fromProto(proto) {
1576
+ let m = new GetGeneratedCSVForPerformanceStatsResponse();
1577
+ m = Object.assign(m, proto);
1561
1578
  return m;
1562
1579
  }
1563
1580
  constructor(kwargs) {
@@ -1568,18 +1585,15 @@ class DateRangeFilter {
1568
1585
  }
1569
1586
  toApiJson() {
1570
1587
  const toReturn = {};
1571
- if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
1572
- toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
1573
- }
1574
- if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
1575
- toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
1588
+ if (typeof this.url !== 'undefined') {
1589
+ toReturn['url'] = this.url;
1576
1590
  }
1577
1591
  return toReturn;
1578
1592
  }
1579
1593
  }
1580
- class DeleteHashtagsRequest {
1594
+ class GetMultiSocialPostStatsRequest {
1581
1595
  static fromProto(proto) {
1582
- let m = new DeleteHashtagsRequest();
1596
+ let m = new GetMultiSocialPostStatsRequest();
1583
1597
  m = Object.assign(m, proto);
1584
1598
  return m;
1585
1599
  }
@@ -1591,8 +1605,8 @@ class DeleteHashtagsRequest {
1591
1605
  }
1592
1606
  toApiJson() {
1593
1607
  const toReturn = {};
1594
- if (typeof this.keyword !== 'undefined') {
1595
- toReturn['keyword'] = this.keyword;
1608
+ if (typeof this.internalPostIds !== 'undefined') {
1609
+ toReturn['internalPostIds'] = this.internalPostIds;
1596
1610
  }
1597
1611
  if (typeof this.businessId !== 'undefined') {
1598
1612
  toReturn['businessId'] = this.businessId;
@@ -1603,10 +1617,13 @@ class DeleteHashtagsRequest {
1603
1617
  return toReturn;
1604
1618
  }
1605
1619
  }
1606
- class DeleteMultilocationPostRequest {
1620
+ class GetMultiSocialPostStatsResponse {
1607
1621
  static fromProto(proto) {
1608
- let m = new DeleteMultilocationPostRequest();
1622
+ let m = new GetMultiSocialPostStatsResponse();
1609
1623
  m = Object.assign(m, proto);
1624
+ if (proto.socialPostStats) {
1625
+ m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
1626
+ }
1610
1627
  return m;
1611
1628
  }
1612
1629
  constructor(kwargs) {
@@ -1617,18 +1634,15 @@ class DeleteMultilocationPostRequest {
1617
1634
  }
1618
1635
  toApiJson() {
1619
1636
  const toReturn = {};
1620
- if (typeof this.brandId !== 'undefined') {
1621
- toReturn['brandId'] = this.brandId;
1622
- }
1623
- if (typeof this.multilocationId !== 'undefined') {
1624
- toReturn['multilocationId'] = this.multilocationId;
1637
+ if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
1638
+ toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
1625
1639
  }
1626
1640
  return toReturn;
1627
1641
  }
1628
1642
  }
1629
- class DeletePostTemplateRequest {
1643
+ class GetMultiSocialPostsRequest {
1630
1644
  static fromProto(proto) {
1631
- let m = new DeletePostTemplateRequest();
1645
+ let m = new GetMultiSocialPostsRequest();
1632
1646
  m = Object.assign(m, proto);
1633
1647
  return m;
1634
1648
  }
@@ -1640,19 +1654,22 @@ class DeletePostTemplateRequest {
1640
1654
  }
1641
1655
  toApiJson() {
1642
1656
  const toReturn = {};
1643
- if (typeof this.accountGroupId !== 'undefined') {
1644
- toReturn['accountGroupId'] = this.accountGroupId;
1657
+ if (typeof this.businessId !== 'undefined') {
1658
+ toReturn['businessId'] = this.businessId;
1645
1659
  }
1646
- if (typeof this.templateId !== 'undefined') {
1647
- toReturn['templateId'] = this.templateId;
1660
+ if (typeof this.internalPostIds !== 'undefined') {
1661
+ toReturn['internalPostIds'] = this.internalPostIds;
1648
1662
  }
1649
1663
  return toReturn;
1650
1664
  }
1651
1665
  }
1652
- class DeleteSocialPostRequest {
1666
+ class GetMultiSocialPostsResponse {
1653
1667
  static fromProto(proto) {
1654
- let m = new DeleteSocialPostRequest();
1668
+ let m = new GetMultiSocialPostsResponse();
1655
1669
  m = Object.assign(m, proto);
1670
+ if (proto.socialPosts) {
1671
+ m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
1672
+ }
1656
1673
  return m;
1657
1674
  }
1658
1675
  constructor(kwargs) {
@@ -1663,28 +1680,16 @@ class DeleteSocialPostRequest {
1663
1680
  }
1664
1681
  toApiJson() {
1665
1682
  const toReturn = {};
1666
- if (typeof this.businessId !== 'undefined') {
1667
- toReturn['businessId'] = this.businessId;
1668
- }
1669
- if (typeof this.socialPostId !== 'undefined') {
1670
- toReturn['socialPostId'] = this.socialPostId;
1683
+ if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
1684
+ toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
1671
1685
  }
1672
1686
  return toReturn;
1673
1687
  }
1674
1688
  }
1675
- class EditMultilocationPostRequest {
1689
+ class GetMultilocationPostRequest {
1676
1690
  static fromProto(proto) {
1677
- let m = new EditMultilocationPostRequest();
1691
+ let m = new GetMultilocationPostRequest();
1678
1692
  m = Object.assign(m, proto);
1679
- if (proto.scheduledDate) {
1680
- m.scheduledDate = new Date(proto.scheduledDate);
1681
- }
1682
- if (proto.fieldMask) {
1683
- m.fieldMask = FieldMask.fromProto(proto.fieldMask);
1684
- }
1685
- if (proto.locations) {
1686
- m.locations = proto.locations.map(Location.fromProto);
1687
- }
1688
1693
  return m;
1689
1694
  }
1690
1695
  constructor(kwargs) {
@@ -1701,39 +1706,15 @@ class EditMultilocationPostRequest {
1701
1706
  if (typeof this.multilocationId !== 'undefined') {
1702
1707
  toReturn['multilocationId'] = this.multilocationId;
1703
1708
  }
1704
- if (typeof this.text !== 'undefined') {
1705
- toReturn['text'] = this.text;
1706
- }
1707
- if (typeof this.media !== 'undefined') {
1708
- toReturn['media'] = this.media;
1709
- }
1710
- if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
1711
- toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
1712
- }
1713
- if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
1714
- toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
1715
- }
1716
- if (typeof this.gifs !== 'undefined') {
1717
- toReturn['gifs'] = this.gifs;
1718
- }
1719
- if (typeof this.videos !== 'undefined') {
1720
- toReturn['videos'] = this.videos;
1721
- }
1722
- if (typeof this.locations !== 'undefined' && this.locations !== null) {
1723
- toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1724
- }
1725
1709
  return toReturn;
1726
1710
  }
1727
1711
  }
1728
- class EditMultilocationPostResponse {
1712
+ class GetMultilocationPostResponse {
1729
1713
  static fromProto(proto) {
1730
- let m = new EditMultilocationPostResponse();
1714
+ let m = new GetMultilocationPostResponse();
1731
1715
  m = Object.assign(m, proto);
1732
- if (proto.post) {
1733
- m.post = MultilocationPost.fromProto(proto.post);
1734
- }
1735
- if (proto.errors) {
1736
- m.errors = proto.errors.map(MultilocationPostError.fromProto);
1716
+ if (proto.multilocationPost) {
1717
+ m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
1737
1718
  }
1738
1719
  return m;
1739
1720
  }
@@ -1745,22 +1726,16 @@ class EditMultilocationPostResponse {
1745
1726
  }
1746
1727
  toApiJson() {
1747
1728
  const toReturn = {};
1748
- if (typeof this.post !== 'undefined' && this.post !== null) {
1749
- toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
1750
- }
1751
- if (typeof this.errors !== 'undefined' && this.errors !== null) {
1752
- toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
1729
+ if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
1730
+ toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
1753
1731
  }
1754
1732
  return toReturn;
1755
1733
  }
1756
1734
  }
1757
- class PartnerListScheduledSocialPostsRequestFilters {
1735
+ class GetPostTemplateRequest {
1758
1736
  static fromProto(proto) {
1759
- let m = new PartnerListScheduledSocialPostsRequestFilters();
1737
+ let m = new GetPostTemplateRequest();
1760
1738
  m = Object.assign(m, proto);
1761
- if (proto.dateRange) {
1762
- m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
1763
- }
1764
1739
  return m;
1765
1740
  }
1766
1741
  constructor(kwargs) {
@@ -1771,21 +1746,21 @@ class PartnerListScheduledSocialPostsRequestFilters {
1771
1746
  }
1772
1747
  toApiJson() {
1773
1748
  const toReturn = {};
1774
- if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
1775
- toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
1749
+ if (typeof this.accountGroupId !== 'undefined') {
1750
+ toReturn['accountGroupId'] = this.accountGroupId;
1776
1751
  }
1777
- if (typeof this.partnerId !== 'undefined') {
1778
- toReturn['partnerId'] = this.partnerId;
1752
+ if (typeof this.templateId !== 'undefined') {
1753
+ toReturn['templateId'] = this.templateId;
1779
1754
  }
1780
1755
  return toReturn;
1781
1756
  }
1782
1757
  }
1783
- class GenerateCSVForPerformanceStatsRequest {
1758
+ class GetPostTemplateResponse {
1784
1759
  static fromProto(proto) {
1785
- let m = new GenerateCSVForPerformanceStatsRequest();
1760
+ let m = new GetPostTemplateResponse();
1786
1761
  m = Object.assign(m, proto);
1787
- if (proto.postData) {
1788
- m.postData = proto.postData.map(PostData.fromProto);
1762
+ if (proto.postTemplate) {
1763
+ m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
1789
1764
  }
1790
1765
  return m;
1791
1766
  }
@@ -1797,261 +1772,8 @@ class GenerateCSVForPerformanceStatsRequest {
1797
1772
  }
1798
1773
  toApiJson() {
1799
1774
  const toReturn = {};
1800
- if (typeof this.businessId !== 'undefined') {
1801
- toReturn['businessId'] = this.businessId;
1802
- }
1803
- if (typeof this.postData !== 'undefined' && this.postData !== null) {
1804
- toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
1805
- }
1806
- if (typeof this.includeHeaders !== 'undefined') {
1807
- toReturn['includeHeaders'] = this.includeHeaders;
1808
- }
1809
- return toReturn;
1810
- }
1811
- }
1812
- class GenerateCSVForPerformanceStatsResponse {
1813
- static fromProto(proto) {
1814
- let m = new GenerateCSVForPerformanceStatsResponse();
1815
- m = Object.assign(m, proto);
1816
- return m;
1817
- }
1818
- constructor(kwargs) {
1819
- if (!kwargs) {
1820
- return;
1821
- }
1822
- Object.assign(this, kwargs);
1823
- }
1824
- toApiJson() {
1825
- const toReturn = {};
1826
- if (typeof this.generatedId !== 'undefined') {
1827
- toReturn['generatedId'] = this.generatedId;
1828
- }
1829
- return toReturn;
1830
- }
1831
- }
1832
- class GetGeneratedCSVForPerformanceStatsRequest {
1833
- static fromProto(proto) {
1834
- let m = new GetGeneratedCSVForPerformanceStatsRequest();
1835
- m = Object.assign(m, proto);
1836
- return m;
1837
- }
1838
- constructor(kwargs) {
1839
- if (!kwargs) {
1840
- return;
1841
- }
1842
- Object.assign(this, kwargs);
1843
- }
1844
- toApiJson() {
1845
- const toReturn = {};
1846
- if (typeof this.generatedId !== 'undefined') {
1847
- toReturn['generatedId'] = this.generatedId;
1848
- }
1849
- return toReturn;
1850
- }
1851
- }
1852
- class GetGeneratedCSVForPerformanceStatsResponse {
1853
- static fromProto(proto) {
1854
- let m = new GetGeneratedCSVForPerformanceStatsResponse();
1855
- m = Object.assign(m, proto);
1856
- return m;
1857
- }
1858
- constructor(kwargs) {
1859
- if (!kwargs) {
1860
- return;
1861
- }
1862
- Object.assign(this, kwargs);
1863
- }
1864
- toApiJson() {
1865
- const toReturn = {};
1866
- if (typeof this.url !== 'undefined') {
1867
- toReturn['url'] = this.url;
1868
- }
1869
- return toReturn;
1870
- }
1871
- }
1872
- class GetMultiSocialPostStatsRequest {
1873
- static fromProto(proto) {
1874
- let m = new GetMultiSocialPostStatsRequest();
1875
- m = Object.assign(m, proto);
1876
- return m;
1877
- }
1878
- constructor(kwargs) {
1879
- if (!kwargs) {
1880
- return;
1881
- }
1882
- Object.assign(this, kwargs);
1883
- }
1884
- toApiJson() {
1885
- const toReturn = {};
1886
- if (typeof this.internalPostIds !== 'undefined') {
1887
- toReturn['internalPostIds'] = this.internalPostIds;
1888
- }
1889
- if (typeof this.businessId !== 'undefined') {
1890
- toReturn['businessId'] = this.businessId;
1891
- }
1892
- if (typeof this.partnerId !== 'undefined') {
1893
- toReturn['partnerId'] = this.partnerId;
1894
- }
1895
- return toReturn;
1896
- }
1897
- }
1898
- class GetMultiSocialPostStatsResponse {
1899
- static fromProto(proto) {
1900
- let m = new GetMultiSocialPostStatsResponse();
1901
- m = Object.assign(m, proto);
1902
- if (proto.socialPostStats) {
1903
- m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
1904
- }
1905
- return m;
1906
- }
1907
- constructor(kwargs) {
1908
- if (!kwargs) {
1909
- return;
1910
- }
1911
- Object.assign(this, kwargs);
1912
- }
1913
- toApiJson() {
1914
- const toReturn = {};
1915
- if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
1916
- toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
1917
- }
1918
- return toReturn;
1919
- }
1920
- }
1921
- class GetMultiSocialPostsRequest {
1922
- static fromProto(proto) {
1923
- let m = new GetMultiSocialPostsRequest();
1924
- m = Object.assign(m, proto);
1925
- return m;
1926
- }
1927
- constructor(kwargs) {
1928
- if (!kwargs) {
1929
- return;
1930
- }
1931
- Object.assign(this, kwargs);
1932
- }
1933
- toApiJson() {
1934
- const toReturn = {};
1935
- if (typeof this.businessId !== 'undefined') {
1936
- toReturn['businessId'] = this.businessId;
1937
- }
1938
- if (typeof this.internalPostIds !== 'undefined') {
1939
- toReturn['internalPostIds'] = this.internalPostIds;
1940
- }
1941
- return toReturn;
1942
- }
1943
- }
1944
- class GetMultiSocialPostsResponse {
1945
- static fromProto(proto) {
1946
- let m = new GetMultiSocialPostsResponse();
1947
- m = Object.assign(m, proto);
1948
- if (proto.socialPosts) {
1949
- m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
1950
- }
1951
- return m;
1952
- }
1953
- constructor(kwargs) {
1954
- if (!kwargs) {
1955
- return;
1956
- }
1957
- Object.assign(this, kwargs);
1958
- }
1959
- toApiJson() {
1960
- const toReturn = {};
1961
- if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
1962
- toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
1963
- }
1964
- return toReturn;
1965
- }
1966
- }
1967
- class GetMultilocationPostRequest {
1968
- static fromProto(proto) {
1969
- let m = new GetMultilocationPostRequest();
1970
- m = Object.assign(m, proto);
1971
- return m;
1972
- }
1973
- constructor(kwargs) {
1974
- if (!kwargs) {
1975
- return;
1976
- }
1977
- Object.assign(this, kwargs);
1978
- }
1979
- toApiJson() {
1980
- const toReturn = {};
1981
- if (typeof this.brandId !== 'undefined') {
1982
- toReturn['brandId'] = this.brandId;
1983
- }
1984
- if (typeof this.multilocationId !== 'undefined') {
1985
- toReturn['multilocationId'] = this.multilocationId;
1986
- }
1987
- return toReturn;
1988
- }
1989
- }
1990
- class GetMultilocationPostResponse {
1991
- static fromProto(proto) {
1992
- let m = new GetMultilocationPostResponse();
1993
- m = Object.assign(m, proto);
1994
- if (proto.multilocationPost) {
1995
- m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
1996
- }
1997
- return m;
1998
- }
1999
- constructor(kwargs) {
2000
- if (!kwargs) {
2001
- return;
2002
- }
2003
- Object.assign(this, kwargs);
2004
- }
2005
- toApiJson() {
2006
- const toReturn = {};
2007
- if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
2008
- toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
2009
- }
2010
- return toReturn;
2011
- }
2012
- }
2013
- class GetPostTemplateRequest {
2014
- static fromProto(proto) {
2015
- let m = new GetPostTemplateRequest();
2016
- m = Object.assign(m, proto);
2017
- return m;
2018
- }
2019
- constructor(kwargs) {
2020
- if (!kwargs) {
2021
- return;
2022
- }
2023
- Object.assign(this, kwargs);
2024
- }
2025
- toApiJson() {
2026
- const toReturn = {};
2027
- if (typeof this.accountGroupId !== 'undefined') {
2028
- toReturn['accountGroupId'] = this.accountGroupId;
2029
- }
2030
- if (typeof this.templateId !== 'undefined') {
2031
- toReturn['templateId'] = this.templateId;
2032
- }
2033
- return toReturn;
2034
- }
2035
- }
2036
- class GetPostTemplateResponse {
2037
- static fromProto(proto) {
2038
- let m = new GetPostTemplateResponse();
2039
- m = Object.assign(m, proto);
2040
- if (proto.postTemplate) {
2041
- m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
2042
- }
2043
- return m;
2044
- }
2045
- constructor(kwargs) {
2046
- if (!kwargs) {
2047
- return;
2048
- }
2049
- Object.assign(this, kwargs);
2050
- }
2051
- toApiJson() {
2052
- const toReturn = {};
2053
- if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
2054
- toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
1775
+ if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
1776
+ toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
2055
1777
  }
2056
1778
  return toReturn;
2057
1779
  }
@@ -2191,7 +1913,7 @@ class ListMultilocationPostsForBrandResponse {
2191
1913
  m.multilocationPosts = proto.multilocationPosts.map(MultilocationPost.fromProto);
2192
1914
  }
2193
1915
  if (proto.failedSocialPosts) {
2194
- m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
1916
+ m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost$1.fromProto);
2195
1917
  }
2196
1918
  return m;
2197
1919
  }
@@ -2395,7 +2117,7 @@ class ListSocialPostsResponse {
2395
2117
  let m = new ListSocialPostsResponse();
2396
2118
  m = Object.assign(m, proto);
2397
2119
  if (proto.socialPosts) {
2398
- m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
2120
+ m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
2399
2121
  }
2400
2122
  return m;
2401
2123
  }
@@ -2494,7 +2216,7 @@ class PartnerListScheduledPostsResponse {
2494
2216
  let m = new PartnerListScheduledPostsResponse();
2495
2217
  m = Object.assign(m, proto);
2496
2218
  if (proto.socialPosts) {
2497
- m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
2219
+ m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
2498
2220
  }
2499
2221
  return m;
2500
2222
  }
@@ -2662,7 +2384,7 @@ class RemoveFromMultilocationPostRequest {
2662
2384
  let m = new RemoveFromMultilocationPostRequest();
2663
2385
  m = Object.assign(m, proto);
2664
2386
  if (proto.reason) {
2665
- m.reason = enumStringToValue$2(RemoveReason, proto.reason);
2387
+ m.reason = enumStringToValue$3(RemoveReason, proto.reason);
2666
2388
  }
2667
2389
  if (proto.locations) {
2668
2390
  m.locations = proto.locations.map(Location.fromProto);
@@ -2718,13 +2440,308 @@ class ReplaceHashtagsRequest {
2718
2440
  return toReturn;
2719
2441
  }
2720
2442
  }
2721
- class SchedulePostRequest {
2443
+ class SchedulePostRequest {
2444
+ static fromProto(proto) {
2445
+ let m = new SchedulePostRequest();
2446
+ m = Object.assign(m, proto);
2447
+ if (proto.socialPost) {
2448
+ m.socialPost = SocialPostData.fromProto(proto.socialPost);
2449
+ }
2450
+ return m;
2451
+ }
2452
+ constructor(kwargs) {
2453
+ if (!kwargs) {
2454
+ return;
2455
+ }
2456
+ Object.assign(this, kwargs);
2457
+ }
2458
+ toApiJson() {
2459
+ const toReturn = {};
2460
+ if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2461
+ toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2462
+ }
2463
+ if (typeof this.socialServiceIds !== 'undefined') {
2464
+ toReturn['socialServiceIds'] = this.socialServiceIds;
2465
+ }
2466
+ if (typeof this.partnerId !== 'undefined') {
2467
+ toReturn['partnerId'] = this.partnerId;
2468
+ }
2469
+ if (typeof this.businessId !== 'undefined') {
2470
+ toReturn['businessId'] = this.businessId;
2471
+ }
2472
+ return toReturn;
2473
+ }
2474
+ }
2475
+ class SchedulePostResponse {
2476
+ static fromProto(proto) {
2477
+ let m = new SchedulePostResponse();
2478
+ m = Object.assign(m, proto);
2479
+ if (proto.statuses) {
2480
+ m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
2481
+ }
2482
+ return m;
2483
+ }
2484
+ constructor(kwargs) {
2485
+ if (!kwargs) {
2486
+ return;
2487
+ }
2488
+ Object.assign(this, kwargs);
2489
+ }
2490
+ toApiJson() {
2491
+ const toReturn = {};
2492
+ if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2493
+ toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2494
+ }
2495
+ return toReturn;
2496
+ }
2497
+ }
2498
+ class ScheduleToAllPagesRequest {
2499
+ static fromProto(proto) {
2500
+ let m = new ScheduleToAllPagesRequest();
2501
+ m = Object.assign(m, proto);
2502
+ if (proto.socialPost) {
2503
+ m.socialPost = SocialPostData.fromProto(proto.socialPost);
2504
+ }
2505
+ return m;
2506
+ }
2507
+ constructor(kwargs) {
2508
+ if (!kwargs) {
2509
+ return;
2510
+ }
2511
+ Object.assign(this, kwargs);
2512
+ }
2513
+ toApiJson() {
2514
+ const toReturn = {};
2515
+ if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2516
+ toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2517
+ }
2518
+ if (typeof this.partnerId !== 'undefined') {
2519
+ toReturn['partnerId'] = this.partnerId;
2520
+ }
2521
+ if (typeof this.businessId !== 'undefined') {
2522
+ toReturn['businessId'] = this.businessId;
2523
+ }
2524
+ return toReturn;
2525
+ }
2526
+ }
2527
+ class ScheduleToAllPagesResponse {
2528
+ static fromProto(proto) {
2529
+ let m = new ScheduleToAllPagesResponse();
2530
+ m = Object.assign(m, proto);
2531
+ if (proto.statuses) {
2532
+ m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
2533
+ }
2534
+ return m;
2535
+ }
2536
+ constructor(kwargs) {
2537
+ if (!kwargs) {
2538
+ return;
2539
+ }
2540
+ Object.assign(this, kwargs);
2541
+ }
2542
+ toApiJson() {
2543
+ const toReturn = {};
2544
+ if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2545
+ toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2546
+ }
2547
+ return toReturn;
2548
+ }
2549
+ }
2550
+ class SearchHashtagRequest {
2551
+ static fromProto(proto) {
2552
+ let m = new SearchHashtagRequest();
2553
+ m = Object.assign(m, proto);
2554
+ if (proto.limit) {
2555
+ m.limit = parseInt(proto.limit, 10);
2556
+ }
2557
+ return m;
2558
+ }
2559
+ constructor(kwargs) {
2560
+ if (!kwargs) {
2561
+ return;
2562
+ }
2563
+ Object.assign(this, kwargs);
2564
+ }
2565
+ toApiJson() {
2566
+ const toReturn = {};
2567
+ if (typeof this.searchTerm !== 'undefined') {
2568
+ toReturn['searchTerm'] = this.searchTerm;
2569
+ }
2570
+ if (typeof this.limit !== 'undefined') {
2571
+ toReturn['limit'] = this.limit;
2572
+ }
2573
+ if (typeof this.businessId !== 'undefined') {
2574
+ toReturn['businessId'] = this.businessId;
2575
+ }
2576
+ if (typeof this.partnerId !== 'undefined') {
2577
+ toReturn['partnerId'] = this.partnerId;
2578
+ }
2579
+ return toReturn;
2580
+ }
2581
+ }
2582
+ class SearchHashtagResponse {
2583
+ static fromProto(proto) {
2584
+ let m = new SearchHashtagResponse();
2585
+ m = Object.assign(m, proto);
2586
+ if (proto.hashtags) {
2587
+ m.hashtags = proto.hashtags.map(Hashtag.fromProto);
2588
+ }
2589
+ return m;
2590
+ }
2591
+ constructor(kwargs) {
2592
+ if (!kwargs) {
2593
+ return;
2594
+ }
2595
+ Object.assign(this, kwargs);
2596
+ }
2597
+ toApiJson() {
2598
+ const toReturn = {};
2599
+ if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
2600
+ toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
2601
+ }
2602
+ return toReturn;
2603
+ }
2604
+ }
2605
+ class SuggestMessageRequest {
2606
+ static fromProto(proto) {
2607
+ let m = new SuggestMessageRequest();
2608
+ m = Object.assign(m, proto);
2609
+ if (proto.length) {
2610
+ m.length = enumStringToValue$3(MessageLength, proto.length);
2611
+ }
2612
+ if (proto.type) {
2613
+ m.type = enumStringToValue$3(TemplateType, proto.type);
2614
+ }
2615
+ return m;
2616
+ }
2617
+ constructor(kwargs) {
2618
+ if (!kwargs) {
2619
+ return;
2620
+ }
2621
+ Object.assign(this, kwargs);
2622
+ }
2623
+ toApiJson() {
2624
+ const toReturn = {};
2625
+ if (typeof this.prompt !== 'undefined') {
2626
+ toReturn['prompt'] = this.prompt;
2627
+ }
2628
+ if (typeof this.businessId !== 'undefined') {
2629
+ toReturn['businessId'] = this.businessId;
2630
+ }
2631
+ if (typeof this.length !== 'undefined') {
2632
+ toReturn['length'] = this.length;
2633
+ }
2634
+ if (typeof this.type !== 'undefined') {
2635
+ toReturn['type'] = this.type;
2636
+ }
2637
+ return toReturn;
2638
+ }
2639
+ }
2640
+ class SuggestMessageResponse {
2641
+ static fromProto(proto) {
2642
+ let m = new SuggestMessageResponse();
2643
+ m = Object.assign(m, proto);
2644
+ return m;
2645
+ }
2646
+ constructor(kwargs) {
2647
+ if (!kwargs) {
2648
+ return;
2649
+ }
2650
+ Object.assign(this, kwargs);
2651
+ }
2652
+ toApiJson() {
2653
+ const toReturn = {};
2654
+ if (typeof this.message !== 'undefined') {
2655
+ toReturn['message'] = this.message;
2656
+ }
2657
+ return toReturn;
2658
+ }
2659
+ }
2660
+ class UpdatePostTemplateRequest {
2661
+ static fromProto(proto) {
2662
+ let m = new UpdatePostTemplateRequest();
2663
+ m = Object.assign(m, proto);
2664
+ if (proto.postDateTime) {
2665
+ m.postDateTime = new Date(proto.postDateTime);
2666
+ }
2667
+ if (proto.mediaEntries) {
2668
+ m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
2669
+ }
2670
+ if (proto.metaData) {
2671
+ m.metaData = proto.metaData.map(MetaData.fromProto);
2672
+ }
2673
+ if (proto.postType) {
2674
+ m.postType = enumStringToValue$3(PostType$1, proto.postType);
2675
+ }
2676
+ return m;
2677
+ }
2678
+ constructor(kwargs) {
2679
+ if (!kwargs) {
2680
+ return;
2681
+ }
2682
+ Object.assign(this, kwargs);
2683
+ }
2684
+ toApiJson() {
2685
+ const toReturn = {};
2686
+ if (typeof this.accountGroupId !== 'undefined') {
2687
+ toReturn['accountGroupId'] = this.accountGroupId;
2688
+ }
2689
+ if (typeof this.templateId !== 'undefined') {
2690
+ toReturn['templateId'] = this.templateId;
2691
+ }
2692
+ if (typeof this.title !== 'undefined') {
2693
+ toReturn['title'] = this.title;
2694
+ }
2695
+ if (typeof this.postText !== 'undefined') {
2696
+ toReturn['postText'] = this.postText;
2697
+ }
2698
+ if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
2699
+ toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
2700
+ }
2701
+ if (typeof this.gmbPostCustomization !== 'undefined') {
2702
+ toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
2703
+ }
2704
+ if (typeof this.imageUrl !== 'undefined') {
2705
+ toReturn['imageUrl'] = this.imageUrl;
2706
+ }
2707
+ if (typeof this.imagePath !== 'undefined') {
2708
+ toReturn['imagePath'] = this.imagePath;
2709
+ }
2710
+ if (typeof this.imageSize !== 'undefined') {
2711
+ toReturn['imageSize'] = this.imageSize;
2712
+ }
2713
+ if (typeof this.previews !== 'undefined') {
2714
+ toReturn['previews'] = this.previews;
2715
+ }
2716
+ if (typeof this.options !== 'undefined') {
2717
+ toReturn['options'] = this.options;
2718
+ }
2719
+ if (typeof this.videoUrl !== 'undefined') {
2720
+ toReturn['videoUrl'] = this.videoUrl;
2721
+ }
2722
+ if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
2723
+ toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
2724
+ }
2725
+ if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
2726
+ toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
2727
+ }
2728
+ if (typeof this.postType !== 'undefined') {
2729
+ toReturn['postType'] = this.postType;
2730
+ }
2731
+ return toReturn;
2732
+ }
2733
+ }
2734
+
2735
+ function enumStringToValue$2(enumRef, value) {
2736
+ if (typeof value === 'number') {
2737
+ return value;
2738
+ }
2739
+ return enumRef[value];
2740
+ }
2741
+ class Link {
2722
2742
  static fromProto(proto) {
2723
- let m = new SchedulePostRequest();
2743
+ let m = new Link();
2724
2744
  m = Object.assign(m, proto);
2725
- if (proto.socialPost) {
2726
- m.socialPost = SocialPostData.fromProto(proto.socialPost);
2727
- }
2728
2745
  return m;
2729
2746
  }
2730
2747
  constructor(kwargs) {
@@ -2735,51 +2752,31 @@ class SchedulePostRequest {
2735
2752
  }
2736
2753
  toApiJson() {
2737
2754
  const toReturn = {};
2738
- if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2739
- toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2740
- }
2741
- if (typeof this.socialServiceIds !== 'undefined') {
2742
- toReturn['socialServiceIds'] = this.socialServiceIds;
2755
+ if (typeof this.name !== 'undefined') {
2756
+ toReturn['name'] = this.name;
2743
2757
  }
2744
- if (typeof this.partnerId !== 'undefined') {
2745
- toReturn['partnerId'] = this.partnerId;
2758
+ if (typeof this.picture !== 'undefined') {
2759
+ toReturn['picture'] = this.picture;
2746
2760
  }
2747
- if (typeof this.businessId !== 'undefined') {
2748
- toReturn['businessId'] = this.businessId;
2761
+ if (typeof this.description !== 'undefined') {
2762
+ toReturn['description'] = this.description;
2749
2763
  }
2750
- return toReturn;
2751
- }
2752
- }
2753
- class SchedulePostResponse {
2754
- static fromProto(proto) {
2755
- let m = new SchedulePostResponse();
2756
- m = Object.assign(m, proto);
2757
- if (proto.statuses) {
2758
- m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
2764
+ if (typeof this.title !== 'undefined') {
2765
+ toReturn['title'] = this.title;
2759
2766
  }
2760
- return m;
2761
- }
2762
- constructor(kwargs) {
2763
- if (!kwargs) {
2764
- return;
2767
+ if (typeof this.url !== 'undefined') {
2768
+ toReturn['url'] = this.url;
2765
2769
  }
2766
- Object.assign(this, kwargs);
2767
- }
2768
- toApiJson() {
2769
- const toReturn = {};
2770
- if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2771
- toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2770
+ if (typeof this.shortcode !== 'undefined') {
2771
+ toReturn['shortcode'] = this.shortcode;
2772
2772
  }
2773
2773
  return toReturn;
2774
2774
  }
2775
2775
  }
2776
- class ScheduleToAllPagesRequest {
2776
+ class Metadata {
2777
2777
  static fromProto(proto) {
2778
- let m = new ScheduleToAllPagesRequest();
2778
+ let m = new Metadata();
2779
2779
  m = Object.assign(m, proto);
2780
- if (proto.socialPost) {
2781
- m.socialPost = SocialPostData.fromProto(proto.socialPost);
2782
- }
2783
2780
  return m;
2784
2781
  }
2785
2782
  constructor(kwargs) {
@@ -2790,25 +2787,19 @@ class ScheduleToAllPagesRequest {
2790
2787
  }
2791
2788
  toApiJson() {
2792
2789
  const toReturn = {};
2793
- if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2794
- toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2795
- }
2796
- if (typeof this.partnerId !== 'undefined') {
2797
- toReturn['partnerId'] = this.partnerId;
2790
+ if (typeof this.name !== 'undefined') {
2791
+ toReturn['name'] = this.name;
2798
2792
  }
2799
- if (typeof this.businessId !== 'undefined') {
2800
- toReturn['businessId'] = this.businessId;
2793
+ if (typeof this.value !== 'undefined') {
2794
+ toReturn['value'] = this.value;
2801
2795
  }
2802
2796
  return toReturn;
2803
2797
  }
2804
2798
  }
2805
- class ScheduleToAllPagesResponse {
2799
+ class PostAction {
2806
2800
  static fromProto(proto) {
2807
- let m = new ScheduleToAllPagesResponse();
2801
+ let m = new PostAction();
2808
2802
  m = Object.assign(m, proto);
2809
- if (proto.statuses) {
2810
- m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
2811
- }
2812
2803
  return m;
2813
2804
  }
2814
2805
  constructor(kwargs) {
@@ -2819,18 +2810,24 @@ class ScheduleToAllPagesResponse {
2819
2810
  }
2820
2811
  toApiJson() {
2821
2812
  const toReturn = {};
2822
- if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2823
- toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2813
+ if (typeof this.type !== 'undefined') {
2814
+ toReturn['type'] = this.type;
2815
+ }
2816
+ if (typeof this.linkUrl !== 'undefined') {
2817
+ toReturn['linkUrl'] = this.linkUrl;
2824
2818
  }
2825
2819
  return toReturn;
2826
2820
  }
2827
2821
  }
2828
- class SearchHashtagRequest {
2822
+ class PostContent {
2829
2823
  static fromProto(proto) {
2830
- let m = new SearchHashtagRequest();
2824
+ let m = new PostContent();
2831
2825
  m = Object.assign(m, proto);
2832
- if (proto.limit) {
2833
- m.limit = parseInt(proto.limit, 10);
2826
+ if (proto.media) {
2827
+ m.media = proto.media.map(PostMedia.fromProto);
2828
+ }
2829
+ if (proto.link) {
2830
+ m.link = proto.link.map(Link.fromProto);
2834
2831
  }
2835
2832
  return m;
2836
2833
  }
@@ -2842,27 +2839,33 @@ class SearchHashtagRequest {
2842
2839
  }
2843
2840
  toApiJson() {
2844
2841
  const toReturn = {};
2845
- if (typeof this.searchTerm !== 'undefined') {
2846
- toReturn['searchTerm'] = this.searchTerm;
2842
+ if (typeof this.postText !== 'undefined') {
2843
+ toReturn['postText'] = this.postText;
2847
2844
  }
2848
- if (typeof this.limit !== 'undefined') {
2849
- toReturn['limit'] = this.limit;
2845
+ if (typeof this.media !== 'undefined' && this.media !== null) {
2846
+ toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
2850
2847
  }
2851
- if (typeof this.businessId !== 'undefined') {
2852
- toReturn['businessId'] = this.businessId;
2848
+ if (typeof this.link !== 'undefined' && this.link !== null) {
2849
+ toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
2853
2850
  }
2854
- if (typeof this.partnerId !== 'undefined') {
2855
- toReturn['partnerId'] = this.partnerId;
2851
+ if (typeof this.description !== 'undefined') {
2852
+ toReturn['description'] = this.description;
2853
+ }
2854
+ if (typeof this.title !== 'undefined') {
2855
+ toReturn['title'] = this.title;
2856
2856
  }
2857
2857
  return toReturn;
2858
2858
  }
2859
2859
  }
2860
- class SearchHashtagResponse {
2860
+ class PostCustomization {
2861
2861
  static fromProto(proto) {
2862
- let m = new SearchHashtagResponse();
2862
+ let m = new PostCustomization();
2863
2863
  m = Object.assign(m, proto);
2864
- if (proto.hashtags) {
2865
- m.hashtags = proto.hashtags.map(Hashtag.fromProto);
2864
+ if (proto.event) {
2865
+ m.event = PostEvent.fromProto(proto.event);
2866
+ }
2867
+ if (proto.action) {
2868
+ m.action = PostAction.fromProto(proto.action);
2866
2869
  }
2867
2870
  return m;
2868
2871
  }
@@ -2874,21 +2877,24 @@ class SearchHashtagResponse {
2874
2877
  }
2875
2878
  toApiJson() {
2876
2879
  const toReturn = {};
2877
- if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
2878
- toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
2880
+ if (typeof this.event !== 'undefined' && this.event !== null) {
2881
+ toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
2882
+ }
2883
+ if (typeof this.action !== 'undefined' && this.action !== null) {
2884
+ toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
2879
2885
  }
2880
2886
  return toReturn;
2881
2887
  }
2882
2888
  }
2883
- class SuggestMessageRequest {
2889
+ class PostEvent {
2884
2890
  static fromProto(proto) {
2885
- let m = new SuggestMessageRequest();
2891
+ let m = new PostEvent();
2886
2892
  m = Object.assign(m, proto);
2887
- if (proto.length) {
2888
- m.length = enumStringToValue$2(MessageLength, proto.length);
2893
+ if (proto.start) {
2894
+ m.start = new Date(proto.start);
2889
2895
  }
2890
- if (proto.type) {
2891
- m.type = enumStringToValue$2(TemplateType, proto.type);
2896
+ if (proto.end) {
2897
+ m.end = new Date(proto.end);
2892
2898
  }
2893
2899
  return m;
2894
2900
  }
@@ -2900,25 +2906,25 @@ class SuggestMessageRequest {
2900
2906
  }
2901
2907
  toApiJson() {
2902
2908
  const toReturn = {};
2903
- if (typeof this.prompt !== 'undefined') {
2904
- toReturn['prompt'] = this.prompt;
2905
- }
2906
- if (typeof this.businessId !== 'undefined') {
2907
- toReturn['businessId'] = this.businessId;
2909
+ if (typeof this.title !== 'undefined') {
2910
+ toReturn['title'] = this.title;
2908
2911
  }
2909
- if (typeof this.length !== 'undefined') {
2910
- toReturn['length'] = this.length;
2912
+ if (typeof this.start !== 'undefined' && this.start !== null) {
2913
+ toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
2911
2914
  }
2912
- if (typeof this.type !== 'undefined') {
2913
- toReturn['type'] = this.type;
2915
+ if (typeof this.end !== 'undefined' && this.end !== null) {
2916
+ toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
2914
2917
  }
2915
2918
  return toReturn;
2916
2919
  }
2917
2920
  }
2918
- class SuggestMessageResponse {
2921
+ class PostMedia {
2919
2922
  static fromProto(proto) {
2920
- let m = new SuggestMessageResponse();
2923
+ let m = new PostMedia();
2921
2924
  m = Object.assign(m, proto);
2925
+ if (proto.metadata) {
2926
+ m.metadata = proto.metadata.map(Metadata.fromProto);
2927
+ }
2922
2928
  return m;
2923
2929
  }
2924
2930
  constructor(kwargs) {
@@ -2929,28 +2935,43 @@ class SuggestMessageResponse {
2929
2935
  }
2930
2936
  toApiJson() {
2931
2937
  const toReturn = {};
2932
- if (typeof this.message !== 'undefined') {
2933
- toReturn['message'] = this.message;
2938
+ if (typeof this.mediaId !== 'undefined') {
2939
+ toReturn['mediaId'] = this.mediaId;
2940
+ }
2941
+ if (typeof this.mediaUrl !== 'undefined') {
2942
+ toReturn['mediaUrl'] = this.mediaUrl;
2943
+ }
2944
+ if (typeof this.mediaType !== 'undefined') {
2945
+ toReturn['mediaType'] = this.mediaType;
2946
+ }
2947
+ if (typeof this.containerId !== 'undefined') {
2948
+ toReturn['containerId'] = this.containerId;
2949
+ }
2950
+ if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
2951
+ toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
2934
2952
  }
2935
2953
  return toReturn;
2936
2954
  }
2937
2955
  }
2938
- class UpdatePostTemplateRequest {
2956
+ class SocialPost {
2939
2957
  static fromProto(proto) {
2940
- let m = new UpdatePostTemplateRequest();
2958
+ let m = new SocialPost();
2941
2959
  m = Object.assign(m, proto);
2942
- if (proto.postDateTime) {
2943
- m.postDateTime = new Date(proto.postDateTime);
2960
+ if (proto.postContent) {
2961
+ m.postContent = PostContent.fromProto(proto.postContent);
2944
2962
  }
2945
- if (proto.mediaEntries) {
2946
- m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
2963
+ if (proto.scheduled) {
2964
+ m.scheduled = new Date(proto.scheduled);
2947
2965
  }
2948
- if (proto.metaData) {
2949
- m.metaData = proto.metaData.map(MetaData.fromProto);
2966
+ if (proto.customization) {
2967
+ m.customization = PostCustomization.fromProto(proto.customization);
2950
2968
  }
2951
2969
  if (proto.postType) {
2952
2970
  m.postType = enumStringToValue$2(PostType$1, proto.postType);
2953
2971
  }
2972
+ if (proto.metadata) {
2973
+ m.metadata = proto.metadata.map(Metadata.fromProto);
2974
+ }
2954
2975
  return m;
2955
2976
  }
2956
2977
  constructor(kwargs) {
@@ -2961,51 +2982,30 @@ class UpdatePostTemplateRequest {
2961
2982
  }
2962
2983
  toApiJson() {
2963
2984
  const toReturn = {};
2964
- if (typeof this.accountGroupId !== 'undefined') {
2965
- toReturn['accountGroupId'] = this.accountGroupId;
2966
- }
2967
- if (typeof this.templateId !== 'undefined') {
2968
- toReturn['templateId'] = this.templateId;
2969
- }
2970
- if (typeof this.title !== 'undefined') {
2971
- toReturn['title'] = this.title;
2972
- }
2973
- if (typeof this.postText !== 'undefined') {
2974
- toReturn['postText'] = this.postText;
2975
- }
2976
- if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
2977
- toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
2978
- }
2979
- if (typeof this.gmbPostCustomization !== 'undefined') {
2980
- toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
2981
- }
2982
- if (typeof this.imageUrl !== 'undefined') {
2983
- toReturn['imageUrl'] = this.imageUrl;
2984
- }
2985
- if (typeof this.imagePath !== 'undefined') {
2986
- toReturn['imagePath'] = this.imagePath;
2987
- }
2988
- if (typeof this.imageSize !== 'undefined') {
2989
- toReturn['imageSize'] = this.imageSize;
2990
- }
2991
- if (typeof this.previews !== 'undefined') {
2992
- toReturn['previews'] = this.previews;
2985
+ if (typeof this.businessId !== 'undefined') {
2986
+ toReturn['businessId'] = this.businessId;
2993
2987
  }
2994
- if (typeof this.options !== 'undefined') {
2995
- toReturn['options'] = this.options;
2988
+ if (typeof this.socialServiceId !== 'undefined') {
2989
+ toReturn['socialServiceId'] = this.socialServiceId;
2996
2990
  }
2997
- if (typeof this.videoUrl !== 'undefined') {
2998
- toReturn['videoUrl'] = this.videoUrl;
2991
+ if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
2992
+ toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
2999
2993
  }
3000
- if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
3001
- toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
2994
+ if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
2995
+ toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
3002
2996
  }
3003
- if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
3004
- toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
2997
+ if (typeof this.customization !== 'undefined' && this.customization !== null) {
2998
+ toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
3005
2999
  }
3006
3000
  if (typeof this.postType !== 'undefined') {
3007
3001
  toReturn['postType'] = this.postType;
3008
3002
  }
3003
+ if (typeof this.internalPostId !== 'undefined') {
3004
+ toReturn['internalPostId'] = this.internalPostId;
3005
+ }
3006
+ if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
3007
+ toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
3008
+ }
3009
3009
  return toReturn;
3010
3010
  }
3011
3011
  }