@vendasta/social-posts 5.7.0 → 5.9.0

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.
@@ -220,11 +220,11 @@ var SocialPostDeletionStatus;
220
220
  SocialPostDeletionStatus[SocialPostDeletionStatus["FAILED"] = 1] = "FAILED";
221
221
  SocialPostDeletionStatus[SocialPostDeletionStatus["IN_PROGRESS"] = 2] = "IN_PROGRESS";
222
222
  })(SocialPostDeletionStatus || (SocialPostDeletionStatus = {}));
223
- var PostLength;
224
- (function (PostLength) {
225
- PostLength[PostLength["SHORT_FORM"] = 0] = "SHORT_FORM";
226
- PostLength[PostLength["LONG_FORM"] = 1] = "LONG_FORM";
227
- })(PostLength || (PostLength = {}));
223
+ var MessageLength;
224
+ (function (MessageLength) {
225
+ MessageLength[MessageLength["SHORT_FORM"] = 0] = "SHORT_FORM";
226
+ MessageLength[MessageLength["LONG_FORM"] = 1] = "LONG_FORM";
227
+ })(MessageLength || (MessageLength = {}));
228
228
  var PostType$1;
229
229
  (function (PostType) {
230
230
  PostType[PostType["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
@@ -250,6 +250,12 @@ var SocialPostService;
250
250
  SocialPostService[SocialPostService["UNKNOWN"] = 5] = "UNKNOWN";
251
251
  SocialPostService[SocialPostService["INSTAGRAM"] = 6] = "INSTAGRAM";
252
252
  })(SocialPostService || (SocialPostService = {}));
253
+ var TemplateType;
254
+ (function (TemplateType) {
255
+ TemplateType[TemplateType["TEMPLATE_UNSET"] = 0] = "TEMPLATE_UNSET";
256
+ TemplateType[TemplateType["TEMPLATE_CUSTOM"] = 1] = "TEMPLATE_CUSTOM";
257
+ TemplateType[TemplateType["TEMPLATE_SOCIAL_POST"] = 2] = "TEMPLATE_SOCIAL_POST";
258
+ })(TemplateType || (TemplateType = {}));
253
259
 
254
260
  // *********************************
255
261
  // Code generated by sdkgen
@@ -861,7 +867,7 @@ function enumStringToValue$5(enumRef, value) {
861
867
  }
862
868
  return enumRef[value];
863
869
  }
864
- class Link {
870
+ class FacebookPostStats {
865
871
  constructor(kwargs) {
866
872
  if (!kwargs) {
867
873
  return;
@@ -869,34 +875,52 @@ class Link {
869
875
  Object.assign(this, kwargs);
870
876
  }
871
877
  static fromProto(proto) {
872
- let m = new Link();
878
+ let m = new FacebookPostStats();
873
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
+ }
874
895
  return m;
875
896
  }
876
897
  toApiJson() {
877
898
  const toReturn = {};
878
- if (typeof this.name !== 'undefined') {
879
- toReturn['name'] = this.name;
899
+ if (typeof this.commentCount !== 'undefined') {
900
+ toReturn['commentCount'] = this.commentCount;
880
901
  }
881
- if (typeof this.picture !== 'undefined') {
882
- toReturn['picture'] = this.picture;
902
+ if (typeof this.shareCount !== 'undefined') {
903
+ toReturn['shareCount'] = this.shareCount;
883
904
  }
884
- if (typeof this.description !== 'undefined') {
885
- toReturn['description'] = this.description;
905
+ if (typeof this.likeCount !== 'undefined') {
906
+ toReturn['likeCount'] = this.likeCount;
886
907
  }
887
- if (typeof this.title !== 'undefined') {
888
- toReturn['title'] = this.title;
908
+ if (typeof this.hasLike !== 'undefined') {
909
+ toReturn['hasLike'] = this.hasLike;
889
910
  }
890
- if (typeof this.url !== 'undefined') {
891
- toReturn['url'] = this.url;
911
+ if (typeof this.canLike !== 'undefined') {
912
+ toReturn['canLike'] = this.canLike;
892
913
  }
893
- if (typeof this.shortcode !== 'undefined') {
894
- toReturn['shortcode'] = this.shortcode;
914
+ if (typeof this.reactions !== 'undefined') {
915
+ toReturn['reactions'] = this.reactions;
916
+ }
917
+ if (typeof this.peopleReached !== 'undefined') {
918
+ toReturn['peopleReached'] = this.peopleReached;
895
919
  }
896
920
  return toReturn;
897
921
  }
898
922
  }
899
- class Metadata {
923
+ class SocialPostStats {
900
924
  constructor(kwargs) {
901
925
  if (!kwargs) {
902
926
  return;
@@ -904,22 +928,31 @@ class Metadata {
904
928
  Object.assign(this, kwargs);
905
929
  }
906
930
  static fromProto(proto) {
907
- let m = new Metadata();
931
+ let m = new SocialPostStats();
908
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
+ }
909
939
  return m;
910
940
  }
911
941
  toApiJson() {
912
942
  const toReturn = {};
913
- if (typeof this.name !== 'undefined') {
914
- toReturn['name'] = this.name;
943
+ if (typeof this.internalPostId !== 'undefined') {
944
+ toReturn['internalPostId'] = this.internalPostId;
915
945
  }
916
- if (typeof this.value !== 'undefined') {
917
- toReturn['value'] = this.value;
946
+ if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
947
+ toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
948
+ }
949
+ if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
950
+ toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
918
951
  }
919
952
  return toReturn;
920
953
  }
921
954
  }
922
- class PostAction {
955
+ class TwitterPostStats {
923
956
  constructor(kwargs) {
924
957
  if (!kwargs) {
925
958
  return;
@@ -927,22 +960,41 @@ class PostAction {
927
960
  Object.assign(this, kwargs);
928
961
  }
929
962
  static fromProto(proto) {
930
- let m = new PostAction();
963
+ let m = new TwitterPostStats();
931
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
+ }
932
971
  return m;
933
972
  }
934
973
  toApiJson() {
935
974
  const toReturn = {};
936
- if (typeof this.type !== 'undefined') {
937
- toReturn['type'] = this.type;
975
+ if (typeof this.favourites !== 'undefined') {
976
+ toReturn['favourites'] = this.favourites;
938
977
  }
939
- if (typeof this.linkUrl !== 'undefined') {
940
- toReturn['linkUrl'] = this.linkUrl;
978
+ if (typeof this.hasFavourited !== 'undefined') {
979
+ toReturn['hasFavourited'] = this.hasFavourited;
980
+ }
981
+ if (typeof this.retweets !== 'undefined') {
982
+ toReturn['retweets'] = this.retweets;
983
+ }
984
+ if (typeof this.hasRetweeted !== 'undefined') {
985
+ toReturn['hasRetweeted'] = this.hasRetweeted;
941
986
  }
942
987
  return toReturn;
943
988
  }
944
989
  }
945
- class PostContent {
990
+
991
+ function enumStringToValue$4(enumRef, value) {
992
+ if (typeof value === 'number') {
993
+ return value;
994
+ }
995
+ return enumRef[value];
996
+ }
997
+ class TenorGifMediaEntry {
946
998
  constructor(kwargs) {
947
999
  if (!kwargs) {
948
1000
  return;
@@ -950,31 +1002,25 @@ class PostContent {
950
1002
  Object.assign(this, kwargs);
951
1003
  }
952
1004
  static fromProto(proto) {
953
- let m = new PostContent();
1005
+ let m = new TenorGifMediaEntry();
954
1006
  m = Object.assign(m, proto);
955
- if (proto.media) {
956
- m.media = proto.media.map(PostMedia.fromProto);
957
- }
958
- if (proto.link) {
959
- m.link = proto.link.map(Link.fromProto);
1007
+ if (proto.value) {
1008
+ m.value = TenorMediaObject.fromProto(proto.value);
960
1009
  }
961
1010
  return m;
962
1011
  }
963
1012
  toApiJson() {
964
1013
  const toReturn = {};
965
- if (typeof this.postText !== 'undefined') {
966
- toReturn['postText'] = this.postText;
967
- }
968
- if (typeof this.media !== 'undefined' && this.media !== null) {
969
- toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
1014
+ if (typeof this.key !== 'undefined') {
1015
+ toReturn['key'] = this.key;
970
1016
  }
971
- if (typeof this.link !== 'undefined' && this.link !== null) {
972
- toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
1017
+ if (typeof this.value !== 'undefined' && this.value !== null) {
1018
+ toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
973
1019
  }
974
1020
  return toReturn;
975
1021
  }
976
1022
  }
977
- class PostCustomization {
1023
+ class TenorGif {
978
1024
  constructor(kwargs) {
979
1025
  if (!kwargs) {
980
1026
  return;
@@ -982,28 +1028,37 @@ class PostCustomization {
982
1028
  Object.assign(this, kwargs);
983
1029
  }
984
1030
  static fromProto(proto) {
985
- let m = new PostCustomization();
1031
+ let m = new TenorGif();
986
1032
  m = Object.assign(m, proto);
987
- if (proto.event) {
988
- m.event = PostEvent.fromProto(proto.event);
989
- }
990
- if (proto.action) {
991
- 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; }, {});
992
1035
  }
993
1036
  return m;
994
1037
  }
995
1038
  toApiJson() {
996
1039
  const toReturn = {};
997
- if (typeof this.event !== 'undefined' && this.event !== null) {
998
- toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
1040
+ if (typeof this.media !== 'undefined' && this.media !== null) {
1041
+ toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
999
1042
  }
1000
- if (typeof this.action !== 'undefined' && this.action !== null) {
1001
- toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
1043
+ if (typeof this.tags !== 'undefined') {
1044
+ toReturn['tags'] = this.tags;
1045
+ }
1046
+ if (typeof this.hasAudio !== 'undefined') {
1047
+ toReturn['hasAudio'] = this.hasAudio;
1048
+ }
1049
+ if (typeof this.title !== 'undefined') {
1050
+ toReturn['title'] = this.title;
1051
+ }
1052
+ if (typeof this.id !== 'undefined') {
1053
+ toReturn['id'] = this.id;
1054
+ }
1055
+ if (typeof this.created !== 'undefined') {
1056
+ toReturn['created'] = this.created;
1002
1057
  }
1003
1058
  return toReturn;
1004
1059
  }
1005
1060
  }
1006
- class PostEvent {
1061
+ class TenorMediaObject {
1007
1062
  constructor(kwargs) {
1008
1063
  if (!kwargs) {
1009
1064
  return;
@@ -1011,31 +1066,41 @@ class PostEvent {
1011
1066
  Object.assign(this, kwargs);
1012
1067
  }
1013
1068
  static fromProto(proto) {
1014
- let m = new PostEvent();
1069
+ let m = new TenorMediaObject();
1015
1070
  m = Object.assign(m, proto);
1016
- if (proto.start) {
1017
- m.start = new Date(proto.start);
1071
+ if (proto.dimensions) {
1072
+ m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
1018
1073
  }
1019
- if (proto.end) {
1020
- m.end = new Date(proto.end);
1074
+ if (proto.size) {
1075
+ m.size = parseInt(proto.size, 10);
1021
1076
  }
1022
1077
  return m;
1023
1078
  }
1024
1079
  toApiJson() {
1025
1080
  const toReturn = {};
1026
- if (typeof this.title !== 'undefined') {
1027
- toReturn['title'] = this.title;
1081
+ if (typeof this.preview !== 'undefined') {
1082
+ toReturn['preview'] = this.preview;
1028
1083
  }
1029
- if (typeof this.start !== 'undefined' && this.start !== null) {
1030
- toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
1084
+ if (typeof this.url !== 'undefined') {
1085
+ toReturn['url'] = this.url;
1031
1086
  }
1032
- if (typeof this.end !== 'undefined' && this.end !== null) {
1033
- toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
1087
+ if (typeof this.dimensions !== 'undefined') {
1088
+ toReturn['dimensions'] = this.dimensions;
1089
+ }
1090
+ if (typeof this.size !== 'undefined') {
1091
+ toReturn['size'] = this.size;
1034
1092
  }
1035
1093
  return toReturn;
1036
1094
  }
1037
1095
  }
1038
- class PostMedia {
1096
+
1097
+ function enumStringToValue$3(enumRef, value) {
1098
+ if (typeof value === 'number') {
1099
+ return value;
1100
+ }
1101
+ return enumRef[value];
1102
+ }
1103
+ class CreateMultilocationPostRequest {
1039
1104
  constructor(kwargs) {
1040
1105
  if (!kwargs) {
1041
1106
  return;
@@ -1043,34 +1108,43 @@ class PostMedia {
1043
1108
  Object.assign(this, kwargs);
1044
1109
  }
1045
1110
  static fromProto(proto) {
1046
- let m = new PostMedia();
1111
+ let m = new CreateMultilocationPostRequest();
1047
1112
  m = Object.assign(m, proto);
1048
- if (proto.metadata) {
1049
- 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);
1050
1118
  }
1051
1119
  return m;
1052
1120
  }
1053
1121
  toApiJson() {
1054
1122
  const toReturn = {};
1055
- if (typeof this.mediaId !== 'undefined') {
1056
- toReturn['mediaId'] = this.mediaId;
1123
+ if (typeof this.brandId !== 'undefined') {
1124
+ toReturn['brandId'] = this.brandId;
1057
1125
  }
1058
- if (typeof this.mediaUrl !== 'undefined') {
1059
- toReturn['mediaUrl'] = this.mediaUrl;
1126
+ if (typeof this.text !== 'undefined') {
1127
+ toReturn['text'] = this.text;
1060
1128
  }
1061
- if (typeof this.mediaType !== 'undefined') {
1062
- toReturn['mediaType'] = this.mediaType;
1129
+ if (typeof this.media !== 'undefined') {
1130
+ toReturn['media'] = this.media;
1063
1131
  }
1064
- if (typeof this.containerId !== 'undefined') {
1065
- toReturn['containerId'] = this.containerId;
1132
+ if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
1133
+ toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
1066
1134
  }
1067
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
1068
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
1135
+ if (typeof this.locations !== 'undefined' && this.locations !== null) {
1136
+ toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1137
+ }
1138
+ if (typeof this.gifs !== 'undefined') {
1139
+ toReturn['gifs'] = this.gifs;
1140
+ }
1141
+ if (typeof this.videos !== 'undefined') {
1142
+ toReturn['videos'] = this.videos;
1069
1143
  }
1070
1144
  return toReturn;
1071
1145
  }
1072
1146
  }
1073
- class SocialPost {
1147
+ class CreateMultilocationPostResponse {
1074
1148
  constructor(kwargs) {
1075
1149
  if (!kwargs) {
1076
1150
  return;
@@ -1078,38 +1152,91 @@ class SocialPost {
1078
1152
  Object.assign(this, kwargs);
1079
1153
  }
1080
1154
  static fromProto(proto) {
1081
- let m = new SocialPost();
1155
+ let m = new CreateMultilocationPostResponse();
1082
1156
  m = Object.assign(m, proto);
1083
- if (proto.postContent) {
1084
- m.postContent = PostContent.fromProto(proto.postContent);
1085
- }
1086
- if (proto.scheduled) {
1087
- m.scheduled = new Date(proto.scheduled);
1088
- }
1089
- if (proto.customization) {
1090
- m.customization = PostCustomization.fromProto(proto.customization);
1157
+ if (proto.post) {
1158
+ m.post = MultilocationPost.fromProto(proto.post);
1091
1159
  }
1092
- if (proto.postType) {
1093
- m.postType = enumStringToValue$5(PostType$1, proto.postType);
1160
+ if (proto.errors) {
1161
+ m.errors = proto.errors.map(MultilocationPostError.fromProto);
1094
1162
  }
1095
1163
  return m;
1096
1164
  }
1097
1165
  toApiJson() {
1098
1166
  const toReturn = {};
1099
- if (typeof this.businessId !== 'undefined') {
1100
- toReturn['businessId'] = this.businessId;
1167
+ if (typeof this.post !== 'undefined' && this.post !== null) {
1168
+ toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
1101
1169
  }
1102
- if (typeof this.socialServiceId !== 'undefined') {
1103
- toReturn['socialServiceId'] = this.socialServiceId;
1170
+ if (typeof this.errors !== 'undefined' && this.errors !== null) {
1171
+ toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
1104
1172
  }
1105
- if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
1106
- toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
1173
+ return toReturn;
1174
+ }
1175
+ }
1176
+ class CreatePostTemplateRequest {
1177
+ constructor(kwargs) {
1178
+ if (!kwargs) {
1179
+ return;
1107
1180
  }
1108
- if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
1109
- toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
1181
+ Object.assign(this, kwargs);
1182
+ }
1183
+ static fromProto(proto) {
1184
+ let m = new CreatePostTemplateRequest();
1185
+ m = Object.assign(m, proto);
1186
+ if (proto.postDateTime) {
1187
+ m.postDateTime = new Date(proto.postDateTime);
1110
1188
  }
1111
- if (typeof this.customization !== 'undefined' && this.customization !== null) {
1112
- toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
1189
+ if (proto.mediaEntries) {
1190
+ m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
1191
+ }
1192
+ if (proto.metaData) {
1193
+ m.metaData = proto.metaData.map(MetaData.fromProto);
1194
+ }
1195
+ if (proto.postType) {
1196
+ m.postType = enumStringToValue$3(PostType$1, proto.postType);
1197
+ }
1198
+ return m;
1199
+ }
1200
+ toApiJson() {
1201
+ const toReturn = {};
1202
+ if (typeof this.accountGroupId !== 'undefined') {
1203
+ toReturn['accountGroupId'] = this.accountGroupId;
1204
+ }
1205
+ if (typeof this.title !== 'undefined') {
1206
+ toReturn['title'] = this.title;
1207
+ }
1208
+ if (typeof this.postText !== 'undefined') {
1209
+ toReturn['postText'] = this.postText;
1210
+ }
1211
+ if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
1212
+ toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
1213
+ }
1214
+ if (typeof this.gmbPostCustomization !== 'undefined') {
1215
+ toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
1216
+ }
1217
+ if (typeof this.imageUrl !== 'undefined') {
1218
+ toReturn['imageUrl'] = this.imageUrl;
1219
+ }
1220
+ if (typeof this.imagePath !== 'undefined') {
1221
+ toReturn['imagePath'] = this.imagePath;
1222
+ }
1223
+ if (typeof this.imageSize !== 'undefined') {
1224
+ toReturn['imageSize'] = this.imageSize;
1225
+ }
1226
+ if (typeof this.previews !== 'undefined') {
1227
+ toReturn['previews'] = this.previews;
1228
+ }
1229
+ if (typeof this.options !== 'undefined') {
1230
+ toReturn['options'] = this.options;
1231
+ }
1232
+ if (typeof this.videoUrl !== 'undefined') {
1233
+ toReturn['videoUrl'] = this.videoUrl;
1234
+ }
1235
+ if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
1236
+ toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
1237
+ }
1238
+ if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
1239
+ toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
1113
1240
  }
1114
1241
  if (typeof this.postType !== 'undefined') {
1115
1242
  toReturn['postType'] = this.postType;
@@ -1117,14 +1244,7 @@ class SocialPost {
1117
1244
  return toReturn;
1118
1245
  }
1119
1246
  }
1120
-
1121
- function enumStringToValue$4(enumRef, value) {
1122
- if (typeof value === 'number') {
1123
- return value;
1124
- }
1125
- return enumRef[value];
1126
- }
1127
- class FacebookPostStats {
1247
+ class CreatePostTemplateResponse {
1128
1248
  constructor(kwargs) {
1129
1249
  if (!kwargs) {
1130
1250
  return;
@@ -1132,52 +1252,19 @@ class FacebookPostStats {
1132
1252
  Object.assign(this, kwargs);
1133
1253
  }
1134
1254
  static fromProto(proto) {
1135
- let m = new FacebookPostStats();
1255
+ let m = new CreatePostTemplateResponse();
1136
1256
  m = Object.assign(m, proto);
1137
- if (proto.commentCount) {
1138
- m.commentCount = parseInt(proto.commentCount, 10);
1139
- }
1140
- if (proto.shareCount) {
1141
- m.shareCount = parseInt(proto.shareCount, 10);
1142
- }
1143
- if (proto.likeCount) {
1144
- m.likeCount = parseInt(proto.likeCount, 10);
1145
- }
1146
- if (proto.reactions) {
1147
- m.reactions = parseInt(proto.reactions, 10);
1148
- }
1149
- if (proto.peopleReached) {
1150
- m.peopleReached = parseInt(proto.peopleReached, 10);
1151
- }
1152
1257
  return m;
1153
1258
  }
1154
1259
  toApiJson() {
1155
1260
  const toReturn = {};
1156
- if (typeof this.commentCount !== 'undefined') {
1157
- toReturn['commentCount'] = this.commentCount;
1158
- }
1159
- if (typeof this.shareCount !== 'undefined') {
1160
- toReturn['shareCount'] = this.shareCount;
1161
- }
1162
- if (typeof this.likeCount !== 'undefined') {
1163
- toReturn['likeCount'] = this.likeCount;
1164
- }
1165
- if (typeof this.hasLike !== 'undefined') {
1166
- toReturn['hasLike'] = this.hasLike;
1167
- }
1168
- if (typeof this.canLike !== 'undefined') {
1169
- toReturn['canLike'] = this.canLike;
1170
- }
1171
- if (typeof this.reactions !== 'undefined') {
1172
- toReturn['reactions'] = this.reactions;
1173
- }
1174
- if (typeof this.peopleReached !== 'undefined') {
1175
- toReturn['peopleReached'] = this.peopleReached;
1261
+ if (typeof this.templateId !== 'undefined') {
1262
+ toReturn['templateId'] = this.templateId;
1176
1263
  }
1177
1264
  return toReturn;
1178
1265
  }
1179
1266
  }
1180
- class SocialPostStats {
1267
+ class DateRangeFilter {
1181
1268
  constructor(kwargs) {
1182
1269
  if (!kwargs) {
1183
1270
  return;
@@ -1185,31 +1272,28 @@ class SocialPostStats {
1185
1272
  Object.assign(this, kwargs);
1186
1273
  }
1187
1274
  static fromProto(proto) {
1188
- let m = new SocialPostStats();
1275
+ let m = new DateRangeFilter();
1189
1276
  m = Object.assign(m, proto);
1190
- if (proto.facebookPostStats) {
1191
- m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
1277
+ if (proto.beginRange) {
1278
+ m.beginRange = new Date(proto.beginRange);
1192
1279
  }
1193
- if (proto.twitterPostStats) {
1194
- m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
1280
+ if (proto.endRange) {
1281
+ m.endRange = new Date(proto.endRange);
1195
1282
  }
1196
1283
  return m;
1197
1284
  }
1198
1285
  toApiJson() {
1199
1286
  const toReturn = {};
1200
- if (typeof this.internalPostId !== 'undefined') {
1201
- toReturn['internalPostId'] = this.internalPostId;
1202
- }
1203
- if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
1204
- toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
1287
+ if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
1288
+ toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
1205
1289
  }
1206
- if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
1207
- toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
1290
+ if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
1291
+ toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
1208
1292
  }
1209
1293
  return toReturn;
1210
1294
  }
1211
1295
  }
1212
- class TwitterPostStats {
1296
+ class DeleteHashtagsRequest {
1213
1297
  constructor(kwargs) {
1214
1298
  if (!kwargs) {
1215
1299
  return;
@@ -1217,41 +1301,25 @@ class TwitterPostStats {
1217
1301
  Object.assign(this, kwargs);
1218
1302
  }
1219
1303
  static fromProto(proto) {
1220
- let m = new TwitterPostStats();
1304
+ let m = new DeleteHashtagsRequest();
1221
1305
  m = Object.assign(m, proto);
1222
- if (proto.favourites) {
1223
- m.favourites = parseInt(proto.favourites, 10);
1224
- }
1225
- if (proto.retweets) {
1226
- m.retweets = parseInt(proto.retweets, 10);
1227
- }
1228
1306
  return m;
1229
1307
  }
1230
1308
  toApiJson() {
1231
1309
  const toReturn = {};
1232
- if (typeof this.favourites !== 'undefined') {
1233
- toReturn['favourites'] = this.favourites;
1234
- }
1235
- if (typeof this.hasFavourited !== 'undefined') {
1236
- toReturn['hasFavourited'] = this.hasFavourited;
1310
+ if (typeof this.keyword !== 'undefined') {
1311
+ toReturn['keyword'] = this.keyword;
1237
1312
  }
1238
- if (typeof this.retweets !== 'undefined') {
1239
- toReturn['retweets'] = this.retweets;
1313
+ if (typeof this.businessId !== 'undefined') {
1314
+ toReturn['businessId'] = this.businessId;
1240
1315
  }
1241
- if (typeof this.hasRetweeted !== 'undefined') {
1242
- toReturn['hasRetweeted'] = this.hasRetweeted;
1316
+ if (typeof this.partnerId !== 'undefined') {
1317
+ toReturn['partnerId'] = this.partnerId;
1243
1318
  }
1244
1319
  return toReturn;
1245
1320
  }
1246
1321
  }
1247
-
1248
- function enumStringToValue$3(enumRef, value) {
1249
- if (typeof value === 'number') {
1250
- return value;
1251
- }
1252
- return enumRef[value];
1253
- }
1254
- class TenorGifMediaEntry {
1322
+ class DeleteMultilocationPostRequest {
1255
1323
  constructor(kwargs) {
1256
1324
  if (!kwargs) {
1257
1325
  return;
@@ -1259,25 +1327,22 @@ class TenorGifMediaEntry {
1259
1327
  Object.assign(this, kwargs);
1260
1328
  }
1261
1329
  static fromProto(proto) {
1262
- let m = new TenorGifMediaEntry();
1330
+ let m = new DeleteMultilocationPostRequest();
1263
1331
  m = Object.assign(m, proto);
1264
- if (proto.value) {
1265
- m.value = TenorMediaObject.fromProto(proto.value);
1266
- }
1267
1332
  return m;
1268
1333
  }
1269
1334
  toApiJson() {
1270
1335
  const toReturn = {};
1271
- if (typeof this.key !== 'undefined') {
1272
- toReturn['key'] = this.key;
1336
+ if (typeof this.brandId !== 'undefined') {
1337
+ toReturn['brandId'] = this.brandId;
1273
1338
  }
1274
- if (typeof this.value !== 'undefined' && this.value !== null) {
1275
- toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
1339
+ if (typeof this.multilocationId !== 'undefined') {
1340
+ toReturn['multilocationId'] = this.multilocationId;
1276
1341
  }
1277
1342
  return toReturn;
1278
1343
  }
1279
1344
  }
1280
- class TenorGif {
1345
+ class DeletePostTemplateRequest {
1281
1346
  constructor(kwargs) {
1282
1347
  if (!kwargs) {
1283
1348
  return;
@@ -1285,37 +1350,22 @@ class TenorGif {
1285
1350
  Object.assign(this, kwargs);
1286
1351
  }
1287
1352
  static fromProto(proto) {
1288
- let m = new TenorGif();
1353
+ let m = new DeletePostTemplateRequest();
1289
1354
  m = Object.assign(m, proto);
1290
- if (proto.media) {
1291
- m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
1292
- }
1293
1355
  return m;
1294
1356
  }
1295
1357
  toApiJson() {
1296
1358
  const toReturn = {};
1297
- if (typeof this.media !== 'undefined' && this.media !== null) {
1298
- toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
1299
- }
1300
- if (typeof this.tags !== 'undefined') {
1301
- toReturn['tags'] = this.tags;
1302
- }
1303
- if (typeof this.hasAudio !== 'undefined') {
1304
- toReturn['hasAudio'] = this.hasAudio;
1305
- }
1306
- if (typeof this.title !== 'undefined') {
1307
- toReturn['title'] = this.title;
1308
- }
1309
- if (typeof this.id !== 'undefined') {
1310
- toReturn['id'] = this.id;
1359
+ if (typeof this.accountGroupId !== 'undefined') {
1360
+ toReturn['accountGroupId'] = this.accountGroupId;
1311
1361
  }
1312
- if (typeof this.created !== 'undefined') {
1313
- toReturn['created'] = this.created;
1362
+ if (typeof this.templateId !== 'undefined') {
1363
+ toReturn['templateId'] = this.templateId;
1314
1364
  }
1315
1365
  return toReturn;
1316
1366
  }
1317
1367
  }
1318
- class TenorMediaObject {
1368
+ class DeleteSocialPostRequest {
1319
1369
  constructor(kwargs) {
1320
1370
  if (!kwargs) {
1321
1371
  return;
@@ -1323,41 +1373,22 @@ class TenorMediaObject {
1323
1373
  Object.assign(this, kwargs);
1324
1374
  }
1325
1375
  static fromProto(proto) {
1326
- let m = new TenorMediaObject();
1376
+ let m = new DeleteSocialPostRequest();
1327
1377
  m = Object.assign(m, proto);
1328
- if (proto.dimensions) {
1329
- m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
1330
- }
1331
- if (proto.size) {
1332
- m.size = parseInt(proto.size, 10);
1333
- }
1334
1378
  return m;
1335
1379
  }
1336
1380
  toApiJson() {
1337
1381
  const toReturn = {};
1338
- if (typeof this.preview !== 'undefined') {
1339
- toReturn['preview'] = this.preview;
1340
- }
1341
- if (typeof this.url !== 'undefined') {
1342
- toReturn['url'] = this.url;
1343
- }
1344
- if (typeof this.dimensions !== 'undefined') {
1345
- toReturn['dimensions'] = this.dimensions;
1382
+ if (typeof this.businessId !== 'undefined') {
1383
+ toReturn['businessId'] = this.businessId;
1346
1384
  }
1347
- if (typeof this.size !== 'undefined') {
1348
- toReturn['size'] = this.size;
1385
+ if (typeof this.socialPostId !== 'undefined') {
1386
+ toReturn['socialPostId'] = this.socialPostId;
1349
1387
  }
1350
1388
  return toReturn;
1351
1389
  }
1352
1390
  }
1353
-
1354
- function enumStringToValue$2(enumRef, value) {
1355
- if (typeof value === 'number') {
1356
- return value;
1357
- }
1358
- return enumRef[value];
1359
- }
1360
- class CreateMultilocationPostRequest {
1391
+ class EditMultilocationPostRequest {
1361
1392
  constructor(kwargs) {
1362
1393
  if (!kwargs) {
1363
1394
  return;
@@ -1365,11 +1396,14 @@ class CreateMultilocationPostRequest {
1365
1396
  Object.assign(this, kwargs);
1366
1397
  }
1367
1398
  static fromProto(proto) {
1368
- let m = new CreateMultilocationPostRequest();
1399
+ let m = new EditMultilocationPostRequest();
1369
1400
  m = Object.assign(m, proto);
1370
1401
  if (proto.scheduledDate) {
1371
1402
  m.scheduledDate = new Date(proto.scheduledDate);
1372
1403
  }
1404
+ if (proto.fieldMask) {
1405
+ m.fieldMask = FieldMask.fromProto(proto.fieldMask);
1406
+ }
1373
1407
  if (proto.locations) {
1374
1408
  m.locations = proto.locations.map(Location.fromProto);
1375
1409
  }
@@ -1380,6 +1414,9 @@ class CreateMultilocationPostRequest {
1380
1414
  if (typeof this.brandId !== 'undefined') {
1381
1415
  toReturn['brandId'] = this.brandId;
1382
1416
  }
1417
+ if (typeof this.multilocationId !== 'undefined') {
1418
+ toReturn['multilocationId'] = this.multilocationId;
1419
+ }
1383
1420
  if (typeof this.text !== 'undefined') {
1384
1421
  toReturn['text'] = this.text;
1385
1422
  }
@@ -1389,8 +1426,8 @@ class CreateMultilocationPostRequest {
1389
1426
  if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
1390
1427
  toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
1391
1428
  }
1392
- if (typeof this.locations !== 'undefined' && this.locations !== null) {
1393
- toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1429
+ if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
1430
+ toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
1394
1431
  }
1395
1432
  if (typeof this.gifs !== 'undefined') {
1396
1433
  toReturn['gifs'] = this.gifs;
@@ -1398,10 +1435,13 @@ class CreateMultilocationPostRequest {
1398
1435
  if (typeof this.videos !== 'undefined') {
1399
1436
  toReturn['videos'] = this.videos;
1400
1437
  }
1438
+ if (typeof this.locations !== 'undefined' && this.locations !== null) {
1439
+ toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1440
+ }
1401
1441
  return toReturn;
1402
1442
  }
1403
1443
  }
1404
- class CreateMultilocationPostResponse {
1444
+ class EditMultilocationPostResponse {
1405
1445
  constructor(kwargs) {
1406
1446
  if (!kwargs) {
1407
1447
  return;
@@ -1409,7 +1449,7 @@ class CreateMultilocationPostResponse {
1409
1449
  Object.assign(this, kwargs);
1410
1450
  }
1411
1451
  static fromProto(proto) {
1412
- let m = new CreateMultilocationPostResponse();
1452
+ let m = new EditMultilocationPostResponse();
1413
1453
  m = Object.assign(m, proto);
1414
1454
  if (proto.post) {
1415
1455
  m.post = MultilocationPost.fromProto(proto.post);
@@ -1430,7 +1470,7 @@ class CreateMultilocationPostResponse {
1430
1470
  return toReturn;
1431
1471
  }
1432
1472
  }
1433
- class CreatePostTemplateRequest {
1473
+ class PartnerListScheduledSocialPostsRequestFilters {
1434
1474
  constructor(kwargs) {
1435
1475
  if (!kwargs) {
1436
1476
  return;
@@ -1438,70 +1478,25 @@ class CreatePostTemplateRequest {
1438
1478
  Object.assign(this, kwargs);
1439
1479
  }
1440
1480
  static fromProto(proto) {
1441
- let m = new CreatePostTemplateRequest();
1481
+ let m = new PartnerListScheduledSocialPostsRequestFilters();
1442
1482
  m = Object.assign(m, proto);
1443
- if (proto.postDateTime) {
1444
- m.postDateTime = new Date(proto.postDateTime);
1445
- }
1446
- if (proto.mediaEntries) {
1447
- m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
1448
- }
1449
- if (proto.metaData) {
1450
- m.metaData = proto.metaData.map(MetaData.fromProto);
1451
- }
1452
- if (proto.postType) {
1453
- m.postType = enumStringToValue$2(PostType$1, proto.postType);
1483
+ if (proto.dateRange) {
1484
+ m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
1454
1485
  }
1455
1486
  return m;
1456
1487
  }
1457
1488
  toApiJson() {
1458
1489
  const toReturn = {};
1459
- if (typeof this.accountGroupId !== 'undefined') {
1460
- toReturn['accountGroupId'] = this.accountGroupId;
1461
- }
1462
- if (typeof this.title !== 'undefined') {
1463
- toReturn['title'] = this.title;
1464
- }
1465
- if (typeof this.postText !== 'undefined') {
1466
- toReturn['postText'] = this.postText;
1467
- }
1468
- if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
1469
- toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
1470
- }
1471
- if (typeof this.gmbPostCustomization !== 'undefined') {
1472
- toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
1473
- }
1474
- if (typeof this.imageUrl !== 'undefined') {
1475
- toReturn['imageUrl'] = this.imageUrl;
1476
- }
1477
- if (typeof this.imagePath !== 'undefined') {
1478
- toReturn['imagePath'] = this.imagePath;
1479
- }
1480
- if (typeof this.imageSize !== 'undefined') {
1481
- toReturn['imageSize'] = this.imageSize;
1482
- }
1483
- if (typeof this.previews !== 'undefined') {
1484
- toReturn['previews'] = this.previews;
1485
- }
1486
- if (typeof this.options !== 'undefined') {
1487
- toReturn['options'] = this.options;
1488
- }
1489
- if (typeof this.videoUrl !== 'undefined') {
1490
- toReturn['videoUrl'] = this.videoUrl;
1491
- }
1492
- if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
1493
- toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
1494
- }
1495
- if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
1496
- toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
1490
+ if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
1491
+ toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
1497
1492
  }
1498
- if (typeof this.postType !== 'undefined') {
1499
- toReturn['postType'] = this.postType;
1493
+ if (typeof this.partnerId !== 'undefined') {
1494
+ toReturn['partnerId'] = this.partnerId;
1500
1495
  }
1501
1496
  return toReturn;
1502
1497
  }
1503
1498
  }
1504
- class CreatePostTemplateResponse {
1499
+ class GenerateCSVForPerformanceStatsRequest {
1505
1500
  constructor(kwargs) {
1506
1501
  if (!kwargs) {
1507
1502
  return;
@@ -1509,19 +1504,28 @@ class CreatePostTemplateResponse {
1509
1504
  Object.assign(this, kwargs);
1510
1505
  }
1511
1506
  static fromProto(proto) {
1512
- let m = new CreatePostTemplateResponse();
1507
+ let m = new GenerateCSVForPerformanceStatsRequest();
1513
1508
  m = Object.assign(m, proto);
1509
+ if (proto.postData) {
1510
+ m.postData = proto.postData.map(PostData.fromProto);
1511
+ }
1514
1512
  return m;
1515
1513
  }
1516
1514
  toApiJson() {
1517
1515
  const toReturn = {};
1518
- if (typeof this.templateId !== 'undefined') {
1519
- toReturn['templateId'] = this.templateId;
1516
+ if (typeof this.businessId !== 'undefined') {
1517
+ toReturn['businessId'] = this.businessId;
1518
+ }
1519
+ if (typeof this.postData !== 'undefined' && this.postData !== null) {
1520
+ toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
1521
+ }
1522
+ if (typeof this.includeHeaders !== 'undefined') {
1523
+ toReturn['includeHeaders'] = this.includeHeaders;
1520
1524
  }
1521
1525
  return toReturn;
1522
1526
  }
1523
1527
  }
1524
- class DateRangeFilter {
1528
+ class GenerateCSVForPerformanceStatsResponse {
1525
1529
  constructor(kwargs) {
1526
1530
  if (!kwargs) {
1527
1531
  return;
@@ -1529,28 +1533,19 @@ class DateRangeFilter {
1529
1533
  Object.assign(this, kwargs);
1530
1534
  }
1531
1535
  static fromProto(proto) {
1532
- let m = new DateRangeFilter();
1536
+ let m = new GenerateCSVForPerformanceStatsResponse();
1533
1537
  m = Object.assign(m, proto);
1534
- if (proto.beginRange) {
1535
- m.beginRange = new Date(proto.beginRange);
1536
- }
1537
- if (proto.endRange) {
1538
- m.endRange = new Date(proto.endRange);
1539
- }
1540
1538
  return m;
1541
1539
  }
1542
1540
  toApiJson() {
1543
1541
  const toReturn = {};
1544
- if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
1545
- toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
1546
- }
1547
- if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
1548
- toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
1542
+ if (typeof this.generatedId !== 'undefined') {
1543
+ toReturn['generatedId'] = this.generatedId;
1549
1544
  }
1550
1545
  return toReturn;
1551
1546
  }
1552
1547
  }
1553
- class DeleteHashtagsRequest {
1548
+ class GetGeneratedCSVForPerformanceStatsRequest {
1554
1549
  constructor(kwargs) {
1555
1550
  if (!kwargs) {
1556
1551
  return;
@@ -1558,25 +1553,19 @@ class DeleteHashtagsRequest {
1558
1553
  Object.assign(this, kwargs);
1559
1554
  }
1560
1555
  static fromProto(proto) {
1561
- let m = new DeleteHashtagsRequest();
1556
+ let m = new GetGeneratedCSVForPerformanceStatsRequest();
1562
1557
  m = Object.assign(m, proto);
1563
1558
  return m;
1564
1559
  }
1565
1560
  toApiJson() {
1566
1561
  const toReturn = {};
1567
- if (typeof this.keyword !== 'undefined') {
1568
- toReturn['keyword'] = this.keyword;
1569
- }
1570
- if (typeof this.businessId !== 'undefined') {
1571
- toReturn['businessId'] = this.businessId;
1572
- }
1573
- if (typeof this.partnerId !== 'undefined') {
1574
- toReturn['partnerId'] = this.partnerId;
1562
+ if (typeof this.generatedId !== 'undefined') {
1563
+ toReturn['generatedId'] = this.generatedId;
1575
1564
  }
1576
1565
  return toReturn;
1577
1566
  }
1578
1567
  }
1579
- class DeleteMultilocationPostRequest {
1568
+ class GetGeneratedCSVForPerformanceStatsResponse {
1580
1569
  constructor(kwargs) {
1581
1570
  if (!kwargs) {
1582
1571
  return;
@@ -1584,22 +1573,19 @@ class DeleteMultilocationPostRequest {
1584
1573
  Object.assign(this, kwargs);
1585
1574
  }
1586
1575
  static fromProto(proto) {
1587
- let m = new DeleteMultilocationPostRequest();
1576
+ let m = new GetGeneratedCSVForPerformanceStatsResponse();
1588
1577
  m = Object.assign(m, proto);
1589
1578
  return m;
1590
1579
  }
1591
1580
  toApiJson() {
1592
1581
  const toReturn = {};
1593
- if (typeof this.brandId !== 'undefined') {
1594
- toReturn['brandId'] = this.brandId;
1595
- }
1596
- if (typeof this.multilocationId !== 'undefined') {
1597
- toReturn['multilocationId'] = this.multilocationId;
1582
+ if (typeof this.url !== 'undefined') {
1583
+ toReturn['url'] = this.url;
1598
1584
  }
1599
1585
  return toReturn;
1600
1586
  }
1601
1587
  }
1602
- class DeletePostTemplateRequest {
1588
+ class GetMultiSocialPostStatsRequest {
1603
1589
  constructor(kwargs) {
1604
1590
  if (!kwargs) {
1605
1591
  return;
@@ -1607,22 +1593,25 @@ class DeletePostTemplateRequest {
1607
1593
  Object.assign(this, kwargs);
1608
1594
  }
1609
1595
  static fromProto(proto) {
1610
- let m = new DeletePostTemplateRequest();
1596
+ let m = new GetMultiSocialPostStatsRequest();
1611
1597
  m = Object.assign(m, proto);
1612
1598
  return m;
1613
1599
  }
1614
1600
  toApiJson() {
1615
1601
  const toReturn = {};
1616
- if (typeof this.accountGroupId !== 'undefined') {
1617
- toReturn['accountGroupId'] = this.accountGroupId;
1602
+ if (typeof this.internalPostIds !== 'undefined') {
1603
+ toReturn['internalPostIds'] = this.internalPostIds;
1618
1604
  }
1619
- if (typeof this.templateId !== 'undefined') {
1620
- toReturn['templateId'] = this.templateId;
1605
+ if (typeof this.businessId !== 'undefined') {
1606
+ toReturn['businessId'] = this.businessId;
1607
+ }
1608
+ if (typeof this.partnerId !== 'undefined') {
1609
+ toReturn['partnerId'] = this.partnerId;
1621
1610
  }
1622
1611
  return toReturn;
1623
1612
  }
1624
1613
  }
1625
- class DeleteSocialPostRequest {
1614
+ class GetMultiSocialPostStatsResponse {
1626
1615
  constructor(kwargs) {
1627
1616
  if (!kwargs) {
1628
1617
  return;
@@ -1630,22 +1619,22 @@ class DeleteSocialPostRequest {
1630
1619
  Object.assign(this, kwargs);
1631
1620
  }
1632
1621
  static fromProto(proto) {
1633
- let m = new DeleteSocialPostRequest();
1622
+ let m = new GetMultiSocialPostStatsResponse();
1634
1623
  m = Object.assign(m, proto);
1624
+ if (proto.socialPostStats) {
1625
+ m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
1626
+ }
1635
1627
  return m;
1636
1628
  }
1637
1629
  toApiJson() {
1638
1630
  const toReturn = {};
1639
- if (typeof this.businessId !== 'undefined') {
1640
- toReturn['businessId'] = this.businessId;
1641
- }
1642
- if (typeof this.socialPostId !== 'undefined') {
1643
- toReturn['socialPostId'] = this.socialPostId;
1631
+ if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
1632
+ toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
1644
1633
  }
1645
1634
  return toReturn;
1646
1635
  }
1647
1636
  }
1648
- class EditMultilocationPostRequest {
1637
+ class GetMultiSocialPostsRequest {
1649
1638
  constructor(kwargs) {
1650
1639
  if (!kwargs) {
1651
1640
  return;
@@ -1653,52 +1642,22 @@ class EditMultilocationPostRequest {
1653
1642
  Object.assign(this, kwargs);
1654
1643
  }
1655
1644
  static fromProto(proto) {
1656
- let m = new EditMultilocationPostRequest();
1645
+ let m = new GetMultiSocialPostsRequest();
1657
1646
  m = Object.assign(m, proto);
1658
- if (proto.scheduledDate) {
1659
- m.scheduledDate = new Date(proto.scheduledDate);
1660
- }
1661
- if (proto.fieldMask) {
1662
- m.fieldMask = FieldMask.fromProto(proto.fieldMask);
1663
- }
1664
- if (proto.locations) {
1665
- m.locations = proto.locations.map(Location.fromProto);
1666
- }
1667
1647
  return m;
1668
1648
  }
1669
1649
  toApiJson() {
1670
1650
  const toReturn = {};
1671
- if (typeof this.brandId !== 'undefined') {
1672
- toReturn['brandId'] = this.brandId;
1673
- }
1674
- if (typeof this.multilocationId !== 'undefined') {
1675
- toReturn['multilocationId'] = this.multilocationId;
1676
- }
1677
- if (typeof this.text !== 'undefined') {
1678
- toReturn['text'] = this.text;
1679
- }
1680
- if (typeof this.media !== 'undefined') {
1681
- toReturn['media'] = this.media;
1682
- }
1683
- if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
1684
- toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
1685
- }
1686
- if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
1687
- toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
1688
- }
1689
- if (typeof this.gifs !== 'undefined') {
1690
- toReturn['gifs'] = this.gifs;
1691
- }
1692
- if (typeof this.videos !== 'undefined') {
1693
- toReturn['videos'] = this.videos;
1651
+ if (typeof this.businessId !== 'undefined') {
1652
+ toReturn['businessId'] = this.businessId;
1694
1653
  }
1695
- if (typeof this.locations !== 'undefined' && this.locations !== null) {
1696
- toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
1654
+ if (typeof this.internalPostIds !== 'undefined') {
1655
+ toReturn['internalPostIds'] = this.internalPostIds;
1697
1656
  }
1698
1657
  return toReturn;
1699
1658
  }
1700
1659
  }
1701
- class EditMultilocationPostResponse {
1660
+ class GetMultiSocialPostsResponse {
1702
1661
  constructor(kwargs) {
1703
1662
  if (!kwargs) {
1704
1663
  return;
@@ -1706,28 +1665,22 @@ class EditMultilocationPostResponse {
1706
1665
  Object.assign(this, kwargs);
1707
1666
  }
1708
1667
  static fromProto(proto) {
1709
- let m = new EditMultilocationPostResponse();
1668
+ let m = new GetMultiSocialPostsResponse();
1710
1669
  m = Object.assign(m, proto);
1711
- if (proto.post) {
1712
- m.post = MultilocationPost.fromProto(proto.post);
1713
- }
1714
- if (proto.errors) {
1715
- m.errors = proto.errors.map(MultilocationPostError.fromProto);
1670
+ if (proto.socialPosts) {
1671
+ m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
1716
1672
  }
1717
1673
  return m;
1718
1674
  }
1719
1675
  toApiJson() {
1720
1676
  const toReturn = {};
1721
- if (typeof this.post !== 'undefined' && this.post !== null) {
1722
- toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
1723
- }
1724
- if (typeof this.errors !== 'undefined' && this.errors !== null) {
1725
- toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
1677
+ if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
1678
+ toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
1726
1679
  }
1727
1680
  return toReturn;
1728
1681
  }
1729
1682
  }
1730
- class PartnerListScheduledSocialPostsRequestFilters {
1683
+ class GetMultilocationPostRequest {
1731
1684
  constructor(kwargs) {
1732
1685
  if (!kwargs) {
1733
1686
  return;
@@ -1735,25 +1688,22 @@ class PartnerListScheduledSocialPostsRequestFilters {
1735
1688
  Object.assign(this, kwargs);
1736
1689
  }
1737
1690
  static fromProto(proto) {
1738
- let m = new PartnerListScheduledSocialPostsRequestFilters();
1691
+ let m = new GetMultilocationPostRequest();
1739
1692
  m = Object.assign(m, proto);
1740
- if (proto.dateRange) {
1741
- m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
1742
- }
1743
1693
  return m;
1744
1694
  }
1745
1695
  toApiJson() {
1746
1696
  const toReturn = {};
1747
- if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
1748
- toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
1697
+ if (typeof this.brandId !== 'undefined') {
1698
+ toReturn['brandId'] = this.brandId;
1749
1699
  }
1750
- if (typeof this.partnerId !== 'undefined') {
1751
- toReturn['partnerId'] = this.partnerId;
1700
+ if (typeof this.multilocationId !== 'undefined') {
1701
+ toReturn['multilocationId'] = this.multilocationId;
1752
1702
  }
1753
1703
  return toReturn;
1754
1704
  }
1755
1705
  }
1756
- class GenerateCSVForPerformanceStatsRequest {
1706
+ class GetMultilocationPostResponse {
1757
1707
  constructor(kwargs) {
1758
1708
  if (!kwargs) {
1759
1709
  return;
@@ -1761,28 +1711,22 @@ class GenerateCSVForPerformanceStatsRequest {
1761
1711
  Object.assign(this, kwargs);
1762
1712
  }
1763
1713
  static fromProto(proto) {
1764
- let m = new GenerateCSVForPerformanceStatsRequest();
1714
+ let m = new GetMultilocationPostResponse();
1765
1715
  m = Object.assign(m, proto);
1766
- if (proto.postData) {
1767
- m.postData = proto.postData.map(PostData.fromProto);
1716
+ if (proto.multilocationPost) {
1717
+ m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
1768
1718
  }
1769
1719
  return m;
1770
1720
  }
1771
1721
  toApiJson() {
1772
1722
  const toReturn = {};
1773
- if (typeof this.businessId !== 'undefined') {
1774
- toReturn['businessId'] = this.businessId;
1775
- }
1776
- if (typeof this.postData !== 'undefined' && this.postData !== null) {
1777
- toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
1778
- }
1779
- if (typeof this.includeHeaders !== 'undefined') {
1780
- toReturn['includeHeaders'] = this.includeHeaders;
1723
+ if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
1724
+ toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
1781
1725
  }
1782
1726
  return toReturn;
1783
1727
  }
1784
1728
  }
1785
- class GenerateCSVForPerformanceStatsResponse {
1729
+ class GetPostTemplateRequest {
1786
1730
  constructor(kwargs) {
1787
1731
  if (!kwargs) {
1788
1732
  return;
@@ -1790,223 +1734,22 @@ class GenerateCSVForPerformanceStatsResponse {
1790
1734
  Object.assign(this, kwargs);
1791
1735
  }
1792
1736
  static fromProto(proto) {
1793
- let m = new GenerateCSVForPerformanceStatsResponse();
1737
+ let m = new GetPostTemplateRequest();
1794
1738
  m = Object.assign(m, proto);
1795
1739
  return m;
1796
1740
  }
1797
1741
  toApiJson() {
1798
1742
  const toReturn = {};
1799
- if (typeof this.generatedId !== 'undefined') {
1800
- toReturn['generatedId'] = this.generatedId;
1743
+ if (typeof this.accountGroupId !== 'undefined') {
1744
+ toReturn['accountGroupId'] = this.accountGroupId;
1745
+ }
1746
+ if (typeof this.templateId !== 'undefined') {
1747
+ toReturn['templateId'] = this.templateId;
1801
1748
  }
1802
1749
  return toReturn;
1803
1750
  }
1804
1751
  }
1805
- class GetGeneratedCSVForPerformanceStatsRequest {
1806
- constructor(kwargs) {
1807
- if (!kwargs) {
1808
- return;
1809
- }
1810
- Object.assign(this, kwargs);
1811
- }
1812
- static fromProto(proto) {
1813
- let m = new GetGeneratedCSVForPerformanceStatsRequest();
1814
- m = Object.assign(m, proto);
1815
- return m;
1816
- }
1817
- toApiJson() {
1818
- const toReturn = {};
1819
- if (typeof this.generatedId !== 'undefined') {
1820
- toReturn['generatedId'] = this.generatedId;
1821
- }
1822
- return toReturn;
1823
- }
1824
- }
1825
- class GetGeneratedCSVForPerformanceStatsResponse {
1826
- constructor(kwargs) {
1827
- if (!kwargs) {
1828
- return;
1829
- }
1830
- Object.assign(this, kwargs);
1831
- }
1832
- static fromProto(proto) {
1833
- let m = new GetGeneratedCSVForPerformanceStatsResponse();
1834
- m = Object.assign(m, proto);
1835
- return m;
1836
- }
1837
- toApiJson() {
1838
- const toReturn = {};
1839
- if (typeof this.url !== 'undefined') {
1840
- toReturn['url'] = this.url;
1841
- }
1842
- return toReturn;
1843
- }
1844
- }
1845
- class GetMultiSocialPostStatsRequest {
1846
- constructor(kwargs) {
1847
- if (!kwargs) {
1848
- return;
1849
- }
1850
- Object.assign(this, kwargs);
1851
- }
1852
- static fromProto(proto) {
1853
- let m = new GetMultiSocialPostStatsRequest();
1854
- m = Object.assign(m, proto);
1855
- return m;
1856
- }
1857
- toApiJson() {
1858
- const toReturn = {};
1859
- if (typeof this.internalPostIds !== 'undefined') {
1860
- toReturn['internalPostIds'] = this.internalPostIds;
1861
- }
1862
- if (typeof this.businessId !== 'undefined') {
1863
- toReturn['businessId'] = this.businessId;
1864
- }
1865
- if (typeof this.partnerId !== 'undefined') {
1866
- toReturn['partnerId'] = this.partnerId;
1867
- }
1868
- return toReturn;
1869
- }
1870
- }
1871
- class GetMultiSocialPostStatsResponse {
1872
- constructor(kwargs) {
1873
- if (!kwargs) {
1874
- return;
1875
- }
1876
- Object.assign(this, kwargs);
1877
- }
1878
- static fromProto(proto) {
1879
- let m = new GetMultiSocialPostStatsResponse();
1880
- m = Object.assign(m, proto);
1881
- if (proto.socialPostStats) {
1882
- m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
1883
- }
1884
- return m;
1885
- }
1886
- toApiJson() {
1887
- const toReturn = {};
1888
- if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
1889
- toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
1890
- }
1891
- return toReturn;
1892
- }
1893
- }
1894
- class GetMultiSocialPostsRequest {
1895
- constructor(kwargs) {
1896
- if (!kwargs) {
1897
- return;
1898
- }
1899
- Object.assign(this, kwargs);
1900
- }
1901
- static fromProto(proto) {
1902
- let m = new GetMultiSocialPostsRequest();
1903
- m = Object.assign(m, proto);
1904
- return m;
1905
- }
1906
- toApiJson() {
1907
- const toReturn = {};
1908
- if (typeof this.businessId !== 'undefined') {
1909
- toReturn['businessId'] = this.businessId;
1910
- }
1911
- if (typeof this.internalPostIds !== 'undefined') {
1912
- toReturn['internalPostIds'] = this.internalPostIds;
1913
- }
1914
- return toReturn;
1915
- }
1916
- }
1917
- class GetMultiSocialPostsResponse {
1918
- constructor(kwargs) {
1919
- if (!kwargs) {
1920
- return;
1921
- }
1922
- Object.assign(this, kwargs);
1923
- }
1924
- static fromProto(proto) {
1925
- let m = new GetMultiSocialPostsResponse();
1926
- m = Object.assign(m, proto);
1927
- if (proto.socialPosts) {
1928
- m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
1929
- }
1930
- return m;
1931
- }
1932
- toApiJson() {
1933
- const toReturn = {};
1934
- if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
1935
- toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
1936
- }
1937
- return toReturn;
1938
- }
1939
- }
1940
- class GetMultilocationPostRequest {
1941
- constructor(kwargs) {
1942
- if (!kwargs) {
1943
- return;
1944
- }
1945
- Object.assign(this, kwargs);
1946
- }
1947
- static fromProto(proto) {
1948
- let m = new GetMultilocationPostRequest();
1949
- m = Object.assign(m, proto);
1950
- return m;
1951
- }
1952
- toApiJson() {
1953
- const toReturn = {};
1954
- if (typeof this.brandId !== 'undefined') {
1955
- toReturn['brandId'] = this.brandId;
1956
- }
1957
- if (typeof this.multilocationId !== 'undefined') {
1958
- toReturn['multilocationId'] = this.multilocationId;
1959
- }
1960
- return toReturn;
1961
- }
1962
- }
1963
- class GetMultilocationPostResponse {
1964
- constructor(kwargs) {
1965
- if (!kwargs) {
1966
- return;
1967
- }
1968
- Object.assign(this, kwargs);
1969
- }
1970
- static fromProto(proto) {
1971
- let m = new GetMultilocationPostResponse();
1972
- m = Object.assign(m, proto);
1973
- if (proto.multilocationPost) {
1974
- m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
1975
- }
1976
- return m;
1977
- }
1978
- toApiJson() {
1979
- const toReturn = {};
1980
- if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
1981
- toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
1982
- }
1983
- return toReturn;
1984
- }
1985
- }
1986
- class GetPostTemplateRequest {
1987
- constructor(kwargs) {
1988
- if (!kwargs) {
1989
- return;
1990
- }
1991
- Object.assign(this, kwargs);
1992
- }
1993
- static fromProto(proto) {
1994
- let m = new GetPostTemplateRequest();
1995
- m = Object.assign(m, proto);
1996
- return m;
1997
- }
1998
- toApiJson() {
1999
- const toReturn = {};
2000
- if (typeof this.accountGroupId !== 'undefined') {
2001
- toReturn['accountGroupId'] = this.accountGroupId;
2002
- }
2003
- if (typeof this.templateId !== 'undefined') {
2004
- toReturn['templateId'] = this.templateId;
2005
- }
2006
- return toReturn;
2007
- }
2008
- }
2009
- class GetPostTemplateResponse {
1752
+ class GetPostTemplateResponse {
2010
1753
  constructor(kwargs) {
2011
1754
  if (!kwargs) {
2012
1755
  return;
@@ -2170,7 +1913,7 @@ class ListMultilocationPostsForBrandResponse {
2170
1913
  m.multilocationPosts = proto.multilocationPosts.map(MultilocationPost.fromProto);
2171
1914
  }
2172
1915
  if (proto.failedSocialPosts) {
2173
- m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
1916
+ m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost$1.fromProto);
2174
1917
  }
2175
1918
  return m;
2176
1919
  }
@@ -2374,7 +2117,7 @@ class ListSocialPostsResponse {
2374
2117
  let m = new ListSocialPostsResponse();
2375
2118
  m = Object.assign(m, proto);
2376
2119
  if (proto.socialPosts) {
2377
- m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
2120
+ m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
2378
2121
  }
2379
2122
  return m;
2380
2123
  }
@@ -2473,7 +2216,7 @@ class PartnerListScheduledPostsResponse {
2473
2216
  let m = new PartnerListScheduledPostsResponse();
2474
2217
  m = Object.assign(m, proto);
2475
2218
  if (proto.socialPosts) {
2476
- m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
2219
+ m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
2477
2220
  }
2478
2221
  return m;
2479
2222
  }
@@ -2641,7 +2384,7 @@ class RemoveFromMultilocationPostRequest {
2641
2384
  let m = new RemoveFromMultilocationPostRequest();
2642
2385
  m = Object.assign(m, proto);
2643
2386
  if (proto.reason) {
2644
- m.reason = enumStringToValue$2(RemoveReason, proto.reason);
2387
+ m.reason = enumStringToValue$3(RemoveReason, proto.reason);
2645
2388
  }
2646
2389
  if (proto.locations) {
2647
2390
  m.locations = proto.locations.map(Location.fromProto);
@@ -2682,16 +2425,314 @@ class ReplaceHashtagsRequest {
2682
2425
  if (typeof this.keyword !== 'undefined') {
2683
2426
  toReturn['keyword'] = this.keyword;
2684
2427
  }
2685
- if (typeof this.businessId !== 'undefined') {
2686
- toReturn['businessId'] = this.businessId;
2428
+ if (typeof this.businessId !== 'undefined') {
2429
+ toReturn['businessId'] = this.businessId;
2430
+ }
2431
+ if (typeof this.partnerId !== 'undefined') {
2432
+ toReturn['partnerId'] = this.partnerId;
2433
+ }
2434
+ return toReturn;
2435
+ }
2436
+ }
2437
+ class SchedulePostRequest {
2438
+ constructor(kwargs) {
2439
+ if (!kwargs) {
2440
+ return;
2441
+ }
2442
+ Object.assign(this, kwargs);
2443
+ }
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
+ toApiJson() {
2453
+ const toReturn = {};
2454
+ if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2455
+ toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2456
+ }
2457
+ if (typeof this.socialServiceIds !== 'undefined') {
2458
+ toReturn['socialServiceIds'] = this.socialServiceIds;
2459
+ }
2460
+ if (typeof this.partnerId !== 'undefined') {
2461
+ toReturn['partnerId'] = this.partnerId;
2462
+ }
2463
+ if (typeof this.businessId !== 'undefined') {
2464
+ toReturn['businessId'] = this.businessId;
2465
+ }
2466
+ return toReturn;
2467
+ }
2468
+ }
2469
+ class SchedulePostResponse {
2470
+ constructor(kwargs) {
2471
+ if (!kwargs) {
2472
+ return;
2473
+ }
2474
+ Object.assign(this, kwargs);
2475
+ }
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
+ toApiJson() {
2485
+ const toReturn = {};
2486
+ if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2487
+ toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2488
+ }
2489
+ return toReturn;
2490
+ }
2491
+ }
2492
+ class ScheduleToAllPagesRequest {
2493
+ constructor(kwargs) {
2494
+ if (!kwargs) {
2495
+ return;
2496
+ }
2497
+ Object.assign(this, kwargs);
2498
+ }
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
+ toApiJson() {
2508
+ const toReturn = {};
2509
+ if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2510
+ toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2511
+ }
2512
+ if (typeof this.partnerId !== 'undefined') {
2513
+ toReturn['partnerId'] = this.partnerId;
2514
+ }
2515
+ if (typeof this.businessId !== 'undefined') {
2516
+ toReturn['businessId'] = this.businessId;
2517
+ }
2518
+ return toReturn;
2519
+ }
2520
+ }
2521
+ class ScheduleToAllPagesResponse {
2522
+ constructor(kwargs) {
2523
+ if (!kwargs) {
2524
+ return;
2525
+ }
2526
+ Object.assign(this, kwargs);
2527
+ }
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
+ toApiJson() {
2537
+ const toReturn = {};
2538
+ if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2539
+ toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2540
+ }
2541
+ return toReturn;
2542
+ }
2543
+ }
2544
+ class SearchHashtagRequest {
2545
+ constructor(kwargs) {
2546
+ if (!kwargs) {
2547
+ return;
2548
+ }
2549
+ Object.assign(this, kwargs);
2550
+ }
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
+ toApiJson() {
2560
+ const toReturn = {};
2561
+ if (typeof this.searchTerm !== 'undefined') {
2562
+ toReturn['searchTerm'] = this.searchTerm;
2563
+ }
2564
+ if (typeof this.limit !== 'undefined') {
2565
+ toReturn['limit'] = this.limit;
2566
+ }
2567
+ if (typeof this.businessId !== 'undefined') {
2568
+ toReturn['businessId'] = this.businessId;
2569
+ }
2570
+ if (typeof this.partnerId !== 'undefined') {
2571
+ toReturn['partnerId'] = this.partnerId;
2572
+ }
2573
+ return toReturn;
2574
+ }
2575
+ }
2576
+ class SearchHashtagResponse {
2577
+ constructor(kwargs) {
2578
+ if (!kwargs) {
2579
+ return;
2580
+ }
2581
+ Object.assign(this, kwargs);
2582
+ }
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
+ toApiJson() {
2592
+ const toReturn = {};
2593
+ if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
2594
+ toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
2595
+ }
2596
+ return toReturn;
2597
+ }
2598
+ }
2599
+ class SuggestMessageRequest {
2600
+ constructor(kwargs) {
2601
+ if (!kwargs) {
2602
+ return;
2603
+ }
2604
+ Object.assign(this, kwargs);
2605
+ }
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
+ toApiJson() {
2618
+ const toReturn = {};
2619
+ if (typeof this.prompt !== 'undefined') {
2620
+ toReturn['prompt'] = this.prompt;
2621
+ }
2622
+ if (typeof this.businessId !== 'undefined') {
2623
+ toReturn['businessId'] = this.businessId;
2624
+ }
2625
+ if (typeof this.length !== 'undefined') {
2626
+ toReturn['length'] = this.length;
2627
+ }
2628
+ if (typeof this.type !== 'undefined') {
2629
+ toReturn['type'] = this.type;
2630
+ }
2631
+ return toReturn;
2632
+ }
2633
+ }
2634
+ class SuggestMessageResponse {
2635
+ constructor(kwargs) {
2636
+ if (!kwargs) {
2637
+ return;
2638
+ }
2639
+ Object.assign(this, kwargs);
2640
+ }
2641
+ static fromProto(proto) {
2642
+ let m = new SuggestMessageResponse();
2643
+ m = Object.assign(m, proto);
2644
+ return m;
2645
+ }
2646
+ toApiJson() {
2647
+ const toReturn = {};
2648
+ if (typeof this.message !== 'undefined') {
2649
+ toReturn['message'] = this.message;
2650
+ }
2651
+ return toReturn;
2652
+ }
2653
+ }
2654
+ class UpdatePostTemplateRequest {
2655
+ constructor(kwargs) {
2656
+ if (!kwargs) {
2657
+ return;
2658
+ }
2659
+ Object.assign(this, kwargs);
2660
+ }
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
+ toApiJson() {
2679
+ const toReturn = {};
2680
+ if (typeof this.accountGroupId !== 'undefined') {
2681
+ toReturn['accountGroupId'] = this.accountGroupId;
2682
+ }
2683
+ if (typeof this.templateId !== 'undefined') {
2684
+ toReturn['templateId'] = this.templateId;
2685
+ }
2686
+ if (typeof this.title !== 'undefined') {
2687
+ toReturn['title'] = this.title;
2688
+ }
2689
+ if (typeof this.postText !== 'undefined') {
2690
+ toReturn['postText'] = this.postText;
2691
+ }
2692
+ if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
2693
+ toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
2694
+ }
2695
+ if (typeof this.gmbPostCustomization !== 'undefined') {
2696
+ toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
2697
+ }
2698
+ if (typeof this.imageUrl !== 'undefined') {
2699
+ toReturn['imageUrl'] = this.imageUrl;
2700
+ }
2701
+ if (typeof this.imagePath !== 'undefined') {
2702
+ toReturn['imagePath'] = this.imagePath;
2703
+ }
2704
+ if (typeof this.imageSize !== 'undefined') {
2705
+ toReturn['imageSize'] = this.imageSize;
2706
+ }
2707
+ if (typeof this.previews !== 'undefined') {
2708
+ toReturn['previews'] = this.previews;
2709
+ }
2710
+ if (typeof this.options !== 'undefined') {
2711
+ toReturn['options'] = this.options;
2712
+ }
2713
+ if (typeof this.videoUrl !== 'undefined') {
2714
+ toReturn['videoUrl'] = this.videoUrl;
2715
+ }
2716
+ if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
2717
+ toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
2687
2718
  }
2688
- if (typeof this.partnerId !== 'undefined') {
2689
- toReturn['partnerId'] = this.partnerId;
2719
+ if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
2720
+ toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
2721
+ }
2722
+ if (typeof this.postType !== 'undefined') {
2723
+ toReturn['postType'] = this.postType;
2690
2724
  }
2691
2725
  return toReturn;
2692
2726
  }
2693
2727
  }
2694
- class SchedulePostRequest {
2728
+
2729
+ function enumStringToValue$2(enumRef, value) {
2730
+ if (typeof value === 'number') {
2731
+ return value;
2732
+ }
2733
+ return enumRef[value];
2734
+ }
2735
+ class Link {
2695
2736
  constructor(kwargs) {
2696
2737
  if (!kwargs) {
2697
2738
  return;
@@ -2699,54 +2740,34 @@ class SchedulePostRequest {
2699
2740
  Object.assign(this, kwargs);
2700
2741
  }
2701
2742
  static fromProto(proto) {
2702
- let m = new SchedulePostRequest();
2743
+ let m = new Link();
2703
2744
  m = Object.assign(m, proto);
2704
- if (proto.socialPost) {
2705
- m.socialPost = SocialPostData.fromProto(proto.socialPost);
2706
- }
2707
2745
  return m;
2708
2746
  }
2709
2747
  toApiJson() {
2710
2748
  const toReturn = {};
2711
- if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2712
- toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2713
- }
2714
- if (typeof this.socialServiceIds !== 'undefined') {
2715
- toReturn['socialServiceIds'] = this.socialServiceIds;
2749
+ if (typeof this.name !== 'undefined') {
2750
+ toReturn['name'] = this.name;
2716
2751
  }
2717
- if (typeof this.partnerId !== 'undefined') {
2718
- toReturn['partnerId'] = this.partnerId;
2752
+ if (typeof this.picture !== 'undefined') {
2753
+ toReturn['picture'] = this.picture;
2719
2754
  }
2720
- if (typeof this.businessId !== 'undefined') {
2721
- toReturn['businessId'] = this.businessId;
2755
+ if (typeof this.description !== 'undefined') {
2756
+ toReturn['description'] = this.description;
2722
2757
  }
2723
- return toReturn;
2724
- }
2725
- }
2726
- class SchedulePostResponse {
2727
- constructor(kwargs) {
2728
- if (!kwargs) {
2729
- return;
2758
+ if (typeof this.title !== 'undefined') {
2759
+ toReturn['title'] = this.title;
2730
2760
  }
2731
- Object.assign(this, kwargs);
2732
- }
2733
- static fromProto(proto) {
2734
- let m = new SchedulePostResponse();
2735
- m = Object.assign(m, proto);
2736
- if (proto.statuses) {
2737
- m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
2761
+ if (typeof this.url !== 'undefined') {
2762
+ toReturn['url'] = this.url;
2738
2763
  }
2739
- return m;
2740
- }
2741
- toApiJson() {
2742
- const toReturn = {};
2743
- if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2744
- toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2764
+ if (typeof this.shortcode !== 'undefined') {
2765
+ toReturn['shortcode'] = this.shortcode;
2745
2766
  }
2746
2767
  return toReturn;
2747
2768
  }
2748
2769
  }
2749
- class ScheduleToAllPagesRequest {
2770
+ class Metadata {
2750
2771
  constructor(kwargs) {
2751
2772
  if (!kwargs) {
2752
2773
  return;
@@ -2754,28 +2775,22 @@ class ScheduleToAllPagesRequest {
2754
2775
  Object.assign(this, kwargs);
2755
2776
  }
2756
2777
  static fromProto(proto) {
2757
- let m = new ScheduleToAllPagesRequest();
2778
+ let m = new Metadata();
2758
2779
  m = Object.assign(m, proto);
2759
- if (proto.socialPost) {
2760
- m.socialPost = SocialPostData.fromProto(proto.socialPost);
2761
- }
2762
2780
  return m;
2763
2781
  }
2764
2782
  toApiJson() {
2765
2783
  const toReturn = {};
2766
- if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
2767
- toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
2768
- }
2769
- if (typeof this.partnerId !== 'undefined') {
2770
- toReturn['partnerId'] = this.partnerId;
2784
+ if (typeof this.name !== 'undefined') {
2785
+ toReturn['name'] = this.name;
2771
2786
  }
2772
- if (typeof this.businessId !== 'undefined') {
2773
- toReturn['businessId'] = this.businessId;
2787
+ if (typeof this.value !== 'undefined') {
2788
+ toReturn['value'] = this.value;
2774
2789
  }
2775
2790
  return toReturn;
2776
2791
  }
2777
2792
  }
2778
- class ScheduleToAllPagesResponse {
2793
+ class PostAction {
2779
2794
  constructor(kwargs) {
2780
2795
  if (!kwargs) {
2781
2796
  return;
@@ -2783,22 +2798,22 @@ class ScheduleToAllPagesResponse {
2783
2798
  Object.assign(this, kwargs);
2784
2799
  }
2785
2800
  static fromProto(proto) {
2786
- let m = new ScheduleToAllPagesResponse();
2801
+ let m = new PostAction();
2787
2802
  m = Object.assign(m, proto);
2788
- if (proto.statuses) {
2789
- m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
2790
- }
2791
2803
  return m;
2792
2804
  }
2793
2805
  toApiJson() {
2794
2806
  const toReturn = {};
2795
- if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
2796
- toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
2807
+ if (typeof this.type !== 'undefined') {
2808
+ toReturn['type'] = this.type;
2809
+ }
2810
+ if (typeof this.linkUrl !== 'undefined') {
2811
+ toReturn['linkUrl'] = this.linkUrl;
2797
2812
  }
2798
2813
  return toReturn;
2799
2814
  }
2800
2815
  }
2801
- class SearchHashtagRequest {
2816
+ class PostContent {
2802
2817
  constructor(kwargs) {
2803
2818
  if (!kwargs) {
2804
2819
  return;
@@ -2806,31 +2821,31 @@ class SearchHashtagRequest {
2806
2821
  Object.assign(this, kwargs);
2807
2822
  }
2808
2823
  static fromProto(proto) {
2809
- let m = new SearchHashtagRequest();
2824
+ let m = new PostContent();
2810
2825
  m = Object.assign(m, proto);
2811
- if (proto.limit) {
2812
- 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);
2813
2831
  }
2814
2832
  return m;
2815
2833
  }
2816
2834
  toApiJson() {
2817
2835
  const toReturn = {};
2818
- if (typeof this.searchTerm !== 'undefined') {
2819
- toReturn['searchTerm'] = this.searchTerm;
2820
- }
2821
- if (typeof this.limit !== 'undefined') {
2822
- toReturn['limit'] = this.limit;
2836
+ if (typeof this.postText !== 'undefined') {
2837
+ toReturn['postText'] = this.postText;
2823
2838
  }
2824
- if (typeof this.businessId !== 'undefined') {
2825
- toReturn['businessId'] = this.businessId;
2839
+ if (typeof this.media !== 'undefined' && this.media !== null) {
2840
+ toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
2826
2841
  }
2827
- if (typeof this.partnerId !== 'undefined') {
2828
- toReturn['partnerId'] = this.partnerId;
2842
+ if (typeof this.link !== 'undefined' && this.link !== null) {
2843
+ toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
2829
2844
  }
2830
2845
  return toReturn;
2831
2846
  }
2832
2847
  }
2833
- class SearchHashtagResponse {
2848
+ class PostCustomization {
2834
2849
  constructor(kwargs) {
2835
2850
  if (!kwargs) {
2836
2851
  return;
@@ -2838,22 +2853,28 @@ class SearchHashtagResponse {
2838
2853
  Object.assign(this, kwargs);
2839
2854
  }
2840
2855
  static fromProto(proto) {
2841
- let m = new SearchHashtagResponse();
2856
+ let m = new PostCustomization();
2842
2857
  m = Object.assign(m, proto);
2843
- if (proto.hashtags) {
2844
- m.hashtags = proto.hashtags.map(Hashtag.fromProto);
2858
+ if (proto.event) {
2859
+ m.event = PostEvent.fromProto(proto.event);
2860
+ }
2861
+ if (proto.action) {
2862
+ m.action = PostAction.fromProto(proto.action);
2845
2863
  }
2846
2864
  return m;
2847
2865
  }
2848
2866
  toApiJson() {
2849
2867
  const toReturn = {};
2850
- if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
2851
- toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
2868
+ if (typeof this.event !== 'undefined' && this.event !== null) {
2869
+ toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
2870
+ }
2871
+ if (typeof this.action !== 'undefined' && this.action !== null) {
2872
+ toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
2852
2873
  }
2853
2874
  return toReturn;
2854
2875
  }
2855
2876
  }
2856
- class SuggestMessageRequest {
2877
+ class PostEvent {
2857
2878
  constructor(kwargs) {
2858
2879
  if (!kwargs) {
2859
2880
  return;
@@ -2861,28 +2882,31 @@ class SuggestMessageRequest {
2861
2882
  Object.assign(this, kwargs);
2862
2883
  }
2863
2884
  static fromProto(proto) {
2864
- let m = new SuggestMessageRequest();
2885
+ let m = new PostEvent();
2865
2886
  m = Object.assign(m, proto);
2866
- if (proto.length) {
2867
- m.length = enumStringToValue$2(PostLength, proto.length);
2887
+ if (proto.start) {
2888
+ m.start = new Date(proto.start);
2889
+ }
2890
+ if (proto.end) {
2891
+ m.end = new Date(proto.end);
2868
2892
  }
2869
2893
  return m;
2870
2894
  }
2871
2895
  toApiJson() {
2872
2896
  const toReturn = {};
2873
- if (typeof this.prompt !== 'undefined') {
2874
- toReturn['prompt'] = this.prompt;
2897
+ if (typeof this.title !== 'undefined') {
2898
+ toReturn['title'] = this.title;
2875
2899
  }
2876
- if (typeof this.businessId !== 'undefined') {
2877
- toReturn['businessId'] = this.businessId;
2900
+ if (typeof this.start !== 'undefined' && this.start !== null) {
2901
+ toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
2878
2902
  }
2879
- if (typeof this.length !== 'undefined') {
2880
- toReturn['length'] = this.length;
2903
+ if (typeof this.end !== 'undefined' && this.end !== null) {
2904
+ toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
2881
2905
  }
2882
2906
  return toReturn;
2883
2907
  }
2884
2908
  }
2885
- class SuggestMessageResponse {
2909
+ class PostMedia {
2886
2910
  constructor(kwargs) {
2887
2911
  if (!kwargs) {
2888
2912
  return;
@@ -2890,19 +2914,34 @@ class SuggestMessageResponse {
2890
2914
  Object.assign(this, kwargs);
2891
2915
  }
2892
2916
  static fromProto(proto) {
2893
- let m = new SuggestMessageResponse();
2917
+ let m = new PostMedia();
2894
2918
  m = Object.assign(m, proto);
2919
+ if (proto.metadata) {
2920
+ m.metadata = proto.metadata.map(Metadata.fromProto);
2921
+ }
2895
2922
  return m;
2896
2923
  }
2897
2924
  toApiJson() {
2898
2925
  const toReturn = {};
2899
- if (typeof this.message !== 'undefined') {
2900
- toReturn['message'] = this.message;
2926
+ if (typeof this.mediaId !== 'undefined') {
2927
+ toReturn['mediaId'] = this.mediaId;
2928
+ }
2929
+ if (typeof this.mediaUrl !== 'undefined') {
2930
+ toReturn['mediaUrl'] = this.mediaUrl;
2931
+ }
2932
+ if (typeof this.mediaType !== 'undefined') {
2933
+ toReturn['mediaType'] = this.mediaType;
2934
+ }
2935
+ if (typeof this.containerId !== 'undefined') {
2936
+ toReturn['containerId'] = this.containerId;
2937
+ }
2938
+ if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
2939
+ toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
2901
2940
  }
2902
2941
  return toReturn;
2903
2942
  }
2904
2943
  }
2905
- class UpdatePostTemplateRequest {
2944
+ class SocialPost {
2906
2945
  constructor(kwargs) {
2907
2946
  if (!kwargs) {
2908
2947
  return;
@@ -2910,16 +2949,16 @@ class UpdatePostTemplateRequest {
2910
2949
  Object.assign(this, kwargs);
2911
2950
  }
2912
2951
  static fromProto(proto) {
2913
- let m = new UpdatePostTemplateRequest();
2952
+ let m = new SocialPost();
2914
2953
  m = Object.assign(m, proto);
2915
- if (proto.postDateTime) {
2916
- m.postDateTime = new Date(proto.postDateTime);
2954
+ if (proto.postContent) {
2955
+ m.postContent = PostContent.fromProto(proto.postContent);
2917
2956
  }
2918
- if (proto.mediaEntries) {
2919
- m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
2957
+ if (proto.scheduled) {
2958
+ m.scheduled = new Date(proto.scheduled);
2920
2959
  }
2921
- if (proto.metaData) {
2922
- m.metaData = proto.metaData.map(MetaData.fromProto);
2960
+ if (proto.customization) {
2961
+ m.customization = PostCustomization.fromProto(proto.customization);
2923
2962
  }
2924
2963
  if (proto.postType) {
2925
2964
  m.postType = enumStringToValue$2(PostType$1, proto.postType);
@@ -2928,47 +2967,20 @@ class UpdatePostTemplateRequest {
2928
2967
  }
2929
2968
  toApiJson() {
2930
2969
  const toReturn = {};
2931
- if (typeof this.accountGroupId !== 'undefined') {
2932
- toReturn['accountGroupId'] = this.accountGroupId;
2933
- }
2934
- if (typeof this.templateId !== 'undefined') {
2935
- toReturn['templateId'] = this.templateId;
2936
- }
2937
- if (typeof this.title !== 'undefined') {
2938
- toReturn['title'] = this.title;
2939
- }
2940
- if (typeof this.postText !== 'undefined') {
2941
- toReturn['postText'] = this.postText;
2942
- }
2943
- if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
2944
- toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
2945
- }
2946
- if (typeof this.gmbPostCustomization !== 'undefined') {
2947
- toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
2948
- }
2949
- if (typeof this.imageUrl !== 'undefined') {
2950
- toReturn['imageUrl'] = this.imageUrl;
2951
- }
2952
- if (typeof this.imagePath !== 'undefined') {
2953
- toReturn['imagePath'] = this.imagePath;
2954
- }
2955
- if (typeof this.imageSize !== 'undefined') {
2956
- toReturn['imageSize'] = this.imageSize;
2957
- }
2958
- if (typeof this.previews !== 'undefined') {
2959
- toReturn['previews'] = this.previews;
2970
+ if (typeof this.businessId !== 'undefined') {
2971
+ toReturn['businessId'] = this.businessId;
2960
2972
  }
2961
- if (typeof this.options !== 'undefined') {
2962
- toReturn['options'] = this.options;
2973
+ if (typeof this.socialServiceId !== 'undefined') {
2974
+ toReturn['socialServiceId'] = this.socialServiceId;
2963
2975
  }
2964
- if (typeof this.videoUrl !== 'undefined') {
2965
- toReturn['videoUrl'] = this.videoUrl;
2976
+ if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
2977
+ toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
2966
2978
  }
2967
- if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
2968
- toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
2979
+ if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
2980
+ toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
2969
2981
  }
2970
- if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
2971
- toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
2982
+ if (typeof this.customization !== 'undefined' && this.customization !== null) {
2983
+ toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
2972
2984
  }
2973
2985
  if (typeof this.postType !== 'undefined') {
2974
2986
  toReturn['postType'] = this.postType;
@@ -3368,8 +3380,8 @@ class SocialPostsService {
3368
3380
  const req = new GetScheduledPostCountRequest({ partnerId: partnerId, businessId: businessId, socialServiceIds: socialServiceIds });
3369
3381
  return this.socialPostsApiService.getScheduledPostCount(req);
3370
3382
  }
3371
- suggestMessage(businessId, prompt, postLength) {
3372
- const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt, length: postLength });
3383
+ suggestMessage(businessId, prompt, postLength, templateType) {
3384
+ const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt, length: postLength, type: templateType });
3373
3385
  return this.socialPostsApiService.suggestMessage(req);
3374
3386
  }
3375
3387
  }
@@ -3955,9 +3967,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
3955
3967
  args: [{ providedIn: 'root' }]
3956
3968
  }], ctorParameters: function () { return [{ type: PostPerformanceApiService }]; } });
3957
3969
 
3970
+ class SocialPostsV2Service {
3971
+ constructor(socialpostV2ApiService) {
3972
+ this.socialpostV2ApiService = socialpostV2ApiService;
3973
+ }
3974
+ createImage(businessId, prompt, imageAmount = 3, size = '1024x1024') {
3975
+ const req = new CreateImageRequest({ businessId: businessId, prompt: prompt, imageAmount: imageAmount, size: size, responseFormat: 'url' });
3976
+ return this.socialpostV2ApiService.createImages(req);
3977
+ }
3978
+ }
3979
+ SocialPostsV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, deps: [{ token: SocialPostsV2ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
3980
+ SocialPostsV2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, providedIn: 'root' });
3981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, decorators: [{
3982
+ type: Injectable,
3983
+ args: [{ providedIn: 'root' }]
3984
+ }], ctorParameters: function () { return [{ type: SocialPostsV2ApiService }]; } });
3985
+
3958
3986
  /**
3959
3987
  * Generated bundle index. Do not edit.
3960
3988
  */
3961
3989
 
3962
- export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostLength, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TenorGifsService };
3990
+ export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MessageLength, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, SocialPostsV2Service, TemplateType, TenorGifsService };
3963
3991
  //# sourceMappingURL=vendasta-social-posts.mjs.map