Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

4040 рядки
148 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package plus provides access to the Google+ API.
  6. //
  7. // For product documentation, see: https://developers.google.com/+/api/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/plus/v1"
  14. // ...
  15. // ctx := context.Background()
  16. // plusService, err := plus.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // plusService, err := plus.NewService(ctx, option.WithScopes(plus.UserinfoProfileScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // plusService, err := plus.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // plusService, err := plus.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package plus // import "google.golang.org/api/plus/v1"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "plus:v1"
  71. const apiName = "plus"
  72. const apiVersion = "v1"
  73. const basePath = "https://www.googleapis.com/plus/v1/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View your basic profile info, including your age range and language
  77. PlusLoginScope = "https://www.googleapis.com/auth/plus.login"
  78. // Know who you are on Google
  79. PlusMeScope = "https://www.googleapis.com/auth/plus.me"
  80. // View your email address
  81. UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
  82. // See your personal info, including any personal info you've made
  83. // publically available
  84. UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
  85. )
  86. // NewService creates a new Service.
  87. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  88. scopesOption := option.WithScopes(
  89. "https://www.googleapis.com/auth/plus.login",
  90. "https://www.googleapis.com/auth/plus.me",
  91. "https://www.googleapis.com/auth/userinfo.email",
  92. "https://www.googleapis.com/auth/userinfo.profile",
  93. )
  94. // NOTE: prepend, so we don't override user-specified scopes.
  95. opts = append([]option.ClientOption{scopesOption}, opts...)
  96. client, endpoint, err := htransport.NewClient(ctx, opts...)
  97. if err != nil {
  98. return nil, err
  99. }
  100. s, err := New(client)
  101. if err != nil {
  102. return nil, err
  103. }
  104. if endpoint != "" {
  105. s.BasePath = endpoint
  106. }
  107. return s, nil
  108. }
  109. // New creates a new Service. It uses the provided http.Client for requests.
  110. //
  111. // Deprecated: please use NewService instead.
  112. // To provide a custom HTTP client, use option.WithHTTPClient.
  113. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  114. func New(client *http.Client) (*Service, error) {
  115. if client == nil {
  116. return nil, errors.New("client is nil")
  117. }
  118. s := &Service{client: client, BasePath: basePath}
  119. s.Activities = NewActivitiesService(s)
  120. s.Comments = NewCommentsService(s)
  121. s.People = NewPeopleService(s)
  122. return s, nil
  123. }
  124. type Service struct {
  125. client *http.Client
  126. BasePath string // API endpoint base URL
  127. UserAgent string // optional additional User-Agent fragment
  128. Activities *ActivitiesService
  129. Comments *CommentsService
  130. People *PeopleService
  131. }
  132. func (s *Service) userAgent() string {
  133. if s.UserAgent == "" {
  134. return googleapi.UserAgent
  135. }
  136. return googleapi.UserAgent + " " + s.UserAgent
  137. }
  138. func NewActivitiesService(s *Service) *ActivitiesService {
  139. rs := &ActivitiesService{s: s}
  140. return rs
  141. }
  142. type ActivitiesService struct {
  143. s *Service
  144. }
  145. func NewCommentsService(s *Service) *CommentsService {
  146. rs := &CommentsService{s: s}
  147. return rs
  148. }
  149. type CommentsService struct {
  150. s *Service
  151. }
  152. func NewPeopleService(s *Service) *PeopleService {
  153. rs := &PeopleService{s: s}
  154. return rs
  155. }
  156. type PeopleService struct {
  157. s *Service
  158. }
  159. type Acl struct {
  160. // Description: Description of the access granted, suitable for display.
  161. Description string `json:"description,omitempty"`
  162. // Items: The list of access entries.
  163. Items []*PlusAclentryResource `json:"items,omitempty"`
  164. // Kind: Identifies this resource as a collection of access controls.
  165. // Value: "plus#acl".
  166. Kind string `json:"kind,omitempty"`
  167. // ForceSendFields is a list of field names (e.g. "Description") to
  168. // unconditionally include in API requests. By default, fields with
  169. // empty values are omitted from API requests. However, any non-pointer,
  170. // non-interface field appearing in ForceSendFields will be sent to the
  171. // server regardless of whether the field is empty or not. This may be
  172. // used to include empty fields in Patch requests.
  173. ForceSendFields []string `json:"-"`
  174. // NullFields is a list of field names (e.g. "Description") to include
  175. // in API requests with the JSON null value. By default, fields with
  176. // empty values are omitted from API requests. However, any field with
  177. // an empty value appearing in NullFields will be sent to the server as
  178. // null. It is an error if a field in this list has a non-empty value.
  179. // This may be used to include null fields in Patch requests.
  180. NullFields []string `json:"-"`
  181. }
  182. func (s *Acl) MarshalJSON() ([]byte, error) {
  183. type NoMethod Acl
  184. raw := NoMethod(*s)
  185. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  186. }
  187. type Activity struct {
  188. // Access: Identifies who has access to see this activity.
  189. Access *Acl `json:"access,omitempty"`
  190. // Actor: The person who performed this activity.
  191. Actor *ActivityActor `json:"actor,omitempty"`
  192. // Address: Street address where this activity occurred.
  193. Address string `json:"address,omitempty"`
  194. // Annotation: Additional content added by the person who shared this
  195. // activity, applicable only when resharing an activity.
  196. Annotation string `json:"annotation,omitempty"`
  197. // CrosspostSource: If this activity is a crosspost from another system,
  198. // this property specifies the ID of the original activity.
  199. CrosspostSource string `json:"crosspostSource,omitempty"`
  200. // Etag: ETag of this response for caching purposes.
  201. Etag string `json:"etag,omitempty"`
  202. // Geocode: Latitude and longitude where this activity occurred. Format
  203. // is latitude followed by longitude, space separated.
  204. Geocode string `json:"geocode,omitempty"`
  205. // Id: The ID of this activity.
  206. Id string `json:"id,omitempty"`
  207. // Kind: Identifies this resource as an activity. Value:
  208. // "plus#activity".
  209. Kind string `json:"kind,omitempty"`
  210. // Location: The location where this activity occurred.
  211. Location *Place `json:"location,omitempty"`
  212. // Object: The object of this activity.
  213. Object *ActivityObject `json:"object,omitempty"`
  214. // PlaceId: ID of the place where this activity occurred.
  215. PlaceId string `json:"placeId,omitempty"`
  216. // PlaceName: Name of the place where this activity occurred.
  217. PlaceName string `json:"placeName,omitempty"`
  218. // Provider: The service provider that initially published this
  219. // activity.
  220. Provider *ActivityProvider `json:"provider,omitempty"`
  221. // Published: The time at which this activity was initially published.
  222. // Formatted as an RFC 3339 timestamp.
  223. Published string `json:"published,omitempty"`
  224. // Radius: Radius, in meters, of the region where this activity
  225. // occurred, centered at the latitude and longitude identified in
  226. // geocode.
  227. Radius string `json:"radius,omitempty"`
  228. // Title: Title of this activity.
  229. Title string `json:"title,omitempty"`
  230. // Updated: The time at which this activity was last updated. Formatted
  231. // as an RFC 3339 timestamp.
  232. Updated string `json:"updated,omitempty"`
  233. // Url: The link to this activity.
  234. Url string `json:"url,omitempty"`
  235. // Verb: This activity's verb, which indicates the action that was
  236. // performed. Possible values include, but are not limited to, the
  237. // following values:
  238. // - "post" - Publish content to the stream.
  239. // - "share" - Reshare an activity.
  240. Verb string `json:"verb,omitempty"`
  241. // ServerResponse contains the HTTP response code and headers from the
  242. // server.
  243. googleapi.ServerResponse `json:"-"`
  244. // ForceSendFields is a list of field names (e.g. "Access") to
  245. // unconditionally include in API requests. By default, fields with
  246. // empty values are omitted from API requests. However, any non-pointer,
  247. // non-interface field appearing in ForceSendFields will be sent to the
  248. // server regardless of whether the field is empty or not. This may be
  249. // used to include empty fields in Patch requests.
  250. ForceSendFields []string `json:"-"`
  251. // NullFields is a list of field names (e.g. "Access") to include in API
  252. // requests with the JSON null value. By default, fields with empty
  253. // values are omitted from API requests. However, any field with an
  254. // empty value appearing in NullFields will be sent to the server as
  255. // null. It is an error if a field in this list has a non-empty value.
  256. // This may be used to include null fields in Patch requests.
  257. NullFields []string `json:"-"`
  258. }
  259. func (s *Activity) MarshalJSON() ([]byte, error) {
  260. type NoMethod Activity
  261. raw := NoMethod(*s)
  262. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  263. }
  264. // ActivityActor: The person who performed this activity.
  265. type ActivityActor struct {
  266. // ClientSpecificActorInfo: Actor info specific to particular clients.
  267. ClientSpecificActorInfo *ActivityActorClientSpecificActorInfo `json:"clientSpecificActorInfo,omitempty"`
  268. // DisplayName: The name of the actor, suitable for display.
  269. DisplayName string `json:"displayName,omitempty"`
  270. // Id: The ID of the actor's Person resource.
  271. Id string `json:"id,omitempty"`
  272. // Image: The image representation of the actor.
  273. Image *ActivityActorImage `json:"image,omitempty"`
  274. // Name: An object representation of the individual components of name.
  275. Name *ActivityActorName `json:"name,omitempty"`
  276. // Url: The link to the actor's Google profile.
  277. Url string `json:"url,omitempty"`
  278. // Verification: Verification status of actor.
  279. Verification *ActivityActorVerification `json:"verification,omitempty"`
  280. // ForceSendFields is a list of field names (e.g.
  281. // "ClientSpecificActorInfo") to unconditionally include in API
  282. // requests. By default, fields with empty values are omitted from API
  283. // requests. However, any non-pointer, non-interface field appearing in
  284. // ForceSendFields will be sent to the server regardless of whether the
  285. // field is empty or not. This may be used to include empty fields in
  286. // Patch requests.
  287. ForceSendFields []string `json:"-"`
  288. // NullFields is a list of field names (e.g. "ClientSpecificActorInfo")
  289. // to include in API requests with the JSON null value. By default,
  290. // fields with empty values are omitted from API requests. However, any
  291. // field with an empty value appearing in NullFields will be sent to the
  292. // server as null. It is an error if a field in this list has a
  293. // non-empty value. This may be used to include null fields in Patch
  294. // requests.
  295. NullFields []string `json:"-"`
  296. }
  297. func (s *ActivityActor) MarshalJSON() ([]byte, error) {
  298. type NoMethod ActivityActor
  299. raw := NoMethod(*s)
  300. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  301. }
  302. // ActivityActorClientSpecificActorInfo: Actor info specific to
  303. // particular clients.
  304. type ActivityActorClientSpecificActorInfo struct {
  305. // YoutubeActorInfo: Actor info specific to YouTube clients.
  306. YoutubeActorInfo *ActivityActorClientSpecificActorInfoYoutubeActorInfo `json:"youtubeActorInfo,omitempty"`
  307. // ForceSendFields is a list of field names (e.g. "YoutubeActorInfo") to
  308. // unconditionally include in API requests. By default, fields with
  309. // empty values are omitted from API requests. However, any non-pointer,
  310. // non-interface field appearing in ForceSendFields will be sent to the
  311. // server regardless of whether the field is empty or not. This may be
  312. // used to include empty fields in Patch requests.
  313. ForceSendFields []string `json:"-"`
  314. // NullFields is a list of field names (e.g. "YoutubeActorInfo") to
  315. // include in API requests with the JSON null value. By default, fields
  316. // with empty values are omitted from API requests. However, any field
  317. // with an empty value appearing in NullFields will be sent to the
  318. // server as null. It is an error if a field in this list has a
  319. // non-empty value. This may be used to include null fields in Patch
  320. // requests.
  321. NullFields []string `json:"-"`
  322. }
  323. func (s *ActivityActorClientSpecificActorInfo) MarshalJSON() ([]byte, error) {
  324. type NoMethod ActivityActorClientSpecificActorInfo
  325. raw := NoMethod(*s)
  326. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  327. }
  328. // ActivityActorClientSpecificActorInfoYoutubeActorInfo: Actor info
  329. // specific to YouTube clients.
  330. type ActivityActorClientSpecificActorInfoYoutubeActorInfo struct {
  331. // ChannelId: ID of the YouTube channel owned by the Actor.
  332. ChannelId string `json:"channelId,omitempty"`
  333. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  334. // unconditionally include in API requests. By default, fields with
  335. // empty values are omitted from API requests. However, any non-pointer,
  336. // non-interface field appearing in ForceSendFields will be sent to the
  337. // server regardless of whether the field is empty or not. This may be
  338. // used to include empty fields in Patch requests.
  339. ForceSendFields []string `json:"-"`
  340. // NullFields is a list of field names (e.g. "ChannelId") to include in
  341. // API requests with the JSON null value. By default, fields with empty
  342. // values are omitted from API requests. However, any field with an
  343. // empty value appearing in NullFields will be sent to the server as
  344. // null. It is an error if a field in this list has a non-empty value.
  345. // This may be used to include null fields in Patch requests.
  346. NullFields []string `json:"-"`
  347. }
  348. func (s *ActivityActorClientSpecificActorInfoYoutubeActorInfo) MarshalJSON() ([]byte, error) {
  349. type NoMethod ActivityActorClientSpecificActorInfoYoutubeActorInfo
  350. raw := NoMethod(*s)
  351. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  352. }
  353. // ActivityActorImage: The image representation of the actor.
  354. type ActivityActorImage struct {
  355. // Url: The URL of the actor's profile photo. To resize the image and
  356. // crop it to a square, append the query string ?sz=x, where x is the
  357. // dimension in pixels of each side.
  358. Url string `json:"url,omitempty"`
  359. // ForceSendFields is a list of field names (e.g. "Url") to
  360. // unconditionally include in API requests. By default, fields with
  361. // empty values are omitted from API requests. However, any non-pointer,
  362. // non-interface field appearing in ForceSendFields will be sent to the
  363. // server regardless of whether the field is empty or not. This may be
  364. // used to include empty fields in Patch requests.
  365. ForceSendFields []string `json:"-"`
  366. // NullFields is a list of field names (e.g. "Url") to include in API
  367. // requests with the JSON null value. By default, fields with empty
  368. // values are omitted from API requests. However, any field with an
  369. // empty value appearing in NullFields will be sent to the server as
  370. // null. It is an error if a field in this list has a non-empty value.
  371. // This may be used to include null fields in Patch requests.
  372. NullFields []string `json:"-"`
  373. }
  374. func (s *ActivityActorImage) MarshalJSON() ([]byte, error) {
  375. type NoMethod ActivityActorImage
  376. raw := NoMethod(*s)
  377. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  378. }
  379. // ActivityActorName: An object representation of the individual
  380. // components of name.
  381. type ActivityActorName struct {
  382. // FamilyName: The family name ("last name") of the actor.
  383. FamilyName string `json:"familyName,omitempty"`
  384. // GivenName: The given name ("first name") of the actor.
  385. GivenName string `json:"givenName,omitempty"`
  386. // ForceSendFields is a list of field names (e.g. "FamilyName") to
  387. // unconditionally include in API requests. By default, fields with
  388. // empty values are omitted from API requests. However, any non-pointer,
  389. // non-interface field appearing in ForceSendFields will be sent to the
  390. // server regardless of whether the field is empty or not. This may be
  391. // used to include empty fields in Patch requests.
  392. ForceSendFields []string `json:"-"`
  393. // NullFields is a list of field names (e.g. "FamilyName") to include in
  394. // API requests with the JSON null value. By default, fields with empty
  395. // values are omitted from API requests. However, any field with an
  396. // empty value appearing in NullFields will be sent to the server as
  397. // null. It is an error if a field in this list has a non-empty value.
  398. // This may be used to include null fields in Patch requests.
  399. NullFields []string `json:"-"`
  400. }
  401. func (s *ActivityActorName) MarshalJSON() ([]byte, error) {
  402. type NoMethod ActivityActorName
  403. raw := NoMethod(*s)
  404. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  405. }
  406. // ActivityActorVerification: Verification status of actor.
  407. type ActivityActorVerification struct {
  408. // AdHocVerified: Verification for one-time or manual processes.
  409. AdHocVerified string `json:"adHocVerified,omitempty"`
  410. // ForceSendFields is a list of field names (e.g. "AdHocVerified") to
  411. // unconditionally include in API requests. By default, fields with
  412. // empty values are omitted from API requests. However, any non-pointer,
  413. // non-interface field appearing in ForceSendFields will be sent to the
  414. // server regardless of whether the field is empty or not. This may be
  415. // used to include empty fields in Patch requests.
  416. ForceSendFields []string `json:"-"`
  417. // NullFields is a list of field names (e.g. "AdHocVerified") to include
  418. // in API requests with the JSON null value. By default, fields with
  419. // empty values are omitted from API requests. However, any field with
  420. // an empty value appearing in NullFields will be sent to the server as
  421. // null. It is an error if a field in this list has a non-empty value.
  422. // This may be used to include null fields in Patch requests.
  423. NullFields []string `json:"-"`
  424. }
  425. func (s *ActivityActorVerification) MarshalJSON() ([]byte, error) {
  426. type NoMethod ActivityActorVerification
  427. raw := NoMethod(*s)
  428. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  429. }
  430. // ActivityObject: The object of this activity.
  431. type ActivityObject struct {
  432. // Actor: If this activity's object is itself another activity, such as
  433. // when a person reshares an activity, this property specifies the
  434. // original activity's actor.
  435. Actor *ActivityObjectActor `json:"actor,omitempty"`
  436. // Attachments: The media objects attached to this activity.
  437. Attachments []*ActivityObjectAttachments `json:"attachments,omitempty"`
  438. // Content: The HTML-formatted content, which is suitable for display.
  439. Content string `json:"content,omitempty"`
  440. // Id: The ID of the object. When resharing an activity, this is the ID
  441. // of the activity that is being reshared.
  442. Id string `json:"id,omitempty"`
  443. // ObjectType: The type of the object. Possible values include, but are
  444. // not limited to, the following values:
  445. // - "note" - Textual content.
  446. // - "activity" - A Google+ activity.
  447. ObjectType string `json:"objectType,omitempty"`
  448. // OriginalContent: The content (text) as provided by the author, which
  449. // is stored without any HTML formatting. When creating or updating an
  450. // activity, this value must be supplied as plain text in the request.
  451. OriginalContent string `json:"originalContent,omitempty"`
  452. // Plusoners: People who +1'd this activity.
  453. Plusoners *ActivityObjectPlusoners `json:"plusoners,omitempty"`
  454. // Replies: Comments in reply to this activity.
  455. Replies *ActivityObjectReplies `json:"replies,omitempty"`
  456. // Resharers: People who reshared this activity.
  457. Resharers *ActivityObjectResharers `json:"resharers,omitempty"`
  458. // Url: The URL that points to the linked resource.
  459. Url string `json:"url,omitempty"`
  460. // ForceSendFields is a list of field names (e.g. "Actor") to
  461. // unconditionally include in API requests. By default, fields with
  462. // empty values are omitted from API requests. However, any non-pointer,
  463. // non-interface field appearing in ForceSendFields will be sent to the
  464. // server regardless of whether the field is empty or not. This may be
  465. // used to include empty fields in Patch requests.
  466. ForceSendFields []string `json:"-"`
  467. // NullFields is a list of field names (e.g. "Actor") to include in API
  468. // requests with the JSON null value. By default, fields with empty
  469. // values are omitted from API requests. However, any field with an
  470. // empty value appearing in NullFields will be sent to the server as
  471. // null. It is an error if a field in this list has a non-empty value.
  472. // This may be used to include null fields in Patch requests.
  473. NullFields []string `json:"-"`
  474. }
  475. func (s *ActivityObject) MarshalJSON() ([]byte, error) {
  476. type NoMethod ActivityObject
  477. raw := NoMethod(*s)
  478. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  479. }
  480. // ActivityObjectActor: If this activity's object is itself another
  481. // activity, such as when a person reshares an activity, this property
  482. // specifies the original activity's actor.
  483. type ActivityObjectActor struct {
  484. // ClientSpecificActorInfo: Actor info specific to particular clients.
  485. ClientSpecificActorInfo *ActivityObjectActorClientSpecificActorInfo `json:"clientSpecificActorInfo,omitempty"`
  486. // DisplayName: The original actor's name, which is suitable for
  487. // display.
  488. DisplayName string `json:"displayName,omitempty"`
  489. // Id: ID of the original actor.
  490. Id string `json:"id,omitempty"`
  491. // Image: The image representation of the original actor.
  492. Image *ActivityObjectActorImage `json:"image,omitempty"`
  493. // Url: A link to the original actor's Google profile.
  494. Url string `json:"url,omitempty"`
  495. // Verification: Verification status of actor.
  496. Verification *ActivityObjectActorVerification `json:"verification,omitempty"`
  497. // ForceSendFields is a list of field names (e.g.
  498. // "ClientSpecificActorInfo") to unconditionally include in API
  499. // requests. By default, fields with empty values are omitted from API
  500. // requests. However, any non-pointer, non-interface field appearing in
  501. // ForceSendFields will be sent to the server regardless of whether the
  502. // field is empty or not. This may be used to include empty fields in
  503. // Patch requests.
  504. ForceSendFields []string `json:"-"`
  505. // NullFields is a list of field names (e.g. "ClientSpecificActorInfo")
  506. // to include in API requests with the JSON null value. By default,
  507. // fields with empty values are omitted from API requests. However, any
  508. // field with an empty value appearing in NullFields will be sent to the
  509. // server as null. It is an error if a field in this list has a
  510. // non-empty value. This may be used to include null fields in Patch
  511. // requests.
  512. NullFields []string `json:"-"`
  513. }
  514. func (s *ActivityObjectActor) MarshalJSON() ([]byte, error) {
  515. type NoMethod ActivityObjectActor
  516. raw := NoMethod(*s)
  517. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  518. }
  519. // ActivityObjectActorClientSpecificActorInfo: Actor info specific to
  520. // particular clients.
  521. type ActivityObjectActorClientSpecificActorInfo struct {
  522. // YoutubeActorInfo: Actor info specific to YouTube clients.
  523. YoutubeActorInfo *ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo `json:"youtubeActorInfo,omitempty"`
  524. // ForceSendFields is a list of field names (e.g. "YoutubeActorInfo") to
  525. // unconditionally include in API requests. By default, fields with
  526. // empty values are omitted from API requests. However, any non-pointer,
  527. // non-interface field appearing in ForceSendFields will be sent to the
  528. // server regardless of whether the field is empty or not. This may be
  529. // used to include empty fields in Patch requests.
  530. ForceSendFields []string `json:"-"`
  531. // NullFields is a list of field names (e.g. "YoutubeActorInfo") to
  532. // include in API requests with the JSON null value. By default, fields
  533. // with empty values are omitted from API requests. However, any field
  534. // with an empty value appearing in NullFields will be sent to the
  535. // server as null. It is an error if a field in this list has a
  536. // non-empty value. This may be used to include null fields in Patch
  537. // requests.
  538. NullFields []string `json:"-"`
  539. }
  540. func (s *ActivityObjectActorClientSpecificActorInfo) MarshalJSON() ([]byte, error) {
  541. type NoMethod ActivityObjectActorClientSpecificActorInfo
  542. raw := NoMethod(*s)
  543. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  544. }
  545. // ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo: Actor
  546. // info specific to YouTube clients.
  547. type ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo struct {
  548. // ChannelId: ID of the YouTube channel owned by the Actor.
  549. ChannelId string `json:"channelId,omitempty"`
  550. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  551. // unconditionally include in API requests. By default, fields with
  552. // empty values are omitted from API requests. However, any non-pointer,
  553. // non-interface field appearing in ForceSendFields will be sent to the
  554. // server regardless of whether the field is empty or not. This may be
  555. // used to include empty fields in Patch requests.
  556. ForceSendFields []string `json:"-"`
  557. // NullFields is a list of field names (e.g. "ChannelId") to include in
  558. // API requests with the JSON null value. By default, fields with empty
  559. // values are omitted from API requests. However, any field with an
  560. // empty value appearing in NullFields will be sent to the server as
  561. // null. It is an error if a field in this list has a non-empty value.
  562. // This may be used to include null fields in Patch requests.
  563. NullFields []string `json:"-"`
  564. }
  565. func (s *ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo) MarshalJSON() ([]byte, error) {
  566. type NoMethod ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo
  567. raw := NoMethod(*s)
  568. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  569. }
  570. // ActivityObjectActorImage: The image representation of the original
  571. // actor.
  572. type ActivityObjectActorImage struct {
  573. // Url: A URL that points to a thumbnail photo of the original actor.
  574. Url string `json:"url,omitempty"`
  575. // ForceSendFields is a list of field names (e.g. "Url") to
  576. // unconditionally include in API requests. By default, fields with
  577. // empty values are omitted from API requests. However, any non-pointer,
  578. // non-interface field appearing in ForceSendFields will be sent to the
  579. // server regardless of whether the field is empty or not. This may be
  580. // used to include empty fields in Patch requests.
  581. ForceSendFields []string `json:"-"`
  582. // NullFields is a list of field names (e.g. "Url") to include in API
  583. // requests with the JSON null value. By default, fields with empty
  584. // values are omitted from API requests. However, any field with an
  585. // empty value appearing in NullFields will be sent to the server as
  586. // null. It is an error if a field in this list has a non-empty value.
  587. // This may be used to include null fields in Patch requests.
  588. NullFields []string `json:"-"`
  589. }
  590. func (s *ActivityObjectActorImage) MarshalJSON() ([]byte, error) {
  591. type NoMethod ActivityObjectActorImage
  592. raw := NoMethod(*s)
  593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  594. }
  595. // ActivityObjectActorVerification: Verification status of actor.
  596. type ActivityObjectActorVerification struct {
  597. // AdHocVerified: Verification for one-time or manual processes.
  598. AdHocVerified string `json:"adHocVerified,omitempty"`
  599. // ForceSendFields is a list of field names (e.g. "AdHocVerified") to
  600. // unconditionally include in API requests. By default, fields with
  601. // empty values are omitted from API requests. However, any non-pointer,
  602. // non-interface field appearing in ForceSendFields will be sent to the
  603. // server regardless of whether the field is empty or not. This may be
  604. // used to include empty fields in Patch requests.
  605. ForceSendFields []string `json:"-"`
  606. // NullFields is a list of field names (e.g. "AdHocVerified") to include
  607. // in API requests with the JSON null value. By default, fields with
  608. // empty values are omitted from API requests. However, any field with
  609. // an empty value appearing in NullFields will be sent to the server as
  610. // null. It is an error if a field in this list has a non-empty value.
  611. // This may be used to include null fields in Patch requests.
  612. NullFields []string `json:"-"`
  613. }
  614. func (s *ActivityObjectActorVerification) MarshalJSON() ([]byte, error) {
  615. type NoMethod ActivityObjectActorVerification
  616. raw := NoMethod(*s)
  617. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  618. }
  619. type ActivityObjectAttachments struct {
  620. // Content: If the attachment is an article, this property contains a
  621. // snippet of text from the article. It can also include descriptions
  622. // for other types.
  623. Content string `json:"content,omitempty"`
  624. // DisplayName: The title of the attachment, such as a photo caption or
  625. // an article title.
  626. DisplayName string `json:"displayName,omitempty"`
  627. // Embed: If the attachment is a video, the embeddable link.
  628. Embed *ActivityObjectAttachmentsEmbed `json:"embed,omitempty"`
  629. // FullImage: The full image URL for photo attachments.
  630. FullImage *ActivityObjectAttachmentsFullImage `json:"fullImage,omitempty"`
  631. // Id: The ID of the attachment.
  632. Id string `json:"id,omitempty"`
  633. // Image: The preview image for photos or videos.
  634. Image *ActivityObjectAttachmentsImage `json:"image,omitempty"`
  635. // ObjectType: The type of media object. Possible values include, but
  636. // are not limited to, the following values:
  637. // - "photo" - A photo.
  638. // - "album" - A photo album.
  639. // - "video" - A video.
  640. // - "article" - An article, specified by a link.
  641. ObjectType string `json:"objectType,omitempty"`
  642. // Thumbnails: If the attachment is an album, this property is a list of
  643. // potential additional thumbnails from the album.
  644. Thumbnails []*ActivityObjectAttachmentsThumbnails `json:"thumbnails,omitempty"`
  645. // Url: The link to the attachment, which should be of type text/html.
  646. Url string `json:"url,omitempty"`
  647. // ForceSendFields is a list of field names (e.g. "Content") to
  648. // unconditionally include in API requests. By default, fields with
  649. // empty values are omitted from API requests. However, any non-pointer,
  650. // non-interface field appearing in ForceSendFields will be sent to the
  651. // server regardless of whether the field is empty or not. This may be
  652. // used to include empty fields in Patch requests.
  653. ForceSendFields []string `json:"-"`
  654. // NullFields is a list of field names (e.g. "Content") to include in
  655. // API requests with the JSON null value. By default, fields with empty
  656. // values are omitted from API requests. However, any field with an
  657. // empty value appearing in NullFields will be sent to the server as
  658. // null. It is an error if a field in this list has a non-empty value.
  659. // This may be used to include null fields in Patch requests.
  660. NullFields []string `json:"-"`
  661. }
  662. func (s *ActivityObjectAttachments) MarshalJSON() ([]byte, error) {
  663. type NoMethod ActivityObjectAttachments
  664. raw := NoMethod(*s)
  665. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  666. }
  667. // ActivityObjectAttachmentsEmbed: If the attachment is a video, the
  668. // embeddable link.
  669. type ActivityObjectAttachmentsEmbed struct {
  670. // Type: Media type of the link.
  671. Type string `json:"type,omitempty"`
  672. // Url: URL of the link.
  673. Url string `json:"url,omitempty"`
  674. // ForceSendFields is a list of field names (e.g. "Type") to
  675. // unconditionally include in API requests. By default, fields with
  676. // empty values are omitted from API requests. However, any non-pointer,
  677. // non-interface field appearing in ForceSendFields will be sent to the
  678. // server regardless of whether the field is empty or not. This may be
  679. // used to include empty fields in Patch requests.
  680. ForceSendFields []string `json:"-"`
  681. // NullFields is a list of field names (e.g. "Type") to include in API
  682. // requests with the JSON null value. By default, fields with empty
  683. // values are omitted from API requests. However, any field with an
  684. // empty value appearing in NullFields will be sent to the server as
  685. // null. It is an error if a field in this list has a non-empty value.
  686. // This may be used to include null fields in Patch requests.
  687. NullFields []string `json:"-"`
  688. }
  689. func (s *ActivityObjectAttachmentsEmbed) MarshalJSON() ([]byte, error) {
  690. type NoMethod ActivityObjectAttachmentsEmbed
  691. raw := NoMethod(*s)
  692. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  693. }
  694. // ActivityObjectAttachmentsFullImage: The full image URL for photo
  695. // attachments.
  696. type ActivityObjectAttachmentsFullImage struct {
  697. // Height: The height, in pixels, of the linked resource.
  698. Height int64 `json:"height,omitempty"`
  699. // Type: Media type of the link.
  700. Type string `json:"type,omitempty"`
  701. // Url: URL of the image.
  702. Url string `json:"url,omitempty"`
  703. // Width: The width, in pixels, of the linked resource.
  704. Width int64 `json:"width,omitempty"`
  705. // ForceSendFields is a list of field names (e.g. "Height") to
  706. // unconditionally include in API requests. By default, fields with
  707. // empty values are omitted from API requests. However, any non-pointer,
  708. // non-interface field appearing in ForceSendFields will be sent to the
  709. // server regardless of whether the field is empty or not. This may be
  710. // used to include empty fields in Patch requests.
  711. ForceSendFields []string `json:"-"`
  712. // NullFields is a list of field names (e.g. "Height") to include in API
  713. // requests with the JSON null value. By default, fields with empty
  714. // values are omitted from API requests. However, any field with an
  715. // empty value appearing in NullFields will be sent to the server as
  716. // null. It is an error if a field in this list has a non-empty value.
  717. // This may be used to include null fields in Patch requests.
  718. NullFields []string `json:"-"`
  719. }
  720. func (s *ActivityObjectAttachmentsFullImage) MarshalJSON() ([]byte, error) {
  721. type NoMethod ActivityObjectAttachmentsFullImage
  722. raw := NoMethod(*s)
  723. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  724. }
  725. // ActivityObjectAttachmentsImage: The preview image for photos or
  726. // videos.
  727. type ActivityObjectAttachmentsImage struct {
  728. // Height: The height, in pixels, of the linked resource.
  729. Height int64 `json:"height,omitempty"`
  730. // Type: Media type of the link.
  731. Type string `json:"type,omitempty"`
  732. // Url: Image URL.
  733. Url string `json:"url,omitempty"`
  734. // Width: The width, in pixels, of the linked resource.
  735. Width int64 `json:"width,omitempty"`
  736. // ForceSendFields is a list of field names (e.g. "Height") to
  737. // unconditionally include in API requests. By default, fields with
  738. // empty values are omitted from API requests. However, any non-pointer,
  739. // non-interface field appearing in ForceSendFields will be sent to the
  740. // server regardless of whether the field is empty or not. This may be
  741. // used to include empty fields in Patch requests.
  742. ForceSendFields []string `json:"-"`
  743. // NullFields is a list of field names (e.g. "Height") to include in API
  744. // requests with the JSON null value. By default, fields with empty
  745. // values are omitted from API requests. However, any field with an
  746. // empty value appearing in NullFields will be sent to the server as
  747. // null. It is an error if a field in this list has a non-empty value.
  748. // This may be used to include null fields in Patch requests.
  749. NullFields []string `json:"-"`
  750. }
  751. func (s *ActivityObjectAttachmentsImage) MarshalJSON() ([]byte, error) {
  752. type NoMethod ActivityObjectAttachmentsImage
  753. raw := NoMethod(*s)
  754. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  755. }
  756. type ActivityObjectAttachmentsThumbnails struct {
  757. // Description: Potential name of the thumbnail.
  758. Description string `json:"description,omitempty"`
  759. // Image: Image resource.
  760. Image *ActivityObjectAttachmentsThumbnailsImage `json:"image,omitempty"`
  761. // Url: URL of the webpage containing the image.
  762. Url string `json:"url,omitempty"`
  763. // ForceSendFields is a list of field names (e.g. "Description") to
  764. // unconditionally include in API requests. By default, fields with
  765. // empty values are omitted from API requests. However, any non-pointer,
  766. // non-interface field appearing in ForceSendFields will be sent to the
  767. // server regardless of whether the field is empty or not. This may be
  768. // used to include empty fields in Patch requests.
  769. ForceSendFields []string `json:"-"`
  770. // NullFields is a list of field names (e.g. "Description") to include
  771. // in API requests with the JSON null value. By default, fields with
  772. // empty values are omitted from API requests. However, any field with
  773. // an empty value appearing in NullFields will be sent to the server as
  774. // null. It is an error if a field in this list has a non-empty value.
  775. // This may be used to include null fields in Patch requests.
  776. NullFields []string `json:"-"`
  777. }
  778. func (s *ActivityObjectAttachmentsThumbnails) MarshalJSON() ([]byte, error) {
  779. type NoMethod ActivityObjectAttachmentsThumbnails
  780. raw := NoMethod(*s)
  781. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  782. }
  783. // ActivityObjectAttachmentsThumbnailsImage: Image resource.
  784. type ActivityObjectAttachmentsThumbnailsImage struct {
  785. // Height: The height, in pixels, of the linked resource.
  786. Height int64 `json:"height,omitempty"`
  787. // Type: Media type of the link.
  788. Type string `json:"type,omitempty"`
  789. // Url: Image url.
  790. Url string `json:"url,omitempty"`
  791. // Width: The width, in pixels, of the linked resource.
  792. Width int64 `json:"width,omitempty"`
  793. // ForceSendFields is a list of field names (e.g. "Height") to
  794. // unconditionally include in API requests. By default, fields with
  795. // empty values are omitted from API requests. However, any non-pointer,
  796. // non-interface field appearing in ForceSendFields will be sent to the
  797. // server regardless of whether the field is empty or not. This may be
  798. // used to include empty fields in Patch requests.
  799. ForceSendFields []string `json:"-"`
  800. // NullFields is a list of field names (e.g. "Height") to include in API
  801. // requests with the JSON null value. By default, fields with empty
  802. // values are omitted from API requests. However, any field with an
  803. // empty value appearing in NullFields will be sent to the server as
  804. // null. It is an error if a field in this list has a non-empty value.
  805. // This may be used to include null fields in Patch requests.
  806. NullFields []string `json:"-"`
  807. }
  808. func (s *ActivityObjectAttachmentsThumbnailsImage) MarshalJSON() ([]byte, error) {
  809. type NoMethod ActivityObjectAttachmentsThumbnailsImage
  810. raw := NoMethod(*s)
  811. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  812. }
  813. // ActivityObjectPlusoners: People who +1'd this activity.
  814. type ActivityObjectPlusoners struct {
  815. // SelfLink: The URL for the collection of people who +1'd this
  816. // activity.
  817. SelfLink string `json:"selfLink,omitempty"`
  818. // TotalItems: Total number of people who +1'd this activity.
  819. TotalItems int64 `json:"totalItems,omitempty"`
  820. // ForceSendFields is a list of field names (e.g. "SelfLink") to
  821. // unconditionally include in API requests. By default, fields with
  822. // empty values are omitted from API requests. However, any non-pointer,
  823. // non-interface field appearing in ForceSendFields will be sent to the
  824. // server regardless of whether the field is empty or not. This may be
  825. // used to include empty fields in Patch requests.
  826. ForceSendFields []string `json:"-"`
  827. // NullFields is a list of field names (e.g. "SelfLink") to include in
  828. // API requests with the JSON null value. By default, fields with empty
  829. // values are omitted from API requests. However, any field with an
  830. // empty value appearing in NullFields will be sent to the server as
  831. // null. It is an error if a field in this list has a non-empty value.
  832. // This may be used to include null fields in Patch requests.
  833. NullFields []string `json:"-"`
  834. }
  835. func (s *ActivityObjectPlusoners) MarshalJSON() ([]byte, error) {
  836. type NoMethod ActivityObjectPlusoners
  837. raw := NoMethod(*s)
  838. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  839. }
  840. // ActivityObjectReplies: Comments in reply to this activity.
  841. type ActivityObjectReplies struct {
  842. // SelfLink: The URL for the collection of comments in reply to this
  843. // activity.
  844. SelfLink string `json:"selfLink,omitempty"`
  845. // TotalItems: Total number of comments on this activity.
  846. TotalItems int64 `json:"totalItems,omitempty"`
  847. // ForceSendFields is a list of field names (e.g. "SelfLink") to
  848. // unconditionally include in API requests. By default, fields with
  849. // empty values are omitted from API requests. However, any non-pointer,
  850. // non-interface field appearing in ForceSendFields will be sent to the
  851. // server regardless of whether the field is empty or not. This may be
  852. // used to include empty fields in Patch requests.
  853. ForceSendFields []string `json:"-"`
  854. // NullFields is a list of field names (e.g. "SelfLink") to include in
  855. // API requests with the JSON null value. By default, fields with empty
  856. // values are omitted from API requests. However, any field with an
  857. // empty value appearing in NullFields will be sent to the server as
  858. // null. It is an error if a field in this list has a non-empty value.
  859. // This may be used to include null fields in Patch requests.
  860. NullFields []string `json:"-"`
  861. }
  862. func (s *ActivityObjectReplies) MarshalJSON() ([]byte, error) {
  863. type NoMethod ActivityObjectReplies
  864. raw := NoMethod(*s)
  865. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  866. }
  867. // ActivityObjectResharers: People who reshared this activity.
  868. type ActivityObjectResharers struct {
  869. // SelfLink: The URL for the collection of resharers.
  870. SelfLink string `json:"selfLink,omitempty"`
  871. // TotalItems: Total number of people who reshared this activity.
  872. TotalItems int64 `json:"totalItems,omitempty"`
  873. // ForceSendFields is a list of field names (e.g. "SelfLink") to
  874. // unconditionally include in API requests. By default, fields with
  875. // empty values are omitted from API requests. However, any non-pointer,
  876. // non-interface field appearing in ForceSendFields will be sent to the
  877. // server regardless of whether the field is empty or not. This may be
  878. // used to include empty fields in Patch requests.
  879. ForceSendFields []string `json:"-"`
  880. // NullFields is a list of field names (e.g. "SelfLink") to include in
  881. // API requests with the JSON null value. By default, fields with empty
  882. // values are omitted from API requests. However, any field with an
  883. // empty value appearing in NullFields will be sent to the server as
  884. // null. It is an error if a field in this list has a non-empty value.
  885. // This may be used to include null fields in Patch requests.
  886. NullFields []string `json:"-"`
  887. }
  888. func (s *ActivityObjectResharers) MarshalJSON() ([]byte, error) {
  889. type NoMethod ActivityObjectResharers
  890. raw := NoMethod(*s)
  891. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  892. }
  893. // ActivityProvider: The service provider that initially published this
  894. // activity.
  895. type ActivityProvider struct {
  896. // Title: Name of the service provider.
  897. Title string `json:"title,omitempty"`
  898. // ForceSendFields is a list of field names (e.g. "Title") to
  899. // unconditionally include in API requests. By default, fields with
  900. // empty values are omitted from API requests. However, any non-pointer,
  901. // non-interface field appearing in ForceSendFields will be sent to the
  902. // server regardless of whether the field is empty or not. This may be
  903. // used to include empty fields in Patch requests.
  904. ForceSendFields []string `json:"-"`
  905. // NullFields is a list of field names (e.g. "Title") to include in API
  906. // requests with the JSON null value. By default, fields with empty
  907. // values are omitted from API requests. However, any field with an
  908. // empty value appearing in NullFields will be sent to the server as
  909. // null. It is an error if a field in this list has a non-empty value.
  910. // This may be used to include null fields in Patch requests.
  911. NullFields []string `json:"-"`
  912. }
  913. func (s *ActivityProvider) MarshalJSON() ([]byte, error) {
  914. type NoMethod ActivityProvider
  915. raw := NoMethod(*s)
  916. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  917. }
  918. type ActivityFeed struct {
  919. // Etag: ETag of this response for caching purposes.
  920. Etag string `json:"etag,omitempty"`
  921. // Id: The ID of this collection of activities. Deprecated.
  922. Id string `json:"id,omitempty"`
  923. // Items: The activities in this page of results.
  924. Items []*Activity `json:"items,omitempty"`
  925. // Kind: Identifies this resource as a collection of activities. Value:
  926. // "plus#activityFeed".
  927. Kind string `json:"kind,omitempty"`
  928. // NextLink: Link to the next page of activities.
  929. NextLink string `json:"nextLink,omitempty"`
  930. // NextPageToken: The continuation token, which is used to page through
  931. // large result sets. Provide this value in a subsequent request to
  932. // return the next page of results.
  933. NextPageToken string `json:"nextPageToken,omitempty"`
  934. // SelfLink: Link to this activity resource.
  935. SelfLink string `json:"selfLink,omitempty"`
  936. // Title: The title of this collection of activities, which is a
  937. // truncated portion of the content.
  938. Title string `json:"title,omitempty"`
  939. // Updated: The time at which this collection of activities was last
  940. // updated. Formatted as an RFC 3339 timestamp.
  941. Updated string `json:"updated,omitempty"`
  942. // ServerResponse contains the HTTP response code and headers from the
  943. // server.
  944. googleapi.ServerResponse `json:"-"`
  945. // ForceSendFields is a list of field names (e.g. "Etag") to
  946. // unconditionally include in API requests. By default, fields with
  947. // empty values are omitted from API requests. However, any non-pointer,
  948. // non-interface field appearing in ForceSendFields will be sent to the
  949. // server regardless of whether the field is empty or not. This may be
  950. // used to include empty fields in Patch requests.
  951. ForceSendFields []string `json:"-"`
  952. // NullFields is a list of field names (e.g. "Etag") to include in API
  953. // requests with the JSON null value. By default, fields with empty
  954. // values are omitted from API requests. However, any field with an
  955. // empty value appearing in NullFields will be sent to the server as
  956. // null. It is an error if a field in this list has a non-empty value.
  957. // This may be used to include null fields in Patch requests.
  958. NullFields []string `json:"-"`
  959. }
  960. func (s *ActivityFeed) MarshalJSON() ([]byte, error) {
  961. type NoMethod ActivityFeed
  962. raw := NoMethod(*s)
  963. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  964. }
  965. type Comment struct {
  966. // Actor: The person who posted this comment.
  967. Actor *CommentActor `json:"actor,omitempty"`
  968. // Etag: ETag of this response for caching purposes.
  969. Etag string `json:"etag,omitempty"`
  970. // Id: The ID of this comment.
  971. Id string `json:"id,omitempty"`
  972. // InReplyTo: The activity this comment replied to.
  973. InReplyTo []*CommentInReplyTo `json:"inReplyTo,omitempty"`
  974. // Kind: Identifies this resource as a comment. Value: "plus#comment".
  975. Kind string `json:"kind,omitempty"`
  976. // Object: The object of this comment.
  977. Object *CommentObject `json:"object,omitempty"`
  978. // Plusoners: People who +1'd this comment.
  979. Plusoners *CommentPlusoners `json:"plusoners,omitempty"`
  980. // Published: The time at which this comment was initially published.
  981. // Formatted as an RFC 3339 timestamp.
  982. Published string `json:"published,omitempty"`
  983. // SelfLink: Link to this comment resource.
  984. SelfLink string `json:"selfLink,omitempty"`
  985. // Updated: The time at which this comment was last updated. Formatted
  986. // as an RFC 3339 timestamp.
  987. Updated string `json:"updated,omitempty"`
  988. // Verb: This comment's verb, indicating what action was performed.
  989. // Possible values are:
  990. // - "post" - Publish content to the stream.
  991. Verb string `json:"verb,omitempty"`
  992. // ServerResponse contains the HTTP response code and headers from the
  993. // server.
  994. googleapi.ServerResponse `json:"-"`
  995. // ForceSendFields is a list of field names (e.g. "Actor") to
  996. // unconditionally include in API requests. By default, fields with
  997. // empty values are omitted from API requests. However, any non-pointer,
  998. // non-interface field appearing in ForceSendFields will be sent to the
  999. // server regardless of whether the field is empty or not. This may be
  1000. // used to include empty fields in Patch requests.
  1001. ForceSendFields []string `json:"-"`
  1002. // NullFields is a list of field names (e.g. "Actor") to include in API
  1003. // requests with the JSON null value. By default, fields with empty
  1004. // values are omitted from API requests. However, any field with an
  1005. // empty value appearing in NullFields will be sent to the server as
  1006. // null. It is an error if a field in this list has a non-empty value.
  1007. // This may be used to include null fields in Patch requests.
  1008. NullFields []string `json:"-"`
  1009. }
  1010. func (s *Comment) MarshalJSON() ([]byte, error) {
  1011. type NoMethod Comment
  1012. raw := NoMethod(*s)
  1013. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1014. }
  1015. // CommentActor: The person who posted this comment.
  1016. type CommentActor struct {
  1017. // ClientSpecificActorInfo: Actor info specific to particular clients.
  1018. ClientSpecificActorInfo *CommentActorClientSpecificActorInfo `json:"clientSpecificActorInfo,omitempty"`
  1019. // DisplayName: The name of this actor, suitable for display.
  1020. DisplayName string `json:"displayName,omitempty"`
  1021. // Id: The ID of the actor.
  1022. Id string `json:"id,omitempty"`
  1023. // Image: The image representation of this actor.
  1024. Image *CommentActorImage `json:"image,omitempty"`
  1025. // Url: A link to the Person resource for this actor.
  1026. Url string `json:"url,omitempty"`
  1027. // Verification: Verification status of actor.
  1028. Verification *CommentActorVerification `json:"verification,omitempty"`
  1029. // ForceSendFields is a list of field names (e.g.
  1030. // "ClientSpecificActorInfo") to unconditionally include in API
  1031. // requests. By default, fields with empty values are omitted from API
  1032. // requests. However, any non-pointer, non-interface field appearing in
  1033. // ForceSendFields will be sent to the server regardless of whether the
  1034. // field is empty or not. This may be used to include empty fields in
  1035. // Patch requests.
  1036. ForceSendFields []string `json:"-"`
  1037. // NullFields is a list of field names (e.g. "ClientSpecificActorInfo")
  1038. // to include in API requests with the JSON null value. By default,
  1039. // fields with empty values are omitted from API requests. However, any
  1040. // field with an empty value appearing in NullFields will be sent to the
  1041. // server as null. It is an error if a field in this list has a
  1042. // non-empty value. This may be used to include null fields in Patch
  1043. // requests.
  1044. NullFields []string `json:"-"`
  1045. }
  1046. func (s *CommentActor) MarshalJSON() ([]byte, error) {
  1047. type NoMethod CommentActor
  1048. raw := NoMethod(*s)
  1049. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1050. }
  1051. // CommentActorClientSpecificActorInfo: Actor info specific to
  1052. // particular clients.
  1053. type CommentActorClientSpecificActorInfo struct {
  1054. // YoutubeActorInfo: Actor info specific to YouTube clients.
  1055. YoutubeActorInfo *CommentActorClientSpecificActorInfoYoutubeActorInfo `json:"youtubeActorInfo,omitempty"`
  1056. // ForceSendFields is a list of field names (e.g. "YoutubeActorInfo") to
  1057. // unconditionally include in API requests. By default, fields with
  1058. // empty values are omitted from API requests. However, any non-pointer,
  1059. // non-interface field appearing in ForceSendFields will be sent to the
  1060. // server regardless of whether the field is empty or not. This may be
  1061. // used to include empty fields in Patch requests.
  1062. ForceSendFields []string `json:"-"`
  1063. // NullFields is a list of field names (e.g. "YoutubeActorInfo") to
  1064. // include in API requests with the JSON null value. By default, fields
  1065. // with empty values are omitted from API requests. However, any field
  1066. // with an empty value appearing in NullFields will be sent to the
  1067. // server as null. It is an error if a field in this list has a
  1068. // non-empty value. This may be used to include null fields in Patch
  1069. // requests.
  1070. NullFields []string `json:"-"`
  1071. }
  1072. func (s *CommentActorClientSpecificActorInfo) MarshalJSON() ([]byte, error) {
  1073. type NoMethod CommentActorClientSpecificActorInfo
  1074. raw := NoMethod(*s)
  1075. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1076. }
  1077. // CommentActorClientSpecificActorInfoYoutubeActorInfo: Actor info
  1078. // specific to YouTube clients.
  1079. type CommentActorClientSpecificActorInfoYoutubeActorInfo struct {
  1080. // ChannelId: ID of the YouTube channel owned by the Actor.
  1081. ChannelId string `json:"channelId,omitempty"`
  1082. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  1083. // unconditionally include in API requests. By default, fields with
  1084. // empty values are omitted from API requests. However, any non-pointer,
  1085. // non-interface field appearing in ForceSendFields will be sent to the
  1086. // server regardless of whether the field is empty or not. This may be
  1087. // used to include empty fields in Patch requests.
  1088. ForceSendFields []string `json:"-"`
  1089. // NullFields is a list of field names (e.g. "ChannelId") to include in
  1090. // API requests with the JSON null value. By default, fields with empty
  1091. // values are omitted from API requests. However, any field with an
  1092. // empty value appearing in NullFields will be sent to the server as
  1093. // null. It is an error if a field in this list has a non-empty value.
  1094. // This may be used to include null fields in Patch requests.
  1095. NullFields []string `json:"-"`
  1096. }
  1097. func (s *CommentActorClientSpecificActorInfoYoutubeActorInfo) MarshalJSON() ([]byte, error) {
  1098. type NoMethod CommentActorClientSpecificActorInfoYoutubeActorInfo
  1099. raw := NoMethod(*s)
  1100. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1101. }
  1102. // CommentActorImage: The image representation of this actor.
  1103. type CommentActorImage struct {
  1104. // Url: The URL of the actor's profile photo. To resize the image and
  1105. // crop it to a square, append the query string ?sz=x, where x is the
  1106. // dimension in pixels of each side.
  1107. Url string `json:"url,omitempty"`
  1108. // ForceSendFields is a list of field names (e.g. "Url") to
  1109. // unconditionally include in API requests. By default, fields with
  1110. // empty values are omitted from API requests. However, any non-pointer,
  1111. // non-interface field appearing in ForceSendFields will be sent to the
  1112. // server regardless of whether the field is empty or not. This may be
  1113. // used to include empty fields in Patch requests.
  1114. ForceSendFields []string `json:"-"`
  1115. // NullFields is a list of field names (e.g. "Url") to include in API
  1116. // requests with the JSON null value. By default, fields with empty
  1117. // values are omitted from API requests. However, any field with an
  1118. // empty value appearing in NullFields will be sent to the server as
  1119. // null. It is an error if a field in this list has a non-empty value.
  1120. // This may be used to include null fields in Patch requests.
  1121. NullFields []string `json:"-"`
  1122. }
  1123. func (s *CommentActorImage) MarshalJSON() ([]byte, error) {
  1124. type NoMethod CommentActorImage
  1125. raw := NoMethod(*s)
  1126. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1127. }
  1128. // CommentActorVerification: Verification status of actor.
  1129. type CommentActorVerification struct {
  1130. // AdHocVerified: Verification for one-time or manual processes.
  1131. AdHocVerified string `json:"adHocVerified,omitempty"`
  1132. // ForceSendFields is a list of field names (e.g. "AdHocVerified") to
  1133. // unconditionally include in API requests. By default, fields with
  1134. // empty values are omitted from API requests. However, any non-pointer,
  1135. // non-interface field appearing in ForceSendFields will be sent to the
  1136. // server regardless of whether the field is empty or not. This may be
  1137. // used to include empty fields in Patch requests.
  1138. ForceSendFields []string `json:"-"`
  1139. // NullFields is a list of field names (e.g. "AdHocVerified") to include
  1140. // in API requests with the JSON null value. By default, fields with
  1141. // empty values are omitted from API requests. However, any field with
  1142. // an empty value appearing in NullFields will be sent to the server as
  1143. // null. It is an error if a field in this list has a non-empty value.
  1144. // This may be used to include null fields in Patch requests.
  1145. NullFields []string `json:"-"`
  1146. }
  1147. func (s *CommentActorVerification) MarshalJSON() ([]byte, error) {
  1148. type NoMethod CommentActorVerification
  1149. raw := NoMethod(*s)
  1150. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1151. }
  1152. type CommentInReplyTo struct {
  1153. // Id: The ID of the activity.
  1154. Id string `json:"id,omitempty"`
  1155. // Url: The URL of the activity.
  1156. Url string `json:"url,omitempty"`
  1157. // ForceSendFields is a list of field names (e.g. "Id") to
  1158. // unconditionally include in API requests. By default, fields with
  1159. // empty values are omitted from API requests. However, any non-pointer,
  1160. // non-interface field appearing in ForceSendFields will be sent to the
  1161. // server regardless of whether the field is empty or not. This may be
  1162. // used to include empty fields in Patch requests.
  1163. ForceSendFields []string `json:"-"`
  1164. // NullFields is a list of field names (e.g. "Id") to include in API
  1165. // requests with the JSON null value. By default, fields with empty
  1166. // values are omitted from API requests. However, any field with an
  1167. // empty value appearing in NullFields will be sent to the server as
  1168. // null. It is an error if a field in this list has a non-empty value.
  1169. // This may be used to include null fields in Patch requests.
  1170. NullFields []string `json:"-"`
  1171. }
  1172. func (s *CommentInReplyTo) MarshalJSON() ([]byte, error) {
  1173. type NoMethod CommentInReplyTo
  1174. raw := NoMethod(*s)
  1175. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1176. }
  1177. // CommentObject: The object of this comment.
  1178. type CommentObject struct {
  1179. // Content: The HTML-formatted content, suitable for display.
  1180. Content string `json:"content,omitempty"`
  1181. // ObjectType: The object type of this comment. Possible values are:
  1182. // - "comment" - A comment in reply to an activity.
  1183. ObjectType string `json:"objectType,omitempty"`
  1184. // OriginalContent: The content (text) as provided by the author, stored
  1185. // without any HTML formatting. When creating or updating a comment,
  1186. // this value must be supplied as plain text in the request.
  1187. OriginalContent string `json:"originalContent,omitempty"`
  1188. // ForceSendFields is a list of field names (e.g. "Content") to
  1189. // unconditionally include in API requests. By default, fields with
  1190. // empty values are omitted from API requests. However, any non-pointer,
  1191. // non-interface field appearing in ForceSendFields will be sent to the
  1192. // server regardless of whether the field is empty or not. This may be
  1193. // used to include empty fields in Patch requests.
  1194. ForceSendFields []string `json:"-"`
  1195. // NullFields is a list of field names (e.g. "Content") to include in
  1196. // API requests with the JSON null value. By default, fields with empty
  1197. // values are omitted from API requests. However, any field with an
  1198. // empty value appearing in NullFields will be sent to the server as
  1199. // null. It is an error if a field in this list has a non-empty value.
  1200. // This may be used to include null fields in Patch requests.
  1201. NullFields []string `json:"-"`
  1202. }
  1203. func (s *CommentObject) MarshalJSON() ([]byte, error) {
  1204. type NoMethod CommentObject
  1205. raw := NoMethod(*s)
  1206. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1207. }
  1208. // CommentPlusoners: People who +1'd this comment.
  1209. type CommentPlusoners struct {
  1210. // TotalItems: Total number of people who +1'd this comment.
  1211. TotalItems int64 `json:"totalItems,omitempty"`
  1212. // ForceSendFields is a list of field names (e.g. "TotalItems") to
  1213. // unconditionally include in API requests. By default, fields with
  1214. // empty values are omitted from API requests. However, any non-pointer,
  1215. // non-interface field appearing in ForceSendFields will be sent to the
  1216. // server regardless of whether the field is empty or not. This may be
  1217. // used to include empty fields in Patch requests.
  1218. ForceSendFields []string `json:"-"`
  1219. // NullFields is a list of field names (e.g. "TotalItems") to include in
  1220. // API requests with the JSON null value. By default, fields with empty
  1221. // values are omitted from API requests. However, any field with an
  1222. // empty value appearing in NullFields will be sent to the server as
  1223. // null. It is an error if a field in this list has a non-empty value.
  1224. // This may be used to include null fields in Patch requests.
  1225. NullFields []string `json:"-"`
  1226. }
  1227. func (s *CommentPlusoners) MarshalJSON() ([]byte, error) {
  1228. type NoMethod CommentPlusoners
  1229. raw := NoMethod(*s)
  1230. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1231. }
  1232. type CommentFeed struct {
  1233. // Etag: ETag of this response for caching purposes.
  1234. Etag string `json:"etag,omitempty"`
  1235. // Id: The ID of this collection of comments.
  1236. Id string `json:"id,omitempty"`
  1237. // Items: The comments in this page of results.
  1238. Items []*Comment `json:"items,omitempty"`
  1239. // Kind: Identifies this resource as a collection of comments. Value:
  1240. // "plus#commentFeed".
  1241. Kind string `json:"kind,omitempty"`
  1242. // NextLink: Link to the next page of activities.
  1243. NextLink string `json:"nextLink,omitempty"`
  1244. // NextPageToken: The continuation token, which is used to page through
  1245. // large result sets. Provide this value in a subsequent request to
  1246. // return the next page of results.
  1247. NextPageToken string `json:"nextPageToken,omitempty"`
  1248. // Title: The title of this collection of comments.
  1249. Title string `json:"title,omitempty"`
  1250. // Updated: The time at which this collection of comments was last
  1251. // updated. Formatted as an RFC 3339 timestamp.
  1252. Updated string `json:"updated,omitempty"`
  1253. // ServerResponse contains the HTTP response code and headers from the
  1254. // server.
  1255. googleapi.ServerResponse `json:"-"`
  1256. // ForceSendFields is a list of field names (e.g. "Etag") to
  1257. // unconditionally include in API requests. By default, fields with
  1258. // empty values are omitted from API requests. However, any non-pointer,
  1259. // non-interface field appearing in ForceSendFields will be sent to the
  1260. // server regardless of whether the field is empty or not. This may be
  1261. // used to include empty fields in Patch requests.
  1262. ForceSendFields []string `json:"-"`
  1263. // NullFields is a list of field names (e.g. "Etag") to include in API
  1264. // requests with the JSON null value. By default, fields with empty
  1265. // values are omitted from API requests. However, any field with an
  1266. // empty value appearing in NullFields will be sent to the server as
  1267. // null. It is an error if a field in this list has a non-empty value.
  1268. // This may be used to include null fields in Patch requests.
  1269. NullFields []string `json:"-"`
  1270. }
  1271. func (s *CommentFeed) MarshalJSON() ([]byte, error) {
  1272. type NoMethod CommentFeed
  1273. raw := NoMethod(*s)
  1274. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1275. }
  1276. type PeopleFeed struct {
  1277. // Etag: ETag of this response for caching purposes.
  1278. Etag string `json:"etag,omitempty"`
  1279. // Items: The people in this page of results. Each item includes the id,
  1280. // displayName, image, and url for the person. To retrieve additional
  1281. // profile data, see the people.get method.
  1282. Items []*Person `json:"items,omitempty"`
  1283. // Kind: Identifies this resource as a collection of people. Value:
  1284. // "plus#peopleFeed".
  1285. Kind string `json:"kind,omitempty"`
  1286. // NextPageToken: The continuation token, which is used to page through
  1287. // large result sets. Provide this value in a subsequent request to
  1288. // return the next page of results.
  1289. NextPageToken string `json:"nextPageToken,omitempty"`
  1290. // SelfLink: Link to this resource.
  1291. SelfLink string `json:"selfLink,omitempty"`
  1292. // Title: The title of this collection of people.
  1293. Title string `json:"title,omitempty"`
  1294. // TotalItems: The total number of people available in this list. The
  1295. // number of people in a response might be smaller due to paging. This
  1296. // might not be set for all collections.
  1297. TotalItems int64 `json:"totalItems,omitempty"`
  1298. // ServerResponse contains the HTTP response code and headers from the
  1299. // server.
  1300. googleapi.ServerResponse `json:"-"`
  1301. // ForceSendFields is a list of field names (e.g. "Etag") to
  1302. // unconditionally include in API requests. By default, fields with
  1303. // empty values are omitted from API requests. However, any non-pointer,
  1304. // non-interface field appearing in ForceSendFields will be sent to the
  1305. // server regardless of whether the field is empty or not. This may be
  1306. // used to include empty fields in Patch requests.
  1307. ForceSendFields []string `json:"-"`
  1308. // NullFields is a list of field names (e.g. "Etag") to include in API
  1309. // requests with the JSON null value. By default, fields with empty
  1310. // values are omitted from API requests. However, any field with an
  1311. // empty value appearing in NullFields will be sent to the server as
  1312. // null. It is an error if a field in this list has a non-empty value.
  1313. // This may be used to include null fields in Patch requests.
  1314. NullFields []string `json:"-"`
  1315. }
  1316. func (s *PeopleFeed) MarshalJSON() ([]byte, error) {
  1317. type NoMethod PeopleFeed
  1318. raw := NoMethod(*s)
  1319. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1320. }
  1321. type Person struct {
  1322. // AboutMe: A short biography for this person.
  1323. AboutMe string `json:"aboutMe,omitempty"`
  1324. // AgeRange: The age range of the person. Valid ranges are 17 or
  1325. // younger, 18 to 20, and 21 or older. Age is determined from the user's
  1326. // birthday using Western age reckoning.
  1327. AgeRange *PersonAgeRange `json:"ageRange,omitempty"`
  1328. // Birthday: The person's date of birth, represented as YYYY-MM-DD.
  1329. Birthday string `json:"birthday,omitempty"`
  1330. // BraggingRights: The "bragging rights" line of this person.
  1331. BraggingRights string `json:"braggingRights,omitempty"`
  1332. // CircledByCount: For followers who are visible, the number of people
  1333. // who have added this person or page to a circle.
  1334. CircledByCount int64 `json:"circledByCount,omitempty"`
  1335. // Cover: The cover photo content.
  1336. Cover *PersonCover `json:"cover,omitempty"`
  1337. // CurrentLocation: (this field is not currently used)
  1338. CurrentLocation string `json:"currentLocation,omitempty"`
  1339. // DisplayName: The name of this person, which is suitable for display.
  1340. DisplayName string `json:"displayName,omitempty"`
  1341. // Domain: The hosted domain name for the user's Google Apps account.
  1342. // For instance, example.com. The plus.profile.emails.read or email
  1343. // scope is needed to get this domain name.
  1344. Domain string `json:"domain,omitempty"`
  1345. // Emails: A list of email addresses that this person has, including
  1346. // their Google account email address, and the public verified email
  1347. // addresses on their Google+ profile. The plus.profile.emails.read
  1348. // scope is needed to retrieve these email addresses, or the email scope
  1349. // can be used to retrieve just the Google account email address.
  1350. Emails []*PersonEmails `json:"emails,omitempty"`
  1351. // Etag: ETag of this response for caching purposes.
  1352. Etag string `json:"etag,omitempty"`
  1353. // Gender: The person's gender. Possible values include, but are not
  1354. // limited to, the following values:
  1355. // - "male" - Male gender.
  1356. // - "female" - Female gender.
  1357. // - "other" - Other.
  1358. Gender string `json:"gender,omitempty"`
  1359. // Id: The ID of this person.
  1360. Id string `json:"id,omitempty"`
  1361. // Image: The representation of the person's profile photo.
  1362. Image *PersonImage `json:"image,omitempty"`
  1363. // IsPlusUser: Whether this user has signed up for Google+.
  1364. IsPlusUser bool `json:"isPlusUser,omitempty"`
  1365. // Kind: Identifies this resource as a person. Value: "plus#person".
  1366. Kind string `json:"kind,omitempty"`
  1367. // Language: The user's preferred language for rendering.
  1368. Language string `json:"language,omitempty"`
  1369. // Name: An object representation of the individual components of a
  1370. // person's name.
  1371. Name *PersonName `json:"name,omitempty"`
  1372. // Nickname: The nickname of this person.
  1373. Nickname string `json:"nickname,omitempty"`
  1374. // ObjectType: Type of person within Google+. Possible values include,
  1375. // but are not limited to, the following values:
  1376. // - "person" - represents an actual person.
  1377. // - "page" - represents a page.
  1378. ObjectType string `json:"objectType,omitempty"`
  1379. // Occupation: The occupation of this person.
  1380. Occupation string `json:"occupation,omitempty"`
  1381. // Organizations: A list of current or past organizations with which
  1382. // this person is associated.
  1383. Organizations []*PersonOrganizations `json:"organizations,omitempty"`
  1384. // PlacesLived: A list of places where this person has lived.
  1385. PlacesLived []*PersonPlacesLived `json:"placesLived,omitempty"`
  1386. // PlusOneCount: If a Google+ Page, the number of people who have +1'd
  1387. // this page.
  1388. PlusOneCount int64 `json:"plusOneCount,omitempty"`
  1389. // RelationshipStatus: The person's relationship status. Possible values
  1390. // include, but are not limited to, the following values:
  1391. // - "single" - Person is single.
  1392. // - "in_a_relationship" - Person is in a relationship.
  1393. // - "engaged" - Person is engaged.
  1394. // - "married" - Person is married.
  1395. // - "its_complicated" - The relationship is complicated.
  1396. // - "open_relationship" - Person is in an open relationship.
  1397. // - "widowed" - Person is widowed.
  1398. // - "in_domestic_partnership" - Person is in a domestic partnership.
  1399. // - "in_civil_union" - Person is in a civil union.
  1400. RelationshipStatus string `json:"relationshipStatus,omitempty"`
  1401. // Skills: The person's skills.
  1402. Skills string `json:"skills,omitempty"`
  1403. // Tagline: The brief description (tagline) of this person.
  1404. Tagline string `json:"tagline,omitempty"`
  1405. // Url: The URL of this person's profile.
  1406. Url string `json:"url,omitempty"`
  1407. // Urls: A list of URLs for this person.
  1408. Urls []*PersonUrls `json:"urls,omitempty"`
  1409. // Verified: Whether the person or Google+ Page has been verified.
  1410. Verified bool `json:"verified,omitempty"`
  1411. // ServerResponse contains the HTTP response code and headers from the
  1412. // server.
  1413. googleapi.ServerResponse `json:"-"`
  1414. // ForceSendFields is a list of field names (e.g. "AboutMe") to
  1415. // unconditionally include in API requests. By default, fields with
  1416. // empty values are omitted from API requests. However, any non-pointer,
  1417. // non-interface field appearing in ForceSendFields will be sent to the
  1418. // server regardless of whether the field is empty or not. This may be
  1419. // used to include empty fields in Patch requests.
  1420. ForceSendFields []string `json:"-"`
  1421. // NullFields is a list of field names (e.g. "AboutMe") to include in
  1422. // API requests with the JSON null value. By default, fields with empty
  1423. // values are omitted from API requests. However, any field with an
  1424. // empty value appearing in NullFields will be sent to the server as
  1425. // null. It is an error if a field in this list has a non-empty value.
  1426. // This may be used to include null fields in Patch requests.
  1427. NullFields []string `json:"-"`
  1428. }
  1429. func (s *Person) MarshalJSON() ([]byte, error) {
  1430. type NoMethod Person
  1431. raw := NoMethod(*s)
  1432. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1433. }
  1434. // PersonAgeRange: The age range of the person. Valid ranges are 17 or
  1435. // younger, 18 to 20, and 21 or older. Age is determined from the user's
  1436. // birthday using Western age reckoning.
  1437. type PersonAgeRange struct {
  1438. // Max: The age range's upper bound, if any. Possible values include,
  1439. // but are not limited to, the following:
  1440. // - "17" - for age 17
  1441. // - "20" - for age 20
  1442. Max int64 `json:"max,omitempty"`
  1443. // Min: The age range's lower bound, if any. Possible values include,
  1444. // but are not limited to, the following:
  1445. // - "21" - for age 21
  1446. // - "18" - for age 18
  1447. Min int64 `json:"min,omitempty"`
  1448. // ForceSendFields is a list of field names (e.g. "Max") to
  1449. // unconditionally include in API requests. By default, fields with
  1450. // empty values are omitted from API requests. However, any non-pointer,
  1451. // non-interface field appearing in ForceSendFields will be sent to the
  1452. // server regardless of whether the field is empty or not. This may be
  1453. // used to include empty fields in Patch requests.
  1454. ForceSendFields []string `json:"-"`
  1455. // NullFields is a list of field names (e.g. "Max") to include in API
  1456. // requests with the JSON null value. By default, fields with empty
  1457. // values are omitted from API requests. However, any field with an
  1458. // empty value appearing in NullFields will be sent to the server as
  1459. // null. It is an error if a field in this list has a non-empty value.
  1460. // This may be used to include null fields in Patch requests.
  1461. NullFields []string `json:"-"`
  1462. }
  1463. func (s *PersonAgeRange) MarshalJSON() ([]byte, error) {
  1464. type NoMethod PersonAgeRange
  1465. raw := NoMethod(*s)
  1466. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1467. }
  1468. // PersonCover: The cover photo content.
  1469. type PersonCover struct {
  1470. // CoverInfo: Extra information about the cover photo.
  1471. CoverInfo *PersonCoverCoverInfo `json:"coverInfo,omitempty"`
  1472. // CoverPhoto: The person's primary cover image.
  1473. CoverPhoto *PersonCoverCoverPhoto `json:"coverPhoto,omitempty"`
  1474. // Layout: The layout of the cover art. Possible values include, but are
  1475. // not limited to, the following values:
  1476. // - "banner" - One large image banner.
  1477. Layout string `json:"layout,omitempty"`
  1478. // ForceSendFields is a list of field names (e.g. "CoverInfo") to
  1479. // unconditionally include in API requests. By default, fields with
  1480. // empty values are omitted from API requests. However, any non-pointer,
  1481. // non-interface field appearing in ForceSendFields will be sent to the
  1482. // server regardless of whether the field is empty or not. This may be
  1483. // used to include empty fields in Patch requests.
  1484. ForceSendFields []string `json:"-"`
  1485. // NullFields is a list of field names (e.g. "CoverInfo") to include in
  1486. // API requests with the JSON null value. By default, fields with empty
  1487. // values are omitted from API requests. However, any field with an
  1488. // empty value appearing in NullFields will be sent to the server as
  1489. // null. It is an error if a field in this list has a non-empty value.
  1490. // This may be used to include null fields in Patch requests.
  1491. NullFields []string `json:"-"`
  1492. }
  1493. func (s *PersonCover) MarshalJSON() ([]byte, error) {
  1494. type NoMethod PersonCover
  1495. raw := NoMethod(*s)
  1496. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1497. }
  1498. // PersonCoverCoverInfo: Extra information about the cover photo.
  1499. type PersonCoverCoverInfo struct {
  1500. // LeftImageOffset: The difference between the left position of the
  1501. // cover image and the actual displayed cover image. Only valid for
  1502. // banner layout.
  1503. LeftImageOffset int64 `json:"leftImageOffset,omitempty"`
  1504. // TopImageOffset: The difference between the top position of the cover
  1505. // image and the actual displayed cover image. Only valid for banner
  1506. // layout.
  1507. TopImageOffset int64 `json:"topImageOffset,omitempty"`
  1508. // ForceSendFields is a list of field names (e.g. "LeftImageOffset") to
  1509. // unconditionally include in API requests. By default, fields with
  1510. // empty values are omitted from API requests. However, any non-pointer,
  1511. // non-interface field appearing in ForceSendFields will be sent to the
  1512. // server regardless of whether the field is empty or not. This may be
  1513. // used to include empty fields in Patch requests.
  1514. ForceSendFields []string `json:"-"`
  1515. // NullFields is a list of field names (e.g. "LeftImageOffset") to
  1516. // include in API requests with the JSON null value. By default, fields
  1517. // with empty values are omitted from API requests. However, any field
  1518. // with an empty value appearing in NullFields will be sent to the
  1519. // server as null. It is an error if a field in this list has a
  1520. // non-empty value. This may be used to include null fields in Patch
  1521. // requests.
  1522. NullFields []string `json:"-"`
  1523. }
  1524. func (s *PersonCoverCoverInfo) MarshalJSON() ([]byte, error) {
  1525. type NoMethod PersonCoverCoverInfo
  1526. raw := NoMethod(*s)
  1527. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1528. }
  1529. // PersonCoverCoverPhoto: The person's primary cover image.
  1530. type PersonCoverCoverPhoto struct {
  1531. // Height: The height of the image.
  1532. Height int64 `json:"height,omitempty"`
  1533. // Url: The URL of the image.
  1534. Url string `json:"url,omitempty"`
  1535. // Width: The width of the image.
  1536. Width int64 `json:"width,omitempty"`
  1537. // ForceSendFields is a list of field names (e.g. "Height") to
  1538. // unconditionally include in API requests. By default, fields with
  1539. // empty values are omitted from API requests. However, any non-pointer,
  1540. // non-interface field appearing in ForceSendFields will be sent to the
  1541. // server regardless of whether the field is empty or not. This may be
  1542. // used to include empty fields in Patch requests.
  1543. ForceSendFields []string `json:"-"`
  1544. // NullFields is a list of field names (e.g. "Height") to include in API
  1545. // requests with the JSON null value. By default, fields with empty
  1546. // values are omitted from API requests. However, any field with an
  1547. // empty value appearing in NullFields will be sent to the server as
  1548. // null. It is an error if a field in this list has a non-empty value.
  1549. // This may be used to include null fields in Patch requests.
  1550. NullFields []string `json:"-"`
  1551. }
  1552. func (s *PersonCoverCoverPhoto) MarshalJSON() ([]byte, error) {
  1553. type NoMethod PersonCoverCoverPhoto
  1554. raw := NoMethod(*s)
  1555. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1556. }
  1557. type PersonEmails struct {
  1558. // Type: The type of address. Possible values include, but are not
  1559. // limited to, the following values:
  1560. // - "account" - Google account email address.
  1561. // - "home" - Home email address.
  1562. // - "work" - Work email address.
  1563. // - "other" - Other.
  1564. Type string `json:"type,omitempty"`
  1565. // Value: The email address.
  1566. Value string `json:"value,omitempty"`
  1567. // ForceSendFields is a list of field names (e.g. "Type") to
  1568. // unconditionally include in API requests. By default, fields with
  1569. // empty values are omitted from API requests. However, any non-pointer,
  1570. // non-interface field appearing in ForceSendFields will be sent to the
  1571. // server regardless of whether the field is empty or not. This may be
  1572. // used to include empty fields in Patch requests.
  1573. ForceSendFields []string `json:"-"`
  1574. // NullFields is a list of field names (e.g. "Type") to include in API
  1575. // requests with the JSON null value. By default, fields with empty
  1576. // values are omitted from API requests. However, any field with an
  1577. // empty value appearing in NullFields will be sent to the server as
  1578. // null. It is an error if a field in this list has a non-empty value.
  1579. // This may be used to include null fields in Patch requests.
  1580. NullFields []string `json:"-"`
  1581. }
  1582. func (s *PersonEmails) MarshalJSON() ([]byte, error) {
  1583. type NoMethod PersonEmails
  1584. raw := NoMethod(*s)
  1585. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1586. }
  1587. // PersonImage: The representation of the person's profile photo.
  1588. type PersonImage struct {
  1589. // IsDefault: Whether the person's profile photo is the default one
  1590. IsDefault bool `json:"isDefault,omitempty"`
  1591. // Url: The URL of the person's profile photo. To resize the image and
  1592. // crop it to a square, append the query string ?sz=x, where x is the
  1593. // dimension in pixels of each side.
  1594. Url string `json:"url,omitempty"`
  1595. // ForceSendFields is a list of field names (e.g. "IsDefault") to
  1596. // unconditionally include in API requests. By default, fields with
  1597. // empty values are omitted from API requests. However, any non-pointer,
  1598. // non-interface field appearing in ForceSendFields will be sent to the
  1599. // server regardless of whether the field is empty or not. This may be
  1600. // used to include empty fields in Patch requests.
  1601. ForceSendFields []string `json:"-"`
  1602. // NullFields is a list of field names (e.g. "IsDefault") to include in
  1603. // API requests with the JSON null value. By default, fields with empty
  1604. // values are omitted from API requests. However, any field with an
  1605. // empty value appearing in NullFields will be sent to the server as
  1606. // null. It is an error if a field in this list has a non-empty value.
  1607. // This may be used to include null fields in Patch requests.
  1608. NullFields []string `json:"-"`
  1609. }
  1610. func (s *PersonImage) MarshalJSON() ([]byte, error) {
  1611. type NoMethod PersonImage
  1612. raw := NoMethod(*s)
  1613. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1614. }
  1615. // PersonName: An object representation of the individual components of
  1616. // a person's name.
  1617. type PersonName struct {
  1618. // FamilyName: The family name (last name) of this person.
  1619. FamilyName string `json:"familyName,omitempty"`
  1620. // Formatted: The full name of this person, including middle names,
  1621. // suffixes, etc.
  1622. Formatted string `json:"formatted,omitempty"`
  1623. // GivenName: The given name (first name) of this person.
  1624. GivenName string `json:"givenName,omitempty"`
  1625. // HonorificPrefix: The honorific prefixes (such as "Dr." or "Mrs.") for
  1626. // this person.
  1627. HonorificPrefix string `json:"honorificPrefix,omitempty"`
  1628. // HonorificSuffix: The honorific suffixes (such as "Jr.") for this
  1629. // person.
  1630. HonorificSuffix string `json:"honorificSuffix,omitempty"`
  1631. // MiddleName: The middle name of this person.
  1632. MiddleName string `json:"middleName,omitempty"`
  1633. // ForceSendFields is a list of field names (e.g. "FamilyName") to
  1634. // unconditionally include in API requests. By default, fields with
  1635. // empty values are omitted from API requests. However, any non-pointer,
  1636. // non-interface field appearing in ForceSendFields will be sent to the
  1637. // server regardless of whether the field is empty or not. This may be
  1638. // used to include empty fields in Patch requests.
  1639. ForceSendFields []string `json:"-"`
  1640. // NullFields is a list of field names (e.g. "FamilyName") to include in
  1641. // API requests with the JSON null value. By default, fields with empty
  1642. // values are omitted from API requests. However, any field with an
  1643. // empty value appearing in NullFields will be sent to the server as
  1644. // null. It is an error if a field in this list has a non-empty value.
  1645. // This may be used to include null fields in Patch requests.
  1646. NullFields []string `json:"-"`
  1647. }
  1648. func (s *PersonName) MarshalJSON() ([]byte, error) {
  1649. type NoMethod PersonName
  1650. raw := NoMethod(*s)
  1651. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1652. }
  1653. type PersonOrganizations struct {
  1654. // Department: The department within the organization. Deprecated.
  1655. Department string `json:"department,omitempty"`
  1656. // Description: A short description of the person's role in this
  1657. // organization. Deprecated.
  1658. Description string `json:"description,omitempty"`
  1659. // EndDate: The date that the person left this organization.
  1660. EndDate string `json:"endDate,omitempty"`
  1661. // Location: The location of this organization. Deprecated.
  1662. Location string `json:"location,omitempty"`
  1663. // Name: The name of the organization.
  1664. Name string `json:"name,omitempty"`
  1665. // Primary: If "true", indicates this organization is the person's
  1666. // primary one, which is typically interpreted as the current one.
  1667. Primary bool `json:"primary,omitempty"`
  1668. // StartDate: The date that the person joined this organization.
  1669. StartDate string `json:"startDate,omitempty"`
  1670. // Title: The person's job title or role within the organization.
  1671. Title string `json:"title,omitempty"`
  1672. // Type: The type of organization. Possible values include, but are not
  1673. // limited to, the following values:
  1674. // - "work" - Work.
  1675. // - "school" - School.
  1676. Type string `json:"type,omitempty"`
  1677. // ForceSendFields is a list of field names (e.g. "Department") to
  1678. // unconditionally include in API requests. By default, fields with
  1679. // empty values are omitted from API requests. However, any non-pointer,
  1680. // non-interface field appearing in ForceSendFields will be sent to the
  1681. // server regardless of whether the field is empty or not. This may be
  1682. // used to include empty fields in Patch requests.
  1683. ForceSendFields []string `json:"-"`
  1684. // NullFields is a list of field names (e.g. "Department") to include in
  1685. // API requests with the JSON null value. By default, fields with empty
  1686. // values are omitted from API requests. However, any field with an
  1687. // empty value appearing in NullFields will be sent to the server as
  1688. // null. It is an error if a field in this list has a non-empty value.
  1689. // This may be used to include null fields in Patch requests.
  1690. NullFields []string `json:"-"`
  1691. }
  1692. func (s *PersonOrganizations) MarshalJSON() ([]byte, error) {
  1693. type NoMethod PersonOrganizations
  1694. raw := NoMethod(*s)
  1695. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1696. }
  1697. type PersonPlacesLived struct {
  1698. // Primary: If "true", this place of residence is this person's primary
  1699. // residence.
  1700. Primary bool `json:"primary,omitempty"`
  1701. // Value: A place where this person has lived. For example: "Seattle,
  1702. // WA", "Near Toronto".
  1703. Value string `json:"value,omitempty"`
  1704. // ForceSendFields is a list of field names (e.g. "Primary") to
  1705. // unconditionally include in API requests. By default, fields with
  1706. // empty values are omitted from API requests. However, any non-pointer,
  1707. // non-interface field appearing in ForceSendFields will be sent to the
  1708. // server regardless of whether the field is empty or not. This may be
  1709. // used to include empty fields in Patch requests.
  1710. ForceSendFields []string `json:"-"`
  1711. // NullFields is a list of field names (e.g. "Primary") to include in
  1712. // API requests with the JSON null value. By default, fields with empty
  1713. // values are omitted from API requests. However, any field with an
  1714. // empty value appearing in NullFields will be sent to the server as
  1715. // null. It is an error if a field in this list has a non-empty value.
  1716. // This may be used to include null fields in Patch requests.
  1717. NullFields []string `json:"-"`
  1718. }
  1719. func (s *PersonPlacesLived) MarshalJSON() ([]byte, error) {
  1720. type NoMethod PersonPlacesLived
  1721. raw := NoMethod(*s)
  1722. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1723. }
  1724. type PersonUrls struct {
  1725. // Label: The label of the URL.
  1726. Label string `json:"label,omitempty"`
  1727. // Type: The type of URL. Possible values include, but are not limited
  1728. // to, the following values:
  1729. // - "otherProfile" - URL for another profile.
  1730. // - "contributor" - URL to a site for which this person is a
  1731. // contributor.
  1732. // - "website" - URL for this Google+ Page's primary website.
  1733. // - "other" - Other URL.
  1734. Type string `json:"type,omitempty"`
  1735. // Value: The URL value.
  1736. Value string `json:"value,omitempty"`
  1737. // ForceSendFields is a list of field names (e.g. "Label") to
  1738. // unconditionally include in API requests. By default, fields with
  1739. // empty values are omitted from API requests. However, any non-pointer,
  1740. // non-interface field appearing in ForceSendFields will be sent to the
  1741. // server regardless of whether the field is empty or not. This may be
  1742. // used to include empty fields in Patch requests.
  1743. ForceSendFields []string `json:"-"`
  1744. // NullFields is a list of field names (e.g. "Label") to include in API
  1745. // requests with the JSON null value. By default, fields with empty
  1746. // values are omitted from API requests. However, any field with an
  1747. // empty value appearing in NullFields will be sent to the server as
  1748. // null. It is an error if a field in this list has a non-empty value.
  1749. // This may be used to include null fields in Patch requests.
  1750. NullFields []string `json:"-"`
  1751. }
  1752. func (s *PersonUrls) MarshalJSON() ([]byte, error) {
  1753. type NoMethod PersonUrls
  1754. raw := NoMethod(*s)
  1755. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1756. }
  1757. type Place struct {
  1758. // Address: The physical address of the place.
  1759. Address *PlaceAddress `json:"address,omitempty"`
  1760. // DisplayName: The display name of the place.
  1761. DisplayName string `json:"displayName,omitempty"`
  1762. // Id: The id of the place.
  1763. Id string `json:"id,omitempty"`
  1764. // Kind: Identifies this resource as a place. Value: "plus#place".
  1765. Kind string `json:"kind,omitempty"`
  1766. // Position: The position of the place.
  1767. Position *PlacePosition `json:"position,omitempty"`
  1768. // ForceSendFields is a list of field names (e.g. "Address") to
  1769. // unconditionally include in API requests. By default, fields with
  1770. // empty values are omitted from API requests. However, any non-pointer,
  1771. // non-interface field appearing in ForceSendFields will be sent to the
  1772. // server regardless of whether the field is empty or not. This may be
  1773. // used to include empty fields in Patch requests.
  1774. ForceSendFields []string `json:"-"`
  1775. // NullFields is a list of field names (e.g. "Address") to include in
  1776. // API requests with the JSON null value. By default, fields with empty
  1777. // values are omitted from API requests. However, any field with an
  1778. // empty value appearing in NullFields will be sent to the server as
  1779. // null. It is an error if a field in this list has a non-empty value.
  1780. // This may be used to include null fields in Patch requests.
  1781. NullFields []string `json:"-"`
  1782. }
  1783. func (s *Place) MarshalJSON() ([]byte, error) {
  1784. type NoMethod Place
  1785. raw := NoMethod(*s)
  1786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1787. }
  1788. // PlaceAddress: The physical address of the place.
  1789. type PlaceAddress struct {
  1790. // Formatted: The formatted address for display.
  1791. Formatted string `json:"formatted,omitempty"`
  1792. // ForceSendFields is a list of field names (e.g. "Formatted") to
  1793. // unconditionally include in API requests. By default, fields with
  1794. // empty values are omitted from API requests. However, any non-pointer,
  1795. // non-interface field appearing in ForceSendFields will be sent to the
  1796. // server regardless of whether the field is empty or not. This may be
  1797. // used to include empty fields in Patch requests.
  1798. ForceSendFields []string `json:"-"`
  1799. // NullFields is a list of field names (e.g. "Formatted") to include in
  1800. // API requests with the JSON null value. By default, fields with empty
  1801. // values are omitted from API requests. However, any field with an
  1802. // empty value appearing in NullFields will be sent to the server as
  1803. // null. It is an error if a field in this list has a non-empty value.
  1804. // This may be used to include null fields in Patch requests.
  1805. NullFields []string `json:"-"`
  1806. }
  1807. func (s *PlaceAddress) MarshalJSON() ([]byte, error) {
  1808. type NoMethod PlaceAddress
  1809. raw := NoMethod(*s)
  1810. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1811. }
  1812. // PlacePosition: The position of the place.
  1813. type PlacePosition struct {
  1814. // Latitude: The latitude of this position.
  1815. Latitude float64 `json:"latitude,omitempty"`
  1816. // Longitude: The longitude of this position.
  1817. Longitude float64 `json:"longitude,omitempty"`
  1818. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1819. // unconditionally include in API requests. By default, fields with
  1820. // empty values are omitted from API requests. However, any non-pointer,
  1821. // non-interface field appearing in ForceSendFields will be sent to the
  1822. // server regardless of whether the field is empty or not. This may be
  1823. // used to include empty fields in Patch requests.
  1824. ForceSendFields []string `json:"-"`
  1825. // NullFields is a list of field names (e.g. "Latitude") to include in
  1826. // API requests with the JSON null value. By default, fields with empty
  1827. // values are omitted from API requests. However, any field with an
  1828. // empty value appearing in NullFields will be sent to the server as
  1829. // null. It is an error if a field in this list has a non-empty value.
  1830. // This may be used to include null fields in Patch requests.
  1831. NullFields []string `json:"-"`
  1832. }
  1833. func (s *PlacePosition) MarshalJSON() ([]byte, error) {
  1834. type NoMethod PlacePosition
  1835. raw := NoMethod(*s)
  1836. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1837. }
  1838. func (s *PlacePosition) UnmarshalJSON(data []byte) error {
  1839. type NoMethod PlacePosition
  1840. var s1 struct {
  1841. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1842. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1843. *NoMethod
  1844. }
  1845. s1.NoMethod = (*NoMethod)(s)
  1846. if err := json.Unmarshal(data, &s1); err != nil {
  1847. return err
  1848. }
  1849. s.Latitude = float64(s1.Latitude)
  1850. s.Longitude = float64(s1.Longitude)
  1851. return nil
  1852. }
  1853. type PlusAclentryResource struct {
  1854. // DisplayName: A descriptive name for this entry. Suitable for display.
  1855. DisplayName string `json:"displayName,omitempty"`
  1856. // Id: The ID of the entry. For entries of type "person" or "circle",
  1857. // this is the ID of the resource. For other types, this property is not
  1858. // set.
  1859. Id string `json:"id,omitempty"`
  1860. // Type: The type of entry describing to whom access is granted.
  1861. // Possible values are:
  1862. // - "person" - Access to an individual.
  1863. // - "circle" - Access to members of a circle.
  1864. // - "myCircles" - Access to members of all the person's circles.
  1865. // - "extendedCircles" - Access to members of all the person's circles,
  1866. // plus all of the people in their circles.
  1867. // - "domain" - Access to members of the person's Google Apps domain.
  1868. // - "public" - Access to anyone on the web.
  1869. Type string `json:"type,omitempty"`
  1870. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1871. // unconditionally include in API requests. By default, fields with
  1872. // empty values are omitted from API requests. However, any non-pointer,
  1873. // non-interface field appearing in ForceSendFields will be sent to the
  1874. // server regardless of whether the field is empty or not. This may be
  1875. // used to include empty fields in Patch requests.
  1876. ForceSendFields []string `json:"-"`
  1877. // NullFields is a list of field names (e.g. "DisplayName") to include
  1878. // in API requests with the JSON null value. By default, fields with
  1879. // empty values are omitted from API requests. However, any field with
  1880. // an empty value appearing in NullFields will be sent to the server as
  1881. // null. It is an error if a field in this list has a non-empty value.
  1882. // This may be used to include null fields in Patch requests.
  1883. NullFields []string `json:"-"`
  1884. }
  1885. func (s *PlusAclentryResource) MarshalJSON() ([]byte, error) {
  1886. type NoMethod PlusAclentryResource
  1887. raw := NoMethod(*s)
  1888. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1889. }
  1890. // method id "plus.activities.get":
  1891. type ActivitiesGetCall struct {
  1892. s *Service
  1893. activityId string
  1894. urlParams_ gensupport.URLParams
  1895. ifNoneMatch_ string
  1896. ctx_ context.Context
  1897. header_ http.Header
  1898. }
  1899. // Get: Get an activity.
  1900. func (r *ActivitiesService) Get(activityId string) *ActivitiesGetCall {
  1901. c := &ActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1902. c.activityId = activityId
  1903. return c
  1904. }
  1905. // Fields allows partial responses to be retrieved. See
  1906. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1907. // for more information.
  1908. func (c *ActivitiesGetCall) Fields(s ...googleapi.Field) *ActivitiesGetCall {
  1909. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1910. return c
  1911. }
  1912. // IfNoneMatch sets the optional parameter which makes the operation
  1913. // fail if the object's ETag matches the given value. This is useful for
  1914. // getting updates only after the object has changed since the last
  1915. // request. Use googleapi.IsNotModified to check whether the response
  1916. // error from Do is the result of In-None-Match.
  1917. func (c *ActivitiesGetCall) IfNoneMatch(entityTag string) *ActivitiesGetCall {
  1918. c.ifNoneMatch_ = entityTag
  1919. return c
  1920. }
  1921. // Context sets the context to be used in this call's Do method. Any
  1922. // pending HTTP request will be aborted if the provided context is
  1923. // canceled.
  1924. func (c *ActivitiesGetCall) Context(ctx context.Context) *ActivitiesGetCall {
  1925. c.ctx_ = ctx
  1926. return c
  1927. }
  1928. // Header returns an http.Header that can be modified by the caller to
  1929. // add HTTP headers to the request.
  1930. func (c *ActivitiesGetCall) Header() http.Header {
  1931. if c.header_ == nil {
  1932. c.header_ = make(http.Header)
  1933. }
  1934. return c.header_
  1935. }
  1936. func (c *ActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
  1937. reqHeaders := make(http.Header)
  1938. for k, v := range c.header_ {
  1939. reqHeaders[k] = v
  1940. }
  1941. reqHeaders.Set("User-Agent", c.s.userAgent())
  1942. if c.ifNoneMatch_ != "" {
  1943. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1944. }
  1945. var body io.Reader = nil
  1946. c.urlParams_.Set("alt", alt)
  1947. c.urlParams_.Set("prettyPrint", "false")
  1948. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}")
  1949. urls += "?" + c.urlParams_.Encode()
  1950. req, err := http.NewRequest("GET", urls, body)
  1951. if err != nil {
  1952. return nil, err
  1953. }
  1954. req.Header = reqHeaders
  1955. googleapi.Expand(req.URL, map[string]string{
  1956. "activityId": c.activityId,
  1957. })
  1958. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1959. }
  1960. // Do executes the "plus.activities.get" call.
  1961. // Exactly one of *Activity or error will be non-nil. Any non-2xx status
  1962. // code is an error. Response headers are in either
  1963. // *Activity.ServerResponse.Header or (if a response was returned at
  1964. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1965. // to check whether the returned error was because
  1966. // http.StatusNotModified was returned.
  1967. func (c *ActivitiesGetCall) Do(opts ...googleapi.CallOption) (*Activity, error) {
  1968. gensupport.SetOptions(c.urlParams_, opts...)
  1969. res, err := c.doRequest("json")
  1970. if res != nil && res.StatusCode == http.StatusNotModified {
  1971. if res.Body != nil {
  1972. res.Body.Close()
  1973. }
  1974. return nil, &googleapi.Error{
  1975. Code: res.StatusCode,
  1976. Header: res.Header,
  1977. }
  1978. }
  1979. if err != nil {
  1980. return nil, err
  1981. }
  1982. defer googleapi.CloseBody(res)
  1983. if err := googleapi.CheckResponse(res); err != nil {
  1984. return nil, err
  1985. }
  1986. ret := &Activity{
  1987. ServerResponse: googleapi.ServerResponse{
  1988. Header: res.Header,
  1989. HTTPStatusCode: res.StatusCode,
  1990. },
  1991. }
  1992. target := &ret
  1993. if err := gensupport.DecodeResponse(target, res); err != nil {
  1994. return nil, err
  1995. }
  1996. return ret, nil
  1997. // {
  1998. // "description": "Get an activity.",
  1999. // "httpMethod": "GET",
  2000. // "id": "plus.activities.get",
  2001. // "parameterOrder": [
  2002. // "activityId"
  2003. // ],
  2004. // "parameters": {
  2005. // "activityId": {
  2006. // "description": "The ID of the activity to get.",
  2007. // "location": "path",
  2008. // "required": true,
  2009. // "type": "string"
  2010. // }
  2011. // },
  2012. // "path": "activities/{activityId}",
  2013. // "response": {
  2014. // "$ref": "Activity"
  2015. // },
  2016. // "scopes": [
  2017. // "https://www.googleapis.com/auth/plus.login",
  2018. // "https://www.googleapis.com/auth/plus.me"
  2019. // ]
  2020. // }
  2021. }
  2022. // method id "plus.activities.list":
  2023. type ActivitiesListCall struct {
  2024. s *Service
  2025. userId string
  2026. collection string
  2027. urlParams_ gensupport.URLParams
  2028. ifNoneMatch_ string
  2029. ctx_ context.Context
  2030. header_ http.Header
  2031. }
  2032. // List: List all of the activities in the specified collection for a
  2033. // particular user.
  2034. func (r *ActivitiesService) List(userId string, collection string) *ActivitiesListCall {
  2035. c := &ActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2036. c.userId = userId
  2037. c.collection = collection
  2038. return c
  2039. }
  2040. // MaxResults sets the optional parameter "maxResults": The maximum
  2041. // number of activities to include in the response, which is used for
  2042. // paging. For any response, the actual number returned might be less
  2043. // than the specified maxResults.
  2044. func (c *ActivitiesListCall) MaxResults(maxResults int64) *ActivitiesListCall {
  2045. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2046. return c
  2047. }
  2048. // PageToken sets the optional parameter "pageToken": The continuation
  2049. // token, which is used to page through large result sets. To get the
  2050. // next page of results, set this parameter to the value of
  2051. // "nextPageToken" from the previous response.
  2052. func (c *ActivitiesListCall) PageToken(pageToken string) *ActivitiesListCall {
  2053. c.urlParams_.Set("pageToken", pageToken)
  2054. return c
  2055. }
  2056. // Fields allows partial responses to be retrieved. See
  2057. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2058. // for more information.
  2059. func (c *ActivitiesListCall) Fields(s ...googleapi.Field) *ActivitiesListCall {
  2060. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2061. return c
  2062. }
  2063. // IfNoneMatch sets the optional parameter which makes the operation
  2064. // fail if the object's ETag matches the given value. This is useful for
  2065. // getting updates only after the object has changed since the last
  2066. // request. Use googleapi.IsNotModified to check whether the response
  2067. // error from Do is the result of In-None-Match.
  2068. func (c *ActivitiesListCall) IfNoneMatch(entityTag string) *ActivitiesListCall {
  2069. c.ifNoneMatch_ = entityTag
  2070. return c
  2071. }
  2072. // Context sets the context to be used in this call's Do method. Any
  2073. // pending HTTP request will be aborted if the provided context is
  2074. // canceled.
  2075. func (c *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
  2076. c.ctx_ = ctx
  2077. return c
  2078. }
  2079. // Header returns an http.Header that can be modified by the caller to
  2080. // add HTTP headers to the request.
  2081. func (c *ActivitiesListCall) Header() http.Header {
  2082. if c.header_ == nil {
  2083. c.header_ = make(http.Header)
  2084. }
  2085. return c.header_
  2086. }
  2087. func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
  2088. reqHeaders := make(http.Header)
  2089. for k, v := range c.header_ {
  2090. reqHeaders[k] = v
  2091. }
  2092. reqHeaders.Set("User-Agent", c.s.userAgent())
  2093. if c.ifNoneMatch_ != "" {
  2094. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2095. }
  2096. var body io.Reader = nil
  2097. c.urlParams_.Set("alt", alt)
  2098. c.urlParams_.Set("prettyPrint", "false")
  2099. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/activities/{collection}")
  2100. urls += "?" + c.urlParams_.Encode()
  2101. req, err := http.NewRequest("GET", urls, body)
  2102. if err != nil {
  2103. return nil, err
  2104. }
  2105. req.Header = reqHeaders
  2106. googleapi.Expand(req.URL, map[string]string{
  2107. "userId": c.userId,
  2108. "collection": c.collection,
  2109. })
  2110. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2111. }
  2112. // Do executes the "plus.activities.list" call.
  2113. // Exactly one of *ActivityFeed or error will be non-nil. Any non-2xx
  2114. // status code is an error. Response headers are in either
  2115. // *ActivityFeed.ServerResponse.Header or (if a response was returned at
  2116. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2117. // to check whether the returned error was because
  2118. // http.StatusNotModified was returned.
  2119. func (c *ActivitiesListCall) Do(opts ...googleapi.CallOption) (*ActivityFeed, error) {
  2120. gensupport.SetOptions(c.urlParams_, opts...)
  2121. res, err := c.doRequest("json")
  2122. if res != nil && res.StatusCode == http.StatusNotModified {
  2123. if res.Body != nil {
  2124. res.Body.Close()
  2125. }
  2126. return nil, &googleapi.Error{
  2127. Code: res.StatusCode,
  2128. Header: res.Header,
  2129. }
  2130. }
  2131. if err != nil {
  2132. return nil, err
  2133. }
  2134. defer googleapi.CloseBody(res)
  2135. if err := googleapi.CheckResponse(res); err != nil {
  2136. return nil, err
  2137. }
  2138. ret := &ActivityFeed{
  2139. ServerResponse: googleapi.ServerResponse{
  2140. Header: res.Header,
  2141. HTTPStatusCode: res.StatusCode,
  2142. },
  2143. }
  2144. target := &ret
  2145. if err := gensupport.DecodeResponse(target, res); err != nil {
  2146. return nil, err
  2147. }
  2148. return ret, nil
  2149. // {
  2150. // "description": "List all of the activities in the specified collection for a particular user.",
  2151. // "httpMethod": "GET",
  2152. // "id": "plus.activities.list",
  2153. // "parameterOrder": [
  2154. // "userId",
  2155. // "collection"
  2156. // ],
  2157. // "parameters": {
  2158. // "collection": {
  2159. // "description": "The collection of activities to list.",
  2160. // "enum": [
  2161. // "public"
  2162. // ],
  2163. // "enumDescriptions": [
  2164. // "All public activities created by the specified user."
  2165. // ],
  2166. // "location": "path",
  2167. // "required": true,
  2168. // "type": "string"
  2169. // },
  2170. // "maxResults": {
  2171. // "default": "20",
  2172. // "description": "The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  2173. // "format": "uint32",
  2174. // "location": "query",
  2175. // "maximum": "100",
  2176. // "minimum": "1",
  2177. // "type": "integer"
  2178. // },
  2179. // "pageToken": {
  2180. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
  2181. // "location": "query",
  2182. // "type": "string"
  2183. // },
  2184. // "userId": {
  2185. // "description": "The ID of the user to get activities for. The special value \"me\" can be used to indicate the authenticated user.",
  2186. // "location": "path",
  2187. // "required": true,
  2188. // "type": "string"
  2189. // }
  2190. // },
  2191. // "path": "people/{userId}/activities/{collection}",
  2192. // "response": {
  2193. // "$ref": "ActivityFeed"
  2194. // },
  2195. // "scopes": [
  2196. // "https://www.googleapis.com/auth/plus.login",
  2197. // "https://www.googleapis.com/auth/plus.me"
  2198. // ]
  2199. // }
  2200. }
  2201. // Pages invokes f for each page of results.
  2202. // A non-nil error returned from f will halt the iteration.
  2203. // The provided context supersedes any context provided to the Context method.
  2204. func (c *ActivitiesListCall) Pages(ctx context.Context, f func(*ActivityFeed) error) error {
  2205. c.ctx_ = ctx
  2206. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2207. for {
  2208. x, err := c.Do()
  2209. if err != nil {
  2210. return err
  2211. }
  2212. if err := f(x); err != nil {
  2213. return err
  2214. }
  2215. if x.NextPageToken == "" {
  2216. return nil
  2217. }
  2218. c.PageToken(x.NextPageToken)
  2219. }
  2220. }
  2221. // method id "plus.activities.search":
  2222. type ActivitiesSearchCall struct {
  2223. s *Service
  2224. urlParams_ gensupport.URLParams
  2225. ifNoneMatch_ string
  2226. ctx_ context.Context
  2227. header_ http.Header
  2228. }
  2229. // Search: Search public activities.
  2230. func (r *ActivitiesService) Search(query string) *ActivitiesSearchCall {
  2231. c := &ActivitiesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2232. c.urlParams_.Set("query", query)
  2233. return c
  2234. }
  2235. // Language sets the optional parameter "language": Specify the
  2236. // preferred language to search with. See search language codes for
  2237. // available values.
  2238. func (c *ActivitiesSearchCall) Language(language string) *ActivitiesSearchCall {
  2239. c.urlParams_.Set("language", language)
  2240. return c
  2241. }
  2242. // MaxResults sets the optional parameter "maxResults": The maximum
  2243. // number of activities to include in the response, which is used for
  2244. // paging. For any response, the actual number returned might be less
  2245. // than the specified maxResults.
  2246. func (c *ActivitiesSearchCall) MaxResults(maxResults int64) *ActivitiesSearchCall {
  2247. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2248. return c
  2249. }
  2250. // OrderBy sets the optional parameter "orderBy": Specifies how to order
  2251. // search results.
  2252. //
  2253. // Possible values:
  2254. // "best" - Sort activities by relevance to the user, most relevant
  2255. // first.
  2256. // "recent" (default) - Sort activities by published date, most recent
  2257. // first.
  2258. func (c *ActivitiesSearchCall) OrderBy(orderBy string) *ActivitiesSearchCall {
  2259. c.urlParams_.Set("orderBy", orderBy)
  2260. return c
  2261. }
  2262. // PageToken sets the optional parameter "pageToken": The continuation
  2263. // token, which is used to page through large result sets. To get the
  2264. // next page of results, set this parameter to the value of
  2265. // "nextPageToken" from the previous response. This token can be of any
  2266. // length.
  2267. func (c *ActivitiesSearchCall) PageToken(pageToken string) *ActivitiesSearchCall {
  2268. c.urlParams_.Set("pageToken", pageToken)
  2269. return c
  2270. }
  2271. // Fields allows partial responses to be retrieved. See
  2272. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2273. // for more information.
  2274. func (c *ActivitiesSearchCall) Fields(s ...googleapi.Field) *ActivitiesSearchCall {
  2275. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2276. return c
  2277. }
  2278. // IfNoneMatch sets the optional parameter which makes the operation
  2279. // fail if the object's ETag matches the given value. This is useful for
  2280. // getting updates only after the object has changed since the last
  2281. // request. Use googleapi.IsNotModified to check whether the response
  2282. // error from Do is the result of In-None-Match.
  2283. func (c *ActivitiesSearchCall) IfNoneMatch(entityTag string) *ActivitiesSearchCall {
  2284. c.ifNoneMatch_ = entityTag
  2285. return c
  2286. }
  2287. // Context sets the context to be used in this call's Do method. Any
  2288. // pending HTTP request will be aborted if the provided context is
  2289. // canceled.
  2290. func (c *ActivitiesSearchCall) Context(ctx context.Context) *ActivitiesSearchCall {
  2291. c.ctx_ = ctx
  2292. return c
  2293. }
  2294. // Header returns an http.Header that can be modified by the caller to
  2295. // add HTTP headers to the request.
  2296. func (c *ActivitiesSearchCall) Header() http.Header {
  2297. if c.header_ == nil {
  2298. c.header_ = make(http.Header)
  2299. }
  2300. return c.header_
  2301. }
  2302. func (c *ActivitiesSearchCall) doRequest(alt string) (*http.Response, error) {
  2303. reqHeaders := make(http.Header)
  2304. for k, v := range c.header_ {
  2305. reqHeaders[k] = v
  2306. }
  2307. reqHeaders.Set("User-Agent", c.s.userAgent())
  2308. if c.ifNoneMatch_ != "" {
  2309. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2310. }
  2311. var body io.Reader = nil
  2312. c.urlParams_.Set("alt", alt)
  2313. c.urlParams_.Set("prettyPrint", "false")
  2314. urls := googleapi.ResolveRelative(c.s.BasePath, "activities")
  2315. urls += "?" + c.urlParams_.Encode()
  2316. req, err := http.NewRequest("GET", urls, body)
  2317. if err != nil {
  2318. return nil, err
  2319. }
  2320. req.Header = reqHeaders
  2321. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2322. }
  2323. // Do executes the "plus.activities.search" call.
  2324. // Exactly one of *ActivityFeed or error will be non-nil. Any non-2xx
  2325. // status code is an error. Response headers are in either
  2326. // *ActivityFeed.ServerResponse.Header or (if a response was returned at
  2327. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2328. // to check whether the returned error was because
  2329. // http.StatusNotModified was returned.
  2330. func (c *ActivitiesSearchCall) Do(opts ...googleapi.CallOption) (*ActivityFeed, error) {
  2331. gensupport.SetOptions(c.urlParams_, opts...)
  2332. res, err := c.doRequest("json")
  2333. if res != nil && res.StatusCode == http.StatusNotModified {
  2334. if res.Body != nil {
  2335. res.Body.Close()
  2336. }
  2337. return nil, &googleapi.Error{
  2338. Code: res.StatusCode,
  2339. Header: res.Header,
  2340. }
  2341. }
  2342. if err != nil {
  2343. return nil, err
  2344. }
  2345. defer googleapi.CloseBody(res)
  2346. if err := googleapi.CheckResponse(res); err != nil {
  2347. return nil, err
  2348. }
  2349. ret := &ActivityFeed{
  2350. ServerResponse: googleapi.ServerResponse{
  2351. Header: res.Header,
  2352. HTTPStatusCode: res.StatusCode,
  2353. },
  2354. }
  2355. target := &ret
  2356. if err := gensupport.DecodeResponse(target, res); err != nil {
  2357. return nil, err
  2358. }
  2359. return ret, nil
  2360. // {
  2361. // "description": "Search public activities.",
  2362. // "httpMethod": "GET",
  2363. // "id": "plus.activities.search",
  2364. // "parameterOrder": [
  2365. // "query"
  2366. // ],
  2367. // "parameters": {
  2368. // "language": {
  2369. // "default": "en-US",
  2370. // "description": "Specify the preferred language to search with. See search language codes for available values.",
  2371. // "location": "query",
  2372. // "type": "string"
  2373. // },
  2374. // "maxResults": {
  2375. // "default": "10",
  2376. // "description": "The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  2377. // "format": "uint32",
  2378. // "location": "query",
  2379. // "maximum": "20",
  2380. // "minimum": "1",
  2381. // "type": "integer"
  2382. // },
  2383. // "orderBy": {
  2384. // "default": "recent",
  2385. // "description": "Specifies how to order search results.",
  2386. // "enum": [
  2387. // "best",
  2388. // "recent"
  2389. // ],
  2390. // "enumDescriptions": [
  2391. // "Sort activities by relevance to the user, most relevant first.",
  2392. // "Sort activities by published date, most recent first."
  2393. // ],
  2394. // "location": "query",
  2395. // "type": "string"
  2396. // },
  2397. // "pageToken": {
  2398. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response. This token can be of any length.",
  2399. // "location": "query",
  2400. // "type": "string"
  2401. // },
  2402. // "query": {
  2403. // "description": "Full-text search query string.",
  2404. // "location": "query",
  2405. // "required": true,
  2406. // "type": "string"
  2407. // }
  2408. // },
  2409. // "path": "activities",
  2410. // "response": {
  2411. // "$ref": "ActivityFeed"
  2412. // },
  2413. // "scopes": [
  2414. // "https://www.googleapis.com/auth/plus.login",
  2415. // "https://www.googleapis.com/auth/plus.me"
  2416. // ]
  2417. // }
  2418. }
  2419. // Pages invokes f for each page of results.
  2420. // A non-nil error returned from f will halt the iteration.
  2421. // The provided context supersedes any context provided to the Context method.
  2422. func (c *ActivitiesSearchCall) Pages(ctx context.Context, f func(*ActivityFeed) error) error {
  2423. c.ctx_ = ctx
  2424. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2425. for {
  2426. x, err := c.Do()
  2427. if err != nil {
  2428. return err
  2429. }
  2430. if err := f(x); err != nil {
  2431. return err
  2432. }
  2433. if x.NextPageToken == "" {
  2434. return nil
  2435. }
  2436. c.PageToken(x.NextPageToken)
  2437. }
  2438. }
  2439. // method id "plus.comments.get":
  2440. type CommentsGetCall struct {
  2441. s *Service
  2442. commentId string
  2443. urlParams_ gensupport.URLParams
  2444. ifNoneMatch_ string
  2445. ctx_ context.Context
  2446. header_ http.Header
  2447. }
  2448. // Get: Get a comment.
  2449. func (r *CommentsService) Get(commentId string) *CommentsGetCall {
  2450. c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2451. c.commentId = commentId
  2452. return c
  2453. }
  2454. // Fields allows partial responses to be retrieved. See
  2455. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2456. // for more information.
  2457. func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
  2458. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2459. return c
  2460. }
  2461. // IfNoneMatch sets the optional parameter which makes the operation
  2462. // fail if the object's ETag matches the given value. This is useful for
  2463. // getting updates only after the object has changed since the last
  2464. // request. Use googleapi.IsNotModified to check whether the response
  2465. // error from Do is the result of In-None-Match.
  2466. func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
  2467. c.ifNoneMatch_ = entityTag
  2468. return c
  2469. }
  2470. // Context sets the context to be used in this call's Do method. Any
  2471. // pending HTTP request will be aborted if the provided context is
  2472. // canceled.
  2473. func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
  2474. c.ctx_ = ctx
  2475. return c
  2476. }
  2477. // Header returns an http.Header that can be modified by the caller to
  2478. // add HTTP headers to the request.
  2479. func (c *CommentsGetCall) Header() http.Header {
  2480. if c.header_ == nil {
  2481. c.header_ = make(http.Header)
  2482. }
  2483. return c.header_
  2484. }
  2485. func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
  2486. reqHeaders := make(http.Header)
  2487. for k, v := range c.header_ {
  2488. reqHeaders[k] = v
  2489. }
  2490. reqHeaders.Set("User-Agent", c.s.userAgent())
  2491. if c.ifNoneMatch_ != "" {
  2492. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2493. }
  2494. var body io.Reader = nil
  2495. c.urlParams_.Set("alt", alt)
  2496. c.urlParams_.Set("prettyPrint", "false")
  2497. urls := googleapi.ResolveRelative(c.s.BasePath, "comments/{commentId}")
  2498. urls += "?" + c.urlParams_.Encode()
  2499. req, err := http.NewRequest("GET", urls, body)
  2500. if err != nil {
  2501. return nil, err
  2502. }
  2503. req.Header = reqHeaders
  2504. googleapi.Expand(req.URL, map[string]string{
  2505. "commentId": c.commentId,
  2506. })
  2507. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2508. }
  2509. // Do executes the "plus.comments.get" call.
  2510. // Exactly one of *Comment or error will be non-nil. Any non-2xx status
  2511. // code is an error. Response headers are in either
  2512. // *Comment.ServerResponse.Header or (if a response was returned at all)
  2513. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2514. // check whether the returned error was because http.StatusNotModified
  2515. // was returned.
  2516. func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  2517. gensupport.SetOptions(c.urlParams_, opts...)
  2518. res, err := c.doRequest("json")
  2519. if res != nil && res.StatusCode == http.StatusNotModified {
  2520. if res.Body != nil {
  2521. res.Body.Close()
  2522. }
  2523. return nil, &googleapi.Error{
  2524. Code: res.StatusCode,
  2525. Header: res.Header,
  2526. }
  2527. }
  2528. if err != nil {
  2529. return nil, err
  2530. }
  2531. defer googleapi.CloseBody(res)
  2532. if err := googleapi.CheckResponse(res); err != nil {
  2533. return nil, err
  2534. }
  2535. ret := &Comment{
  2536. ServerResponse: googleapi.ServerResponse{
  2537. Header: res.Header,
  2538. HTTPStatusCode: res.StatusCode,
  2539. },
  2540. }
  2541. target := &ret
  2542. if err := gensupport.DecodeResponse(target, res); err != nil {
  2543. return nil, err
  2544. }
  2545. return ret, nil
  2546. // {
  2547. // "description": "Get a comment.",
  2548. // "httpMethod": "GET",
  2549. // "id": "plus.comments.get",
  2550. // "parameterOrder": [
  2551. // "commentId"
  2552. // ],
  2553. // "parameters": {
  2554. // "commentId": {
  2555. // "description": "The ID of the comment to get.",
  2556. // "location": "path",
  2557. // "required": true,
  2558. // "type": "string"
  2559. // }
  2560. // },
  2561. // "path": "comments/{commentId}",
  2562. // "response": {
  2563. // "$ref": "Comment"
  2564. // },
  2565. // "scopes": [
  2566. // "https://www.googleapis.com/auth/plus.login",
  2567. // "https://www.googleapis.com/auth/plus.me"
  2568. // ]
  2569. // }
  2570. }
  2571. // method id "plus.comments.list":
  2572. type CommentsListCall struct {
  2573. s *Service
  2574. activityId string
  2575. urlParams_ gensupport.URLParams
  2576. ifNoneMatch_ string
  2577. ctx_ context.Context
  2578. header_ http.Header
  2579. }
  2580. // List: List all of the comments for an activity.
  2581. func (r *CommentsService) List(activityId string) *CommentsListCall {
  2582. c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2583. c.activityId = activityId
  2584. return c
  2585. }
  2586. // MaxResults sets the optional parameter "maxResults": The maximum
  2587. // number of comments to include in the response, which is used for
  2588. // paging. For any response, the actual number returned might be less
  2589. // than the specified maxResults.
  2590. func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
  2591. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2592. return c
  2593. }
  2594. // PageToken sets the optional parameter "pageToken": The continuation
  2595. // token, which is used to page through large result sets. To get the
  2596. // next page of results, set this parameter to the value of
  2597. // "nextPageToken" from the previous response.
  2598. func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
  2599. c.urlParams_.Set("pageToken", pageToken)
  2600. return c
  2601. }
  2602. // SortOrder sets the optional parameter "sortOrder": The order in which
  2603. // to sort the list of comments.
  2604. //
  2605. // Possible values:
  2606. // "ascending" (default) - Sort oldest comments first.
  2607. // "descending" - Sort newest comments first.
  2608. func (c *CommentsListCall) SortOrder(sortOrder string) *CommentsListCall {
  2609. c.urlParams_.Set("sortOrder", sortOrder)
  2610. return c
  2611. }
  2612. // Fields allows partial responses to be retrieved. See
  2613. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2614. // for more information.
  2615. func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
  2616. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2617. return c
  2618. }
  2619. // IfNoneMatch sets the optional parameter which makes the operation
  2620. // fail if the object's ETag matches the given value. This is useful for
  2621. // getting updates only after the object has changed since the last
  2622. // request. Use googleapi.IsNotModified to check whether the response
  2623. // error from Do is the result of In-None-Match.
  2624. func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
  2625. c.ifNoneMatch_ = entityTag
  2626. return c
  2627. }
  2628. // Context sets the context to be used in this call's Do method. Any
  2629. // pending HTTP request will be aborted if the provided context is
  2630. // canceled.
  2631. func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
  2632. c.ctx_ = ctx
  2633. return c
  2634. }
  2635. // Header returns an http.Header that can be modified by the caller to
  2636. // add HTTP headers to the request.
  2637. func (c *CommentsListCall) Header() http.Header {
  2638. if c.header_ == nil {
  2639. c.header_ = make(http.Header)
  2640. }
  2641. return c.header_
  2642. }
  2643. func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
  2644. reqHeaders := make(http.Header)
  2645. for k, v := range c.header_ {
  2646. reqHeaders[k] = v
  2647. }
  2648. reqHeaders.Set("User-Agent", c.s.userAgent())
  2649. if c.ifNoneMatch_ != "" {
  2650. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2651. }
  2652. var body io.Reader = nil
  2653. c.urlParams_.Set("alt", alt)
  2654. c.urlParams_.Set("prettyPrint", "false")
  2655. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/comments")
  2656. urls += "?" + c.urlParams_.Encode()
  2657. req, err := http.NewRequest("GET", urls, body)
  2658. if err != nil {
  2659. return nil, err
  2660. }
  2661. req.Header = reqHeaders
  2662. googleapi.Expand(req.URL, map[string]string{
  2663. "activityId": c.activityId,
  2664. })
  2665. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2666. }
  2667. // Do executes the "plus.comments.list" call.
  2668. // Exactly one of *CommentFeed or error will be non-nil. Any non-2xx
  2669. // status code is an error. Response headers are in either
  2670. // *CommentFeed.ServerResponse.Header or (if a response was returned at
  2671. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2672. // to check whether the returned error was because
  2673. // http.StatusNotModified was returned.
  2674. func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentFeed, error) {
  2675. gensupport.SetOptions(c.urlParams_, opts...)
  2676. res, err := c.doRequest("json")
  2677. if res != nil && res.StatusCode == http.StatusNotModified {
  2678. if res.Body != nil {
  2679. res.Body.Close()
  2680. }
  2681. return nil, &googleapi.Error{
  2682. Code: res.StatusCode,
  2683. Header: res.Header,
  2684. }
  2685. }
  2686. if err != nil {
  2687. return nil, err
  2688. }
  2689. defer googleapi.CloseBody(res)
  2690. if err := googleapi.CheckResponse(res); err != nil {
  2691. return nil, err
  2692. }
  2693. ret := &CommentFeed{
  2694. ServerResponse: googleapi.ServerResponse{
  2695. Header: res.Header,
  2696. HTTPStatusCode: res.StatusCode,
  2697. },
  2698. }
  2699. target := &ret
  2700. if err := gensupport.DecodeResponse(target, res); err != nil {
  2701. return nil, err
  2702. }
  2703. return ret, nil
  2704. // {
  2705. // "description": "List all of the comments for an activity.",
  2706. // "httpMethod": "GET",
  2707. // "id": "plus.comments.list",
  2708. // "parameterOrder": [
  2709. // "activityId"
  2710. // ],
  2711. // "parameters": {
  2712. // "activityId": {
  2713. // "description": "The ID of the activity to get comments for.",
  2714. // "location": "path",
  2715. // "required": true,
  2716. // "type": "string"
  2717. // },
  2718. // "maxResults": {
  2719. // "default": "20",
  2720. // "description": "The maximum number of comments to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  2721. // "format": "uint32",
  2722. // "location": "query",
  2723. // "maximum": "500",
  2724. // "minimum": "0",
  2725. // "type": "integer"
  2726. // },
  2727. // "pageToken": {
  2728. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
  2729. // "location": "query",
  2730. // "type": "string"
  2731. // },
  2732. // "sortOrder": {
  2733. // "default": "ascending",
  2734. // "description": "The order in which to sort the list of comments.",
  2735. // "enum": [
  2736. // "ascending",
  2737. // "descending"
  2738. // ],
  2739. // "enumDescriptions": [
  2740. // "Sort oldest comments first.",
  2741. // "Sort newest comments first."
  2742. // ],
  2743. // "location": "query",
  2744. // "type": "string"
  2745. // }
  2746. // },
  2747. // "path": "activities/{activityId}/comments",
  2748. // "response": {
  2749. // "$ref": "CommentFeed"
  2750. // },
  2751. // "scopes": [
  2752. // "https://www.googleapis.com/auth/plus.login",
  2753. // "https://www.googleapis.com/auth/plus.me"
  2754. // ]
  2755. // }
  2756. }
  2757. // Pages invokes f for each page of results.
  2758. // A non-nil error returned from f will halt the iteration.
  2759. // The provided context supersedes any context provided to the Context method.
  2760. func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentFeed) error) error {
  2761. c.ctx_ = ctx
  2762. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2763. for {
  2764. x, err := c.Do()
  2765. if err != nil {
  2766. return err
  2767. }
  2768. if err := f(x); err != nil {
  2769. return err
  2770. }
  2771. if x.NextPageToken == "" {
  2772. return nil
  2773. }
  2774. c.PageToken(x.NextPageToken)
  2775. }
  2776. }
  2777. // method id "plus.people.get":
  2778. type PeopleGetCall struct {
  2779. s *Service
  2780. userId string
  2781. urlParams_ gensupport.URLParams
  2782. ifNoneMatch_ string
  2783. ctx_ context.Context
  2784. header_ http.Header
  2785. }
  2786. // Get: Get a person's profile. If your app uses scope
  2787. // https://www.googleapis.com/auth/plus.login, this method is guaranteed
  2788. // to return ageRange and language.
  2789. func (r *PeopleService) Get(userId string) *PeopleGetCall {
  2790. c := &PeopleGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2791. c.userId = userId
  2792. return c
  2793. }
  2794. // Fields allows partial responses to be retrieved. See
  2795. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2796. // for more information.
  2797. func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall {
  2798. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2799. return c
  2800. }
  2801. // IfNoneMatch sets the optional parameter which makes the operation
  2802. // fail if the object's ETag matches the given value. This is useful for
  2803. // getting updates only after the object has changed since the last
  2804. // request. Use googleapi.IsNotModified to check whether the response
  2805. // error from Do is the result of In-None-Match.
  2806. func (c *PeopleGetCall) IfNoneMatch(entityTag string) *PeopleGetCall {
  2807. c.ifNoneMatch_ = entityTag
  2808. return c
  2809. }
  2810. // Context sets the context to be used in this call's Do method. Any
  2811. // pending HTTP request will be aborted if the provided context is
  2812. // canceled.
  2813. func (c *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
  2814. c.ctx_ = ctx
  2815. return c
  2816. }
  2817. // Header returns an http.Header that can be modified by the caller to
  2818. // add HTTP headers to the request.
  2819. func (c *PeopleGetCall) Header() http.Header {
  2820. if c.header_ == nil {
  2821. c.header_ = make(http.Header)
  2822. }
  2823. return c.header_
  2824. }
  2825. func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
  2826. reqHeaders := make(http.Header)
  2827. for k, v := range c.header_ {
  2828. reqHeaders[k] = v
  2829. }
  2830. reqHeaders.Set("User-Agent", c.s.userAgent())
  2831. if c.ifNoneMatch_ != "" {
  2832. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2833. }
  2834. var body io.Reader = nil
  2835. c.urlParams_.Set("alt", alt)
  2836. c.urlParams_.Set("prettyPrint", "false")
  2837. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}")
  2838. urls += "?" + c.urlParams_.Encode()
  2839. req, err := http.NewRequest("GET", urls, body)
  2840. if err != nil {
  2841. return nil, err
  2842. }
  2843. req.Header = reqHeaders
  2844. googleapi.Expand(req.URL, map[string]string{
  2845. "userId": c.userId,
  2846. })
  2847. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2848. }
  2849. // Do executes the "plus.people.get" call.
  2850. // Exactly one of *Person or error will be non-nil. Any non-2xx status
  2851. // code is an error. Response headers are in either
  2852. // *Person.ServerResponse.Header or (if a response was returned at all)
  2853. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2854. // check whether the returned error was because http.StatusNotModified
  2855. // was returned.
  2856. func (c *PeopleGetCall) Do(opts ...googleapi.CallOption) (*Person, error) {
  2857. gensupport.SetOptions(c.urlParams_, opts...)
  2858. res, err := c.doRequest("json")
  2859. if res != nil && res.StatusCode == http.StatusNotModified {
  2860. if res.Body != nil {
  2861. res.Body.Close()
  2862. }
  2863. return nil, &googleapi.Error{
  2864. Code: res.StatusCode,
  2865. Header: res.Header,
  2866. }
  2867. }
  2868. if err != nil {
  2869. return nil, err
  2870. }
  2871. defer googleapi.CloseBody(res)
  2872. if err := googleapi.CheckResponse(res); err != nil {
  2873. return nil, err
  2874. }
  2875. ret := &Person{
  2876. ServerResponse: googleapi.ServerResponse{
  2877. Header: res.Header,
  2878. HTTPStatusCode: res.StatusCode,
  2879. },
  2880. }
  2881. target := &ret
  2882. if err := gensupport.DecodeResponse(target, res); err != nil {
  2883. return nil, err
  2884. }
  2885. return ret, nil
  2886. // {
  2887. // "description": "Get a person's profile. If your app uses scope https://www.googleapis.com/auth/plus.login, this method is guaranteed to return ageRange and language.",
  2888. // "httpMethod": "GET",
  2889. // "id": "plus.people.get",
  2890. // "parameterOrder": [
  2891. // "userId"
  2892. // ],
  2893. // "parameters": {
  2894. // "userId": {
  2895. // "description": "The ID of the person to get the profile for. The special value \"me\" can be used to indicate the authenticated user.",
  2896. // "location": "path",
  2897. // "required": true,
  2898. // "type": "string"
  2899. // }
  2900. // },
  2901. // "path": "people/{userId}",
  2902. // "response": {
  2903. // "$ref": "Person"
  2904. // },
  2905. // "scopes": [
  2906. // "https://www.googleapis.com/auth/plus.login",
  2907. // "https://www.googleapis.com/auth/plus.me",
  2908. // "https://www.googleapis.com/auth/userinfo.email",
  2909. // "https://www.googleapis.com/auth/userinfo.profile"
  2910. // ]
  2911. // }
  2912. }
  2913. // method id "plus.people.list":
  2914. type PeopleListCall struct {
  2915. s *Service
  2916. userId string
  2917. collection string
  2918. urlParams_ gensupport.URLParams
  2919. ifNoneMatch_ string
  2920. ctx_ context.Context
  2921. header_ http.Header
  2922. }
  2923. // List: List all of the people in the specified collection.
  2924. func (r *PeopleService) List(userId string, collection string) *PeopleListCall {
  2925. c := &PeopleListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2926. c.userId = userId
  2927. c.collection = collection
  2928. return c
  2929. }
  2930. // MaxResults sets the optional parameter "maxResults": The maximum
  2931. // number of people to include in the response, which is used for
  2932. // paging. For any response, the actual number returned might be less
  2933. // than the specified maxResults.
  2934. func (c *PeopleListCall) MaxResults(maxResults int64) *PeopleListCall {
  2935. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2936. return c
  2937. }
  2938. // OrderBy sets the optional parameter "orderBy": The order to return
  2939. // people in.
  2940. //
  2941. // Possible values:
  2942. // "alphabetical" - Order the people by their display name.
  2943. // "best" - Order people based on the relevence to the viewer.
  2944. func (c *PeopleListCall) OrderBy(orderBy string) *PeopleListCall {
  2945. c.urlParams_.Set("orderBy", orderBy)
  2946. return c
  2947. }
  2948. // PageToken sets the optional parameter "pageToken": The continuation
  2949. // token, which is used to page through large result sets. To get the
  2950. // next page of results, set this parameter to the value of
  2951. // "nextPageToken" from the previous response.
  2952. func (c *PeopleListCall) PageToken(pageToken string) *PeopleListCall {
  2953. c.urlParams_.Set("pageToken", pageToken)
  2954. return c
  2955. }
  2956. // Fields allows partial responses to be retrieved. See
  2957. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2958. // for more information.
  2959. func (c *PeopleListCall) Fields(s ...googleapi.Field) *PeopleListCall {
  2960. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2961. return c
  2962. }
  2963. // IfNoneMatch sets the optional parameter which makes the operation
  2964. // fail if the object's ETag matches the given value. This is useful for
  2965. // getting updates only after the object has changed since the last
  2966. // request. Use googleapi.IsNotModified to check whether the response
  2967. // error from Do is the result of In-None-Match.
  2968. func (c *PeopleListCall) IfNoneMatch(entityTag string) *PeopleListCall {
  2969. c.ifNoneMatch_ = entityTag
  2970. return c
  2971. }
  2972. // Context sets the context to be used in this call's Do method. Any
  2973. // pending HTTP request will be aborted if the provided context is
  2974. // canceled.
  2975. func (c *PeopleListCall) Context(ctx context.Context) *PeopleListCall {
  2976. c.ctx_ = ctx
  2977. return c
  2978. }
  2979. // Header returns an http.Header that can be modified by the caller to
  2980. // add HTTP headers to the request.
  2981. func (c *PeopleListCall) Header() http.Header {
  2982. if c.header_ == nil {
  2983. c.header_ = make(http.Header)
  2984. }
  2985. return c.header_
  2986. }
  2987. func (c *PeopleListCall) doRequest(alt string) (*http.Response, error) {
  2988. reqHeaders := make(http.Header)
  2989. for k, v := range c.header_ {
  2990. reqHeaders[k] = v
  2991. }
  2992. reqHeaders.Set("User-Agent", c.s.userAgent())
  2993. if c.ifNoneMatch_ != "" {
  2994. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2995. }
  2996. var body io.Reader = nil
  2997. c.urlParams_.Set("alt", alt)
  2998. c.urlParams_.Set("prettyPrint", "false")
  2999. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/people/{collection}")
  3000. urls += "?" + c.urlParams_.Encode()
  3001. req, err := http.NewRequest("GET", urls, body)
  3002. if err != nil {
  3003. return nil, err
  3004. }
  3005. req.Header = reqHeaders
  3006. googleapi.Expand(req.URL, map[string]string{
  3007. "userId": c.userId,
  3008. "collection": c.collection,
  3009. })
  3010. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3011. }
  3012. // Do executes the "plus.people.list" call.
  3013. // Exactly one of *PeopleFeed or error will be non-nil. Any non-2xx
  3014. // status code is an error. Response headers are in either
  3015. // *PeopleFeed.ServerResponse.Header or (if a response was returned at
  3016. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3017. // to check whether the returned error was because
  3018. // http.StatusNotModified was returned.
  3019. func (c *PeopleListCall) Do(opts ...googleapi.CallOption) (*PeopleFeed, error) {
  3020. gensupport.SetOptions(c.urlParams_, opts...)
  3021. res, err := c.doRequest("json")
  3022. if res != nil && res.StatusCode == http.StatusNotModified {
  3023. if res.Body != nil {
  3024. res.Body.Close()
  3025. }
  3026. return nil, &googleapi.Error{
  3027. Code: res.StatusCode,
  3028. Header: res.Header,
  3029. }
  3030. }
  3031. if err != nil {
  3032. return nil, err
  3033. }
  3034. defer googleapi.CloseBody(res)
  3035. if err := googleapi.CheckResponse(res); err != nil {
  3036. return nil, err
  3037. }
  3038. ret := &PeopleFeed{
  3039. ServerResponse: googleapi.ServerResponse{
  3040. Header: res.Header,
  3041. HTTPStatusCode: res.StatusCode,
  3042. },
  3043. }
  3044. target := &ret
  3045. if err := gensupport.DecodeResponse(target, res); err != nil {
  3046. return nil, err
  3047. }
  3048. return ret, nil
  3049. // {
  3050. // "description": "List all of the people in the specified collection.",
  3051. // "httpMethod": "GET",
  3052. // "id": "plus.people.list",
  3053. // "parameterOrder": [
  3054. // "userId",
  3055. // "collection"
  3056. // ],
  3057. // "parameters": {
  3058. // "collection": {
  3059. // "description": "The collection of people to list.",
  3060. // "enum": [
  3061. // "connected",
  3062. // "visible"
  3063. // ],
  3064. // "enumDescriptions": [
  3065. // "The list of visible people in the authenticated user's circles who also use the requesting app. This list is limited to users who made their app activities visible to the authenticated user.",
  3066. // "The list of people who this user has added to one or more circles, limited to the circles visible to the requesting application."
  3067. // ],
  3068. // "location": "path",
  3069. // "required": true,
  3070. // "type": "string"
  3071. // },
  3072. // "maxResults": {
  3073. // "default": "100",
  3074. // "description": "The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  3075. // "format": "uint32",
  3076. // "location": "query",
  3077. // "maximum": "100",
  3078. // "minimum": "1",
  3079. // "type": "integer"
  3080. // },
  3081. // "orderBy": {
  3082. // "description": "The order to return people in.",
  3083. // "enum": [
  3084. // "alphabetical",
  3085. // "best"
  3086. // ],
  3087. // "enumDescriptions": [
  3088. // "Order the people by their display name.",
  3089. // "Order people based on the relevence to the viewer."
  3090. // ],
  3091. // "location": "query",
  3092. // "type": "string"
  3093. // },
  3094. // "pageToken": {
  3095. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
  3096. // "location": "query",
  3097. // "type": "string"
  3098. // },
  3099. // "userId": {
  3100. // "description": "Get the collection of people for the person identified. Use \"me\" to indicate the authenticated user.",
  3101. // "location": "path",
  3102. // "required": true,
  3103. // "type": "string"
  3104. // }
  3105. // },
  3106. // "path": "people/{userId}/people/{collection}",
  3107. // "response": {
  3108. // "$ref": "PeopleFeed"
  3109. // },
  3110. // "scopes": [
  3111. // "https://www.googleapis.com/auth/plus.login",
  3112. // "https://www.googleapis.com/auth/plus.me"
  3113. // ]
  3114. // }
  3115. }
  3116. // Pages invokes f for each page of results.
  3117. // A non-nil error returned from f will halt the iteration.
  3118. // The provided context supersedes any context provided to the Context method.
  3119. func (c *PeopleListCall) Pages(ctx context.Context, f func(*PeopleFeed) error) error {
  3120. c.ctx_ = ctx
  3121. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3122. for {
  3123. x, err := c.Do()
  3124. if err != nil {
  3125. return err
  3126. }
  3127. if err := f(x); err != nil {
  3128. return err
  3129. }
  3130. if x.NextPageToken == "" {
  3131. return nil
  3132. }
  3133. c.PageToken(x.NextPageToken)
  3134. }
  3135. }
  3136. // method id "plus.people.listByActivity":
  3137. type PeopleListByActivityCall struct {
  3138. s *Service
  3139. activityId string
  3140. collection string
  3141. urlParams_ gensupport.URLParams
  3142. ifNoneMatch_ string
  3143. ctx_ context.Context
  3144. header_ http.Header
  3145. }
  3146. // ListByActivity: List all of the people in the specified collection
  3147. // for a particular activity.
  3148. func (r *PeopleService) ListByActivity(activityId string, collection string) *PeopleListByActivityCall {
  3149. c := &PeopleListByActivityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3150. c.activityId = activityId
  3151. c.collection = collection
  3152. return c
  3153. }
  3154. // MaxResults sets the optional parameter "maxResults": The maximum
  3155. // number of people to include in the response, which is used for
  3156. // paging. For any response, the actual number returned might be less
  3157. // than the specified maxResults.
  3158. func (c *PeopleListByActivityCall) MaxResults(maxResults int64) *PeopleListByActivityCall {
  3159. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3160. return c
  3161. }
  3162. // PageToken sets the optional parameter "pageToken": The continuation
  3163. // token, which is used to page through large result sets. To get the
  3164. // next page of results, set this parameter to the value of
  3165. // "nextPageToken" from the previous response.
  3166. func (c *PeopleListByActivityCall) PageToken(pageToken string) *PeopleListByActivityCall {
  3167. c.urlParams_.Set("pageToken", pageToken)
  3168. return c
  3169. }
  3170. // Fields allows partial responses to be retrieved. See
  3171. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3172. // for more information.
  3173. func (c *PeopleListByActivityCall) Fields(s ...googleapi.Field) *PeopleListByActivityCall {
  3174. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3175. return c
  3176. }
  3177. // IfNoneMatch sets the optional parameter which makes the operation
  3178. // fail if the object's ETag matches the given value. This is useful for
  3179. // getting updates only after the object has changed since the last
  3180. // request. Use googleapi.IsNotModified to check whether the response
  3181. // error from Do is the result of In-None-Match.
  3182. func (c *PeopleListByActivityCall) IfNoneMatch(entityTag string) *PeopleListByActivityCall {
  3183. c.ifNoneMatch_ = entityTag
  3184. return c
  3185. }
  3186. // Context sets the context to be used in this call's Do method. Any
  3187. // pending HTTP request will be aborted if the provided context is
  3188. // canceled.
  3189. func (c *PeopleListByActivityCall) Context(ctx context.Context) *PeopleListByActivityCall {
  3190. c.ctx_ = ctx
  3191. return c
  3192. }
  3193. // Header returns an http.Header that can be modified by the caller to
  3194. // add HTTP headers to the request.
  3195. func (c *PeopleListByActivityCall) Header() http.Header {
  3196. if c.header_ == nil {
  3197. c.header_ = make(http.Header)
  3198. }
  3199. return c.header_
  3200. }
  3201. func (c *PeopleListByActivityCall) doRequest(alt string) (*http.Response, error) {
  3202. reqHeaders := make(http.Header)
  3203. for k, v := range c.header_ {
  3204. reqHeaders[k] = v
  3205. }
  3206. reqHeaders.Set("User-Agent", c.s.userAgent())
  3207. if c.ifNoneMatch_ != "" {
  3208. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3209. }
  3210. var body io.Reader = nil
  3211. c.urlParams_.Set("alt", alt)
  3212. c.urlParams_.Set("prettyPrint", "false")
  3213. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/people/{collection}")
  3214. urls += "?" + c.urlParams_.Encode()
  3215. req, err := http.NewRequest("GET", urls, body)
  3216. if err != nil {
  3217. return nil, err
  3218. }
  3219. req.Header = reqHeaders
  3220. googleapi.Expand(req.URL, map[string]string{
  3221. "activityId": c.activityId,
  3222. "collection": c.collection,
  3223. })
  3224. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3225. }
  3226. // Do executes the "plus.people.listByActivity" call.
  3227. // Exactly one of *PeopleFeed or error will be non-nil. Any non-2xx
  3228. // status code is an error. Response headers are in either
  3229. // *PeopleFeed.ServerResponse.Header or (if a response was returned at
  3230. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3231. // to check whether the returned error was because
  3232. // http.StatusNotModified was returned.
  3233. func (c *PeopleListByActivityCall) Do(opts ...googleapi.CallOption) (*PeopleFeed, error) {
  3234. gensupport.SetOptions(c.urlParams_, opts...)
  3235. res, err := c.doRequest("json")
  3236. if res != nil && res.StatusCode == http.StatusNotModified {
  3237. if res.Body != nil {
  3238. res.Body.Close()
  3239. }
  3240. return nil, &googleapi.Error{
  3241. Code: res.StatusCode,
  3242. Header: res.Header,
  3243. }
  3244. }
  3245. if err != nil {
  3246. return nil, err
  3247. }
  3248. defer googleapi.CloseBody(res)
  3249. if err := googleapi.CheckResponse(res); err != nil {
  3250. return nil, err
  3251. }
  3252. ret := &PeopleFeed{
  3253. ServerResponse: googleapi.ServerResponse{
  3254. Header: res.Header,
  3255. HTTPStatusCode: res.StatusCode,
  3256. },
  3257. }
  3258. target := &ret
  3259. if err := gensupport.DecodeResponse(target, res); err != nil {
  3260. return nil, err
  3261. }
  3262. return ret, nil
  3263. // {
  3264. // "description": "List all of the people in the specified collection for a particular activity.",
  3265. // "httpMethod": "GET",
  3266. // "id": "plus.people.listByActivity",
  3267. // "parameterOrder": [
  3268. // "activityId",
  3269. // "collection"
  3270. // ],
  3271. // "parameters": {
  3272. // "activityId": {
  3273. // "description": "The ID of the activity to get the list of people for.",
  3274. // "location": "path",
  3275. // "required": true,
  3276. // "type": "string"
  3277. // },
  3278. // "collection": {
  3279. // "description": "The collection of people to list.",
  3280. // "enum": [
  3281. // "plusoners",
  3282. // "resharers"
  3283. // ],
  3284. // "enumDescriptions": [
  3285. // "List all people who have +1'd this activity.",
  3286. // "List all people who have reshared this activity."
  3287. // ],
  3288. // "location": "path",
  3289. // "required": true,
  3290. // "type": "string"
  3291. // },
  3292. // "maxResults": {
  3293. // "default": "20",
  3294. // "description": "The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  3295. // "format": "uint32",
  3296. // "location": "query",
  3297. // "maximum": "100",
  3298. // "minimum": "1",
  3299. // "type": "integer"
  3300. // },
  3301. // "pageToken": {
  3302. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
  3303. // "location": "query",
  3304. // "type": "string"
  3305. // }
  3306. // },
  3307. // "path": "activities/{activityId}/people/{collection}",
  3308. // "response": {
  3309. // "$ref": "PeopleFeed"
  3310. // },
  3311. // "scopes": [
  3312. // "https://www.googleapis.com/auth/plus.login",
  3313. // "https://www.googleapis.com/auth/plus.me"
  3314. // ]
  3315. // }
  3316. }
  3317. // Pages invokes f for each page of results.
  3318. // A non-nil error returned from f will halt the iteration.
  3319. // The provided context supersedes any context provided to the Context method.
  3320. func (c *PeopleListByActivityCall) Pages(ctx context.Context, f func(*PeopleFeed) error) error {
  3321. c.ctx_ = ctx
  3322. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3323. for {
  3324. x, err := c.Do()
  3325. if err != nil {
  3326. return err
  3327. }
  3328. if err := f(x); err != nil {
  3329. return err
  3330. }
  3331. if x.NextPageToken == "" {
  3332. return nil
  3333. }
  3334. c.PageToken(x.NextPageToken)
  3335. }
  3336. }
  3337. // method id "plus.people.search":
  3338. type PeopleSearchCall struct {
  3339. s *Service
  3340. urlParams_ gensupport.URLParams
  3341. ifNoneMatch_ string
  3342. ctx_ context.Context
  3343. header_ http.Header
  3344. }
  3345. // Search: Search all public profiles.
  3346. func (r *PeopleService) Search(query string) *PeopleSearchCall {
  3347. c := &PeopleSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3348. c.urlParams_.Set("query", query)
  3349. return c
  3350. }
  3351. // Language sets the optional parameter "language": Specify the
  3352. // preferred language to search with. See search language codes for
  3353. // available values.
  3354. func (c *PeopleSearchCall) Language(language string) *PeopleSearchCall {
  3355. c.urlParams_.Set("language", language)
  3356. return c
  3357. }
  3358. // MaxResults sets the optional parameter "maxResults": The maximum
  3359. // number of people to include in the response, which is used for
  3360. // paging. For any response, the actual number returned might be less
  3361. // than the specified maxResults.
  3362. func (c *PeopleSearchCall) MaxResults(maxResults int64) *PeopleSearchCall {
  3363. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3364. return c
  3365. }
  3366. // PageToken sets the optional parameter "pageToken": The continuation
  3367. // token, which is used to page through large result sets. To get the
  3368. // next page of results, set this parameter to the value of
  3369. // "nextPageToken" from the previous response. This token can be of any
  3370. // length.
  3371. func (c *PeopleSearchCall) PageToken(pageToken string) *PeopleSearchCall {
  3372. c.urlParams_.Set("pageToken", pageToken)
  3373. return c
  3374. }
  3375. // Fields allows partial responses to be retrieved. See
  3376. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3377. // for more information.
  3378. func (c *PeopleSearchCall) Fields(s ...googleapi.Field) *PeopleSearchCall {
  3379. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3380. return c
  3381. }
  3382. // IfNoneMatch sets the optional parameter which makes the operation
  3383. // fail if the object's ETag matches the given value. This is useful for
  3384. // getting updates only after the object has changed since the last
  3385. // request. Use googleapi.IsNotModified to check whether the response
  3386. // error from Do is the result of In-None-Match.
  3387. func (c *PeopleSearchCall) IfNoneMatch(entityTag string) *PeopleSearchCall {
  3388. c.ifNoneMatch_ = entityTag
  3389. return c
  3390. }
  3391. // Context sets the context to be used in this call's Do method. Any
  3392. // pending HTTP request will be aborted if the provided context is
  3393. // canceled.
  3394. func (c *PeopleSearchCall) Context(ctx context.Context) *PeopleSearchCall {
  3395. c.ctx_ = ctx
  3396. return c
  3397. }
  3398. // Header returns an http.Header that can be modified by the caller to
  3399. // add HTTP headers to the request.
  3400. func (c *PeopleSearchCall) Header() http.Header {
  3401. if c.header_ == nil {
  3402. c.header_ = make(http.Header)
  3403. }
  3404. return c.header_
  3405. }
  3406. func (c *PeopleSearchCall) doRequest(alt string) (*http.Response, error) {
  3407. reqHeaders := make(http.Header)
  3408. for k, v := range c.header_ {
  3409. reqHeaders[k] = v
  3410. }
  3411. reqHeaders.Set("User-Agent", c.s.userAgent())
  3412. if c.ifNoneMatch_ != "" {
  3413. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3414. }
  3415. var body io.Reader = nil
  3416. c.urlParams_.Set("alt", alt)
  3417. c.urlParams_.Set("prettyPrint", "false")
  3418. urls := googleapi.ResolveRelative(c.s.BasePath, "people")
  3419. urls += "?" + c.urlParams_.Encode()
  3420. req, err := http.NewRequest("GET", urls, body)
  3421. if err != nil {
  3422. return nil, err
  3423. }
  3424. req.Header = reqHeaders
  3425. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3426. }
  3427. // Do executes the "plus.people.search" call.
  3428. // Exactly one of *PeopleFeed or error will be non-nil. Any non-2xx
  3429. // status code is an error. Response headers are in either
  3430. // *PeopleFeed.ServerResponse.Header or (if a response was returned at
  3431. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3432. // to check whether the returned error was because
  3433. // http.StatusNotModified was returned.
  3434. func (c *PeopleSearchCall) Do(opts ...googleapi.CallOption) (*PeopleFeed, error) {
  3435. gensupport.SetOptions(c.urlParams_, opts...)
  3436. res, err := c.doRequest("json")
  3437. if res != nil && res.StatusCode == http.StatusNotModified {
  3438. if res.Body != nil {
  3439. res.Body.Close()
  3440. }
  3441. return nil, &googleapi.Error{
  3442. Code: res.StatusCode,
  3443. Header: res.Header,
  3444. }
  3445. }
  3446. if err != nil {
  3447. return nil, err
  3448. }
  3449. defer googleapi.CloseBody(res)
  3450. if err := googleapi.CheckResponse(res); err != nil {
  3451. return nil, err
  3452. }
  3453. ret := &PeopleFeed{
  3454. ServerResponse: googleapi.ServerResponse{
  3455. Header: res.Header,
  3456. HTTPStatusCode: res.StatusCode,
  3457. },
  3458. }
  3459. target := &ret
  3460. if err := gensupport.DecodeResponse(target, res); err != nil {
  3461. return nil, err
  3462. }
  3463. return ret, nil
  3464. // {
  3465. // "description": "Search all public profiles.",
  3466. // "httpMethod": "GET",
  3467. // "id": "plus.people.search",
  3468. // "parameterOrder": [
  3469. // "query"
  3470. // ],
  3471. // "parameters": {
  3472. // "language": {
  3473. // "default": "en-US",
  3474. // "description": "Specify the preferred language to search with. See search language codes for available values.",
  3475. // "location": "query",
  3476. // "type": "string"
  3477. // },
  3478. // "maxResults": {
  3479. // "default": "25",
  3480. // "description": "The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  3481. // "format": "uint32",
  3482. // "location": "query",
  3483. // "maximum": "50",
  3484. // "minimum": "1",
  3485. // "type": "integer"
  3486. // },
  3487. // "pageToken": {
  3488. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response. This token can be of any length.",
  3489. // "location": "query",
  3490. // "type": "string"
  3491. // },
  3492. // "query": {
  3493. // "description": "Specify a query string for full text search of public text in all profiles.",
  3494. // "location": "query",
  3495. // "required": true,
  3496. // "type": "string"
  3497. // }
  3498. // },
  3499. // "path": "people",
  3500. // "response": {
  3501. // "$ref": "PeopleFeed"
  3502. // },
  3503. // "scopes": [
  3504. // "https://www.googleapis.com/auth/plus.login",
  3505. // "https://www.googleapis.com/auth/plus.me"
  3506. // ]
  3507. // }
  3508. }
  3509. // Pages invokes f for each page of results.
  3510. // A non-nil error returned from f will halt the iteration.
  3511. // The provided context supersedes any context provided to the Context method.
  3512. func (c *PeopleSearchCall) Pages(ctx context.Context, f func(*PeopleFeed) error) error {
  3513. c.ctx_ = ctx
  3514. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3515. for {
  3516. x, err := c.Do()
  3517. if err != nil {
  3518. return err
  3519. }
  3520. if err := f(x); err != nil {
  3521. return err
  3522. }
  3523. if x.NextPageToken == "" {
  3524. return nil
  3525. }
  3526. c.PageToken(x.NextPageToken)
  3527. }
  3528. }