You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

6209 lines
218 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 plusdomains provides access to the Google+ Domains API.
  6. //
  7. // For product documentation, see: https://developers.google.com/+/domains/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/plusdomains/v1"
  14. // ...
  15. // ctx := context.Background()
  16. // plusdomainsService, err := plusdomains.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. // plusdomainsService, err := plusdomains.NewService(ctx, option.WithScopes(plusdomains.UserinfoProfileScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // plusdomainsService, err := plusdomains.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. // plusdomainsService, err := plusdomains.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 plusdomains // import "google.golang.org/api/plusdomains/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 = "plusDomains:v1"
  71. const apiName = "plusDomains"
  72. const apiVersion = "v1"
  73. const basePath = "https://www.googleapis.com/plusDomains/v1/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View your circles and the people and pages in them
  77. PlusCirclesReadScope = "https://www.googleapis.com/auth/plus.circles.read"
  78. // Manage your circles and add people and pages. People and pages you
  79. // add to your circles will be notified. Others may see this information
  80. // publicly. People you add to circles can use Hangouts with you.
  81. PlusCirclesWriteScope = "https://www.googleapis.com/auth/plus.circles.write"
  82. // View your basic profile info, including your age range and language
  83. PlusLoginScope = "https://www.googleapis.com/auth/plus.login"
  84. // Know who you are on Google
  85. PlusMeScope = "https://www.googleapis.com/auth/plus.me"
  86. // Send your photos and videos to Google+
  87. PlusMediaUploadScope = "https://www.googleapis.com/auth/plus.media.upload"
  88. // View your own Google+ profile and profiles visible to you
  89. PlusProfilesReadScope = "https://www.googleapis.com/auth/plus.profiles.read"
  90. // View your Google+ posts, comments, and stream
  91. PlusStreamReadScope = "https://www.googleapis.com/auth/plus.stream.read"
  92. // Manage your Google+ posts, comments, and stream
  93. PlusStreamWriteScope = "https://www.googleapis.com/auth/plus.stream.write"
  94. // View your email address
  95. UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
  96. // See your personal info, including any personal info you've made
  97. // publically available
  98. UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
  99. )
  100. // NewService creates a new Service.
  101. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  102. scopesOption := option.WithScopes(
  103. "https://www.googleapis.com/auth/plus.circles.read",
  104. "https://www.googleapis.com/auth/plus.circles.write",
  105. "https://www.googleapis.com/auth/plus.login",
  106. "https://www.googleapis.com/auth/plus.me",
  107. "https://www.googleapis.com/auth/plus.media.upload",
  108. "https://www.googleapis.com/auth/plus.profiles.read",
  109. "https://www.googleapis.com/auth/plus.stream.read",
  110. "https://www.googleapis.com/auth/plus.stream.write",
  111. "https://www.googleapis.com/auth/userinfo.email",
  112. "https://www.googleapis.com/auth/userinfo.profile",
  113. )
  114. // NOTE: prepend, so we don't override user-specified scopes.
  115. opts = append([]option.ClientOption{scopesOption}, opts...)
  116. client, endpoint, err := htransport.NewClient(ctx, opts...)
  117. if err != nil {
  118. return nil, err
  119. }
  120. s, err := New(client)
  121. if err != nil {
  122. return nil, err
  123. }
  124. if endpoint != "" {
  125. s.BasePath = endpoint
  126. }
  127. return s, nil
  128. }
  129. // New creates a new Service. It uses the provided http.Client for requests.
  130. //
  131. // Deprecated: please use NewService instead.
  132. // To provide a custom HTTP client, use option.WithHTTPClient.
  133. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  134. func New(client *http.Client) (*Service, error) {
  135. if client == nil {
  136. return nil, errors.New("client is nil")
  137. }
  138. s := &Service{client: client, BasePath: basePath}
  139. s.Activities = NewActivitiesService(s)
  140. s.Audiences = NewAudiencesService(s)
  141. s.Circles = NewCirclesService(s)
  142. s.Comments = NewCommentsService(s)
  143. s.Media = NewMediaService(s)
  144. s.People = NewPeopleService(s)
  145. return s, nil
  146. }
  147. type Service struct {
  148. client *http.Client
  149. BasePath string // API endpoint base URL
  150. UserAgent string // optional additional User-Agent fragment
  151. Activities *ActivitiesService
  152. Audiences *AudiencesService
  153. Circles *CirclesService
  154. Comments *CommentsService
  155. Media *MediaService
  156. People *PeopleService
  157. }
  158. func (s *Service) userAgent() string {
  159. if s.UserAgent == "" {
  160. return googleapi.UserAgent
  161. }
  162. return googleapi.UserAgent + " " + s.UserAgent
  163. }
  164. func NewActivitiesService(s *Service) *ActivitiesService {
  165. rs := &ActivitiesService{s: s}
  166. return rs
  167. }
  168. type ActivitiesService struct {
  169. s *Service
  170. }
  171. func NewAudiencesService(s *Service) *AudiencesService {
  172. rs := &AudiencesService{s: s}
  173. return rs
  174. }
  175. type AudiencesService struct {
  176. s *Service
  177. }
  178. func NewCirclesService(s *Service) *CirclesService {
  179. rs := &CirclesService{s: s}
  180. return rs
  181. }
  182. type CirclesService struct {
  183. s *Service
  184. }
  185. func NewCommentsService(s *Service) *CommentsService {
  186. rs := &CommentsService{s: s}
  187. return rs
  188. }
  189. type CommentsService struct {
  190. s *Service
  191. }
  192. func NewMediaService(s *Service) *MediaService {
  193. rs := &MediaService{s: s}
  194. return rs
  195. }
  196. type MediaService struct {
  197. s *Service
  198. }
  199. func NewPeopleService(s *Service) *PeopleService {
  200. rs := &PeopleService{s: s}
  201. return rs
  202. }
  203. type PeopleService struct {
  204. s *Service
  205. }
  206. type Acl struct {
  207. // Description: Description of the access granted, suitable for display.
  208. Description string `json:"description,omitempty"`
  209. // DomainRestricted: Whether access is restricted to the domain.
  210. DomainRestricted bool `json:"domainRestricted,omitempty"`
  211. // Items: The list of access entries.
  212. Items []*PlusDomainsAclentryResource `json:"items,omitempty"`
  213. // Kind: Identifies this resource as a collection of access controls.
  214. // Value: "plus#acl".
  215. Kind string `json:"kind,omitempty"`
  216. // ForceSendFields is a list of field names (e.g. "Description") to
  217. // unconditionally include in API requests. By default, fields with
  218. // empty values are omitted from API requests. However, any non-pointer,
  219. // non-interface field appearing in ForceSendFields will be sent to the
  220. // server regardless of whether the field is empty or not. This may be
  221. // used to include empty fields in Patch requests.
  222. ForceSendFields []string `json:"-"`
  223. // NullFields is a list of field names (e.g. "Description") to include
  224. // in API requests with the JSON null value. By default, fields with
  225. // empty values are omitted from API requests. However, any field with
  226. // an empty value appearing in NullFields will be sent to the server as
  227. // null. It is an error if a field in this list has a non-empty value.
  228. // This may be used to include null fields in Patch requests.
  229. NullFields []string `json:"-"`
  230. }
  231. func (s *Acl) MarshalJSON() ([]byte, error) {
  232. type NoMethod Acl
  233. raw := NoMethod(*s)
  234. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  235. }
  236. type Activity struct {
  237. // Access: Identifies who has access to see this activity.
  238. Access *Acl `json:"access,omitempty"`
  239. // Actor: The person who performed this activity.
  240. Actor *ActivityActor `json:"actor,omitempty"`
  241. // Address: Street address where this activity occurred.
  242. Address string `json:"address,omitempty"`
  243. // Annotation: Additional content added by the person who shared this
  244. // activity, applicable only when resharing an activity.
  245. Annotation string `json:"annotation,omitempty"`
  246. // CrosspostSource: If this activity is a crosspost from another system,
  247. // this property specifies the ID of the original activity.
  248. CrosspostSource string `json:"crosspostSource,omitempty"`
  249. // Etag: ETag of this response for caching purposes.
  250. Etag string `json:"etag,omitempty"`
  251. // Geocode: Latitude and longitude where this activity occurred. Format
  252. // is latitude followed by longitude, space separated.
  253. Geocode string `json:"geocode,omitempty"`
  254. // Id: The ID of this activity.
  255. Id string `json:"id,omitempty"`
  256. // Kind: Identifies this resource as an activity. Value:
  257. // "plus#activity".
  258. Kind string `json:"kind,omitempty"`
  259. // Location: The location where this activity occurred.
  260. Location *Place `json:"location,omitempty"`
  261. // Object: The object of this activity.
  262. Object *ActivityObject `json:"object,omitempty"`
  263. // PlaceId: ID of the place where this activity occurred.
  264. PlaceId string `json:"placeId,omitempty"`
  265. // PlaceName: Name of the place where this activity occurred.
  266. PlaceName string `json:"placeName,omitempty"`
  267. // Provider: The service provider that initially published this
  268. // activity.
  269. Provider *ActivityProvider `json:"provider,omitempty"`
  270. // Published: The time at which this activity was initially published.
  271. // Formatted as an RFC 3339 timestamp.
  272. Published string `json:"published,omitempty"`
  273. // Radius: Radius, in meters, of the region where this activity
  274. // occurred, centered at the latitude and longitude identified in
  275. // geocode.
  276. Radius string `json:"radius,omitempty"`
  277. // Title: Title of this activity.
  278. Title string `json:"title,omitempty"`
  279. // Updated: The time at which this activity was last updated. Formatted
  280. // as an RFC 3339 timestamp.
  281. Updated string `json:"updated,omitempty"`
  282. // Url: The link to this activity.
  283. Url string `json:"url,omitempty"`
  284. // Verb: This activity's verb, which indicates the action that was
  285. // performed. Possible values include, but are not limited to, the
  286. // following values:
  287. // - "post" - Publish content to the stream.
  288. // - "share" - Reshare an activity.
  289. Verb string `json:"verb,omitempty"`
  290. // ServerResponse contains the HTTP response code and headers from the
  291. // server.
  292. googleapi.ServerResponse `json:"-"`
  293. // ForceSendFields is a list of field names (e.g. "Access") to
  294. // unconditionally include in API requests. By default, fields with
  295. // empty values are omitted from API requests. However, any non-pointer,
  296. // non-interface field appearing in ForceSendFields will be sent to the
  297. // server regardless of whether the field is empty or not. This may be
  298. // used to include empty fields in Patch requests.
  299. ForceSendFields []string `json:"-"`
  300. // NullFields is a list of field names (e.g. "Access") to include in API
  301. // requests with the JSON null value. By default, fields with empty
  302. // values are omitted from API requests. However, any field with an
  303. // empty value appearing in NullFields will be sent to the server as
  304. // null. It is an error if a field in this list has a non-empty value.
  305. // This may be used to include null fields in Patch requests.
  306. NullFields []string `json:"-"`
  307. }
  308. func (s *Activity) MarshalJSON() ([]byte, error) {
  309. type NoMethod Activity
  310. raw := NoMethod(*s)
  311. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  312. }
  313. // ActivityActor: The person who performed this activity.
  314. type ActivityActor struct {
  315. // ClientSpecificActorInfo: Actor info specific to particular clients.
  316. ClientSpecificActorInfo *ActivityActorClientSpecificActorInfo `json:"clientSpecificActorInfo,omitempty"`
  317. // DisplayName: The name of the actor, suitable for display.
  318. DisplayName string `json:"displayName,omitempty"`
  319. // Id: The ID of the actor's Person resource.
  320. Id string `json:"id,omitempty"`
  321. // Image: The image representation of the actor.
  322. Image *ActivityActorImage `json:"image,omitempty"`
  323. // Name: An object representation of the individual components of name.
  324. Name *ActivityActorName `json:"name,omitempty"`
  325. // Url: The link to the actor's Google profile.
  326. Url string `json:"url,omitempty"`
  327. // Verification: Verification status of actor.
  328. Verification *ActivityActorVerification `json:"verification,omitempty"`
  329. // ForceSendFields is a list of field names (e.g.
  330. // "ClientSpecificActorInfo") to unconditionally include in API
  331. // requests. By default, fields with empty values are omitted from API
  332. // requests. However, any non-pointer, non-interface field appearing in
  333. // ForceSendFields will be sent to the server regardless of whether the
  334. // field is empty or not. This may be used to include empty fields in
  335. // Patch requests.
  336. ForceSendFields []string `json:"-"`
  337. // NullFields is a list of field names (e.g. "ClientSpecificActorInfo")
  338. // to include in API requests with the JSON null value. By default,
  339. // fields with empty values are omitted from API requests. However, any
  340. // field with an empty value appearing in NullFields will be sent to the
  341. // server as null. It is an error if a field in this list has a
  342. // non-empty value. This may be used to include null fields in Patch
  343. // requests.
  344. NullFields []string `json:"-"`
  345. }
  346. func (s *ActivityActor) MarshalJSON() ([]byte, error) {
  347. type NoMethod ActivityActor
  348. raw := NoMethod(*s)
  349. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  350. }
  351. // ActivityActorClientSpecificActorInfo: Actor info specific to
  352. // particular clients.
  353. type ActivityActorClientSpecificActorInfo struct {
  354. // YoutubeActorInfo: Actor info specific to YouTube clients.
  355. YoutubeActorInfo *ActivityActorClientSpecificActorInfoYoutubeActorInfo `json:"youtubeActorInfo,omitempty"`
  356. // ForceSendFields is a list of field names (e.g. "YoutubeActorInfo") to
  357. // unconditionally include in API requests. By default, fields with
  358. // empty values are omitted from API requests. However, any non-pointer,
  359. // non-interface field appearing in ForceSendFields will be sent to the
  360. // server regardless of whether the field is empty or not. This may be
  361. // used to include empty fields in Patch requests.
  362. ForceSendFields []string `json:"-"`
  363. // NullFields is a list of field names (e.g. "YoutubeActorInfo") to
  364. // include in API requests with the JSON null value. By default, fields
  365. // with empty values are omitted from API requests. However, any field
  366. // with an empty value appearing in NullFields will be sent to the
  367. // server as null. It is an error if a field in this list has a
  368. // non-empty value. This may be used to include null fields in Patch
  369. // requests.
  370. NullFields []string `json:"-"`
  371. }
  372. func (s *ActivityActorClientSpecificActorInfo) MarshalJSON() ([]byte, error) {
  373. type NoMethod ActivityActorClientSpecificActorInfo
  374. raw := NoMethod(*s)
  375. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  376. }
  377. // ActivityActorClientSpecificActorInfoYoutubeActorInfo: Actor info
  378. // specific to YouTube clients.
  379. type ActivityActorClientSpecificActorInfoYoutubeActorInfo struct {
  380. // ChannelId: ID of the YouTube channel owned by the Actor.
  381. ChannelId string `json:"channelId,omitempty"`
  382. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  383. // unconditionally include in API requests. By default, fields with
  384. // empty values are omitted from API requests. However, any non-pointer,
  385. // non-interface field appearing in ForceSendFields will be sent to the
  386. // server regardless of whether the field is empty or not. This may be
  387. // used to include empty fields in Patch requests.
  388. ForceSendFields []string `json:"-"`
  389. // NullFields is a list of field names (e.g. "ChannelId") to include in
  390. // API requests with the JSON null value. By default, fields with empty
  391. // values are omitted from API requests. However, any field with an
  392. // empty value appearing in NullFields will be sent to the server as
  393. // null. It is an error if a field in this list has a non-empty value.
  394. // This may be used to include null fields in Patch requests.
  395. NullFields []string `json:"-"`
  396. }
  397. func (s *ActivityActorClientSpecificActorInfoYoutubeActorInfo) MarshalJSON() ([]byte, error) {
  398. type NoMethod ActivityActorClientSpecificActorInfoYoutubeActorInfo
  399. raw := NoMethod(*s)
  400. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  401. }
  402. // ActivityActorImage: The image representation of the actor.
  403. type ActivityActorImage struct {
  404. // Url: The URL of the actor's profile photo. To resize the image and
  405. // crop it to a square, append the query string ?sz=x, where x is the
  406. // dimension in pixels of each side.
  407. Url string `json:"url,omitempty"`
  408. // ForceSendFields is a list of field names (e.g. "Url") to
  409. // unconditionally include in API requests. By default, fields with
  410. // empty values are omitted from API requests. However, any non-pointer,
  411. // non-interface field appearing in ForceSendFields will be sent to the
  412. // server regardless of whether the field is empty or not. This may be
  413. // used to include empty fields in Patch requests.
  414. ForceSendFields []string `json:"-"`
  415. // NullFields is a list of field names (e.g. "Url") to include in API
  416. // requests with the JSON null value. By default, fields with empty
  417. // values are omitted from API requests. However, any field with an
  418. // empty value appearing in NullFields will be sent to the server as
  419. // null. It is an error if a field in this list has a non-empty value.
  420. // This may be used to include null fields in Patch requests.
  421. NullFields []string `json:"-"`
  422. }
  423. func (s *ActivityActorImage) MarshalJSON() ([]byte, error) {
  424. type NoMethod ActivityActorImage
  425. raw := NoMethod(*s)
  426. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  427. }
  428. // ActivityActorName: An object representation of the individual
  429. // components of name.
  430. type ActivityActorName struct {
  431. // FamilyName: The family name ("last name") of the actor.
  432. FamilyName string `json:"familyName,omitempty"`
  433. // GivenName: The given name ("first name") of the actor.
  434. GivenName string `json:"givenName,omitempty"`
  435. // ForceSendFields is a list of field names (e.g. "FamilyName") to
  436. // unconditionally include in API requests. By default, fields with
  437. // empty values are omitted from API requests. However, any non-pointer,
  438. // non-interface field appearing in ForceSendFields will be sent to the
  439. // server regardless of whether the field is empty or not. This may be
  440. // used to include empty fields in Patch requests.
  441. ForceSendFields []string `json:"-"`
  442. // NullFields is a list of field names (e.g. "FamilyName") to include in
  443. // API requests with the JSON null value. By default, fields with empty
  444. // values are omitted from API requests. However, any field with an
  445. // empty value appearing in NullFields will be sent to the server as
  446. // null. It is an error if a field in this list has a non-empty value.
  447. // This may be used to include null fields in Patch requests.
  448. NullFields []string `json:"-"`
  449. }
  450. func (s *ActivityActorName) MarshalJSON() ([]byte, error) {
  451. type NoMethod ActivityActorName
  452. raw := NoMethod(*s)
  453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  454. }
  455. // ActivityActorVerification: Verification status of actor.
  456. type ActivityActorVerification struct {
  457. // AdHocVerified: Verification for one-time or manual processes.
  458. AdHocVerified string `json:"adHocVerified,omitempty"`
  459. // ForceSendFields is a list of field names (e.g. "AdHocVerified") to
  460. // unconditionally include in API requests. By default, fields with
  461. // empty values are omitted from API requests. However, any non-pointer,
  462. // non-interface field appearing in ForceSendFields will be sent to the
  463. // server regardless of whether the field is empty or not. This may be
  464. // used to include empty fields in Patch requests.
  465. ForceSendFields []string `json:"-"`
  466. // NullFields is a list of field names (e.g. "AdHocVerified") to include
  467. // in API requests with the JSON null value. By default, fields with
  468. // empty values are omitted from API requests. However, any field with
  469. // an empty value appearing in NullFields will be sent to the server as
  470. // null. It is an error if a field in this list has a non-empty value.
  471. // This may be used to include null fields in Patch requests.
  472. NullFields []string `json:"-"`
  473. }
  474. func (s *ActivityActorVerification) MarshalJSON() ([]byte, error) {
  475. type NoMethod ActivityActorVerification
  476. raw := NoMethod(*s)
  477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  478. }
  479. // ActivityObject: The object of this activity.
  480. type ActivityObject struct {
  481. // Actor: If this activity's object is itself another activity, such as
  482. // when a person reshares an activity, this property specifies the
  483. // original activity's actor.
  484. Actor *ActivityObjectActor `json:"actor,omitempty"`
  485. // Attachments: The media objects attached to this activity.
  486. Attachments []*ActivityObjectAttachments `json:"attachments,omitempty"`
  487. // Content: The HTML-formatted content, which is suitable for display.
  488. Content string `json:"content,omitempty"`
  489. // Id: The ID of the object. When resharing an activity, this is the ID
  490. // of the activity that is being reshared.
  491. Id string `json:"id,omitempty"`
  492. // ObjectType: The type of the object. Possible values include, but are
  493. // not limited to, the following values:
  494. // - "note" - Textual content.
  495. // - "activity" - A Google+ activity.
  496. ObjectType string `json:"objectType,omitempty"`
  497. // OriginalContent: The content (text) as provided by the author, which
  498. // is stored without any HTML formatting. When creating or updating an
  499. // activity, this value must be supplied as plain text in the request.
  500. OriginalContent string `json:"originalContent,omitempty"`
  501. // Plusoners: People who +1'd this activity.
  502. Plusoners *ActivityObjectPlusoners `json:"plusoners,omitempty"`
  503. // Replies: Comments in reply to this activity.
  504. Replies *ActivityObjectReplies `json:"replies,omitempty"`
  505. // Resharers: People who reshared this activity.
  506. Resharers *ActivityObjectResharers `json:"resharers,omitempty"`
  507. // StatusForViewer: Status of the activity as seen by the viewer.
  508. StatusForViewer *ActivityObjectStatusForViewer `json:"statusForViewer,omitempty"`
  509. // Url: The URL that points to the linked resource.
  510. Url string `json:"url,omitempty"`
  511. // ForceSendFields is a list of field names (e.g. "Actor") to
  512. // unconditionally include in API requests. By default, fields with
  513. // empty values are omitted from API requests. However, any non-pointer,
  514. // non-interface field appearing in ForceSendFields will be sent to the
  515. // server regardless of whether the field is empty or not. This may be
  516. // used to include empty fields in Patch requests.
  517. ForceSendFields []string `json:"-"`
  518. // NullFields is a list of field names (e.g. "Actor") to include in API
  519. // requests with the JSON null value. By default, fields with empty
  520. // values are omitted from API requests. However, any field with an
  521. // empty value appearing in NullFields will be sent to the server as
  522. // null. It is an error if a field in this list has a non-empty value.
  523. // This may be used to include null fields in Patch requests.
  524. NullFields []string `json:"-"`
  525. }
  526. func (s *ActivityObject) MarshalJSON() ([]byte, error) {
  527. type NoMethod ActivityObject
  528. raw := NoMethod(*s)
  529. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  530. }
  531. // ActivityObjectActor: If this activity's object is itself another
  532. // activity, such as when a person reshares an activity, this property
  533. // specifies the original activity's actor.
  534. type ActivityObjectActor struct {
  535. // ClientSpecificActorInfo: Actor info specific to particular clients.
  536. ClientSpecificActorInfo *ActivityObjectActorClientSpecificActorInfo `json:"clientSpecificActorInfo,omitempty"`
  537. // DisplayName: The original actor's name, which is suitable for
  538. // display.
  539. DisplayName string `json:"displayName,omitempty"`
  540. // Id: ID of the original actor.
  541. Id string `json:"id,omitempty"`
  542. // Image: The image representation of the original actor.
  543. Image *ActivityObjectActorImage `json:"image,omitempty"`
  544. // Url: A link to the original actor's Google profile.
  545. Url string `json:"url,omitempty"`
  546. // Verification: Verification status of actor.
  547. Verification *ActivityObjectActorVerification `json:"verification,omitempty"`
  548. // ForceSendFields is a list of field names (e.g.
  549. // "ClientSpecificActorInfo") to unconditionally include in API
  550. // requests. By default, fields with empty values are omitted from API
  551. // requests. However, any non-pointer, non-interface field appearing in
  552. // ForceSendFields will be sent to the server regardless of whether the
  553. // field is empty or not. This may be used to include empty fields in
  554. // Patch requests.
  555. ForceSendFields []string `json:"-"`
  556. // NullFields is a list of field names (e.g. "ClientSpecificActorInfo")
  557. // to include in API requests with the JSON null value. By default,
  558. // fields with empty values are omitted from API requests. However, any
  559. // field with an empty value appearing in NullFields will be sent to the
  560. // server as null. It is an error if a field in this list has a
  561. // non-empty value. This may be used to include null fields in Patch
  562. // requests.
  563. NullFields []string `json:"-"`
  564. }
  565. func (s *ActivityObjectActor) MarshalJSON() ([]byte, error) {
  566. type NoMethod ActivityObjectActor
  567. raw := NoMethod(*s)
  568. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  569. }
  570. // ActivityObjectActorClientSpecificActorInfo: Actor info specific to
  571. // particular clients.
  572. type ActivityObjectActorClientSpecificActorInfo struct {
  573. // YoutubeActorInfo: Actor info specific to YouTube clients.
  574. YoutubeActorInfo *ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo `json:"youtubeActorInfo,omitempty"`
  575. // ForceSendFields is a list of field names (e.g. "YoutubeActorInfo") 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. "YoutubeActorInfo") to
  583. // include in API requests with the JSON null value. By default, fields
  584. // with empty values are omitted from API requests. However, any field
  585. // with an empty value appearing in NullFields will be sent to the
  586. // server as null. It is an error if a field in this list has a
  587. // non-empty value. This may be used to include null fields in Patch
  588. // requests.
  589. NullFields []string `json:"-"`
  590. }
  591. func (s *ActivityObjectActorClientSpecificActorInfo) MarshalJSON() ([]byte, error) {
  592. type NoMethod ActivityObjectActorClientSpecificActorInfo
  593. raw := NoMethod(*s)
  594. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  595. }
  596. // ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo: Actor
  597. // info specific to YouTube clients.
  598. type ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo struct {
  599. // ChannelId: ID of the YouTube channel owned by the Actor.
  600. ChannelId string `json:"channelId,omitempty"`
  601. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  602. // unconditionally include in API requests. By default, fields with
  603. // empty values are omitted from API requests. However, any non-pointer,
  604. // non-interface field appearing in ForceSendFields will be sent to the
  605. // server regardless of whether the field is empty or not. This may be
  606. // used to include empty fields in Patch requests.
  607. ForceSendFields []string `json:"-"`
  608. // NullFields is a list of field names (e.g. "ChannelId") to include in
  609. // API requests with the JSON null value. By default, fields with empty
  610. // values are omitted from API requests. However, any field with an
  611. // empty value appearing in NullFields will be sent to the server as
  612. // null. It is an error if a field in this list has a non-empty value.
  613. // This may be used to include null fields in Patch requests.
  614. NullFields []string `json:"-"`
  615. }
  616. func (s *ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo) MarshalJSON() ([]byte, error) {
  617. type NoMethod ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo
  618. raw := NoMethod(*s)
  619. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  620. }
  621. // ActivityObjectActorImage: The image representation of the original
  622. // actor.
  623. type ActivityObjectActorImage struct {
  624. // Url: A URL that points to a thumbnail photo of the original actor.
  625. Url string `json:"url,omitempty"`
  626. // ForceSendFields is a list of field names (e.g. "Url") to
  627. // unconditionally include in API requests. By default, fields with
  628. // empty values are omitted from API requests. However, any non-pointer,
  629. // non-interface field appearing in ForceSendFields will be sent to the
  630. // server regardless of whether the field is empty or not. This may be
  631. // used to include empty fields in Patch requests.
  632. ForceSendFields []string `json:"-"`
  633. // NullFields is a list of field names (e.g. "Url") to include in API
  634. // requests with the JSON null value. By default, fields with empty
  635. // values are omitted from API requests. However, any field with an
  636. // empty value appearing in NullFields will be sent to the server as
  637. // null. It is an error if a field in this list has a non-empty value.
  638. // This may be used to include null fields in Patch requests.
  639. NullFields []string `json:"-"`
  640. }
  641. func (s *ActivityObjectActorImage) MarshalJSON() ([]byte, error) {
  642. type NoMethod ActivityObjectActorImage
  643. raw := NoMethod(*s)
  644. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  645. }
  646. // ActivityObjectActorVerification: Verification status of actor.
  647. type ActivityObjectActorVerification struct {
  648. // AdHocVerified: Verification for one-time or manual processes.
  649. AdHocVerified string `json:"adHocVerified,omitempty"`
  650. // ForceSendFields is a list of field names (e.g. "AdHocVerified") to
  651. // unconditionally include in API requests. By default, fields with
  652. // empty values are omitted from API requests. However, any non-pointer,
  653. // non-interface field appearing in ForceSendFields will be sent to the
  654. // server regardless of whether the field is empty or not. This may be
  655. // used to include empty fields in Patch requests.
  656. ForceSendFields []string `json:"-"`
  657. // NullFields is a list of field names (e.g. "AdHocVerified") to include
  658. // in API requests with the JSON null value. By default, fields with
  659. // empty values are omitted from API requests. However, any field with
  660. // an empty value appearing in NullFields will be sent to the server as
  661. // null. It is an error if a field in this list has a non-empty value.
  662. // This may be used to include null fields in Patch requests.
  663. NullFields []string `json:"-"`
  664. }
  665. func (s *ActivityObjectActorVerification) MarshalJSON() ([]byte, error) {
  666. type NoMethod ActivityObjectActorVerification
  667. raw := NoMethod(*s)
  668. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  669. }
  670. type ActivityObjectAttachments struct {
  671. // Content: If the attachment is an article, this property contains a
  672. // snippet of text from the article. It can also include descriptions
  673. // for other types.
  674. Content string `json:"content,omitempty"`
  675. // DisplayName: The title of the attachment, such as a photo caption or
  676. // an article title.
  677. DisplayName string `json:"displayName,omitempty"`
  678. // Embed: If the attachment is a video, the embeddable link.
  679. Embed *ActivityObjectAttachmentsEmbed `json:"embed,omitempty"`
  680. // FullImage: The full image URL for photo attachments.
  681. FullImage *ActivityObjectAttachmentsFullImage `json:"fullImage,omitempty"`
  682. // Id: The ID of the attachment.
  683. Id string `json:"id,omitempty"`
  684. // Image: The preview image for photos or videos.
  685. Image *ActivityObjectAttachmentsImage `json:"image,omitempty"`
  686. // ObjectType: The type of media object. Possible values include, but
  687. // are not limited to, the following values:
  688. // - "photo" - A photo.
  689. // - "album" - A photo album.
  690. // - "video" - A video.
  691. // - "article" - An article, specified by a link.
  692. ObjectType string `json:"objectType,omitempty"`
  693. // PreviewThumbnails: When previewing, these are the optional thumbnails
  694. // for the post. When posting an article, choose one by setting the
  695. // attachment.image.url property. If you don't choose one, one will be
  696. // chosen for you.
  697. PreviewThumbnails []*ActivityObjectAttachmentsPreviewThumbnails `json:"previewThumbnails,omitempty"`
  698. // Thumbnails: If the attachment is an album, this property is a list of
  699. // potential additional thumbnails from the album.
  700. Thumbnails []*ActivityObjectAttachmentsThumbnails `json:"thumbnails,omitempty"`
  701. // Url: The link to the attachment, which should be of type text/html.
  702. Url string `json:"url,omitempty"`
  703. // ForceSendFields is a list of field names (e.g. "Content") to
  704. // unconditionally include in API requests. By default, fields with
  705. // empty values are omitted from API requests. However, any non-pointer,
  706. // non-interface field appearing in ForceSendFields will be sent to the
  707. // server regardless of whether the field is empty or not. This may be
  708. // used to include empty fields in Patch requests.
  709. ForceSendFields []string `json:"-"`
  710. // NullFields is a list of field names (e.g. "Content") to include in
  711. // API requests with the JSON null value. By default, fields with empty
  712. // values are omitted from API requests. However, any field with an
  713. // empty value appearing in NullFields will be sent to the server as
  714. // null. It is an error if a field in this list has a non-empty value.
  715. // This may be used to include null fields in Patch requests.
  716. NullFields []string `json:"-"`
  717. }
  718. func (s *ActivityObjectAttachments) MarshalJSON() ([]byte, error) {
  719. type NoMethod ActivityObjectAttachments
  720. raw := NoMethod(*s)
  721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  722. }
  723. // ActivityObjectAttachmentsEmbed: If the attachment is a video, the
  724. // embeddable link.
  725. type ActivityObjectAttachmentsEmbed struct {
  726. // Type: Media type of the link.
  727. Type string `json:"type,omitempty"`
  728. // Url: URL of the link.
  729. Url string `json:"url,omitempty"`
  730. // ForceSendFields is a list of field names (e.g. "Type") to
  731. // unconditionally include in API requests. By default, fields with
  732. // empty values are omitted from API requests. However, any non-pointer,
  733. // non-interface field appearing in ForceSendFields will be sent to the
  734. // server regardless of whether the field is empty or not. This may be
  735. // used to include empty fields in Patch requests.
  736. ForceSendFields []string `json:"-"`
  737. // NullFields is a list of field names (e.g. "Type") to include in API
  738. // requests with the JSON null value. By default, fields with empty
  739. // values are omitted from API requests. However, any field with an
  740. // empty value appearing in NullFields will be sent to the server as
  741. // null. It is an error if a field in this list has a non-empty value.
  742. // This may be used to include null fields in Patch requests.
  743. NullFields []string `json:"-"`
  744. }
  745. func (s *ActivityObjectAttachmentsEmbed) MarshalJSON() ([]byte, error) {
  746. type NoMethod ActivityObjectAttachmentsEmbed
  747. raw := NoMethod(*s)
  748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  749. }
  750. // ActivityObjectAttachmentsFullImage: The full image URL for photo
  751. // attachments.
  752. type ActivityObjectAttachmentsFullImage struct {
  753. // Height: The height, in pixels, of the linked resource.
  754. Height int64 `json:"height,omitempty"`
  755. // Type: Media type of the link.
  756. Type string `json:"type,omitempty"`
  757. // Url: URL of the image.
  758. Url string `json:"url,omitempty"`
  759. // Width: The width, in pixels, of the linked resource.
  760. Width int64 `json:"width,omitempty"`
  761. // ForceSendFields is a list of field names (e.g. "Height") to
  762. // unconditionally include in API requests. By default, fields with
  763. // empty values are omitted from API requests. However, any non-pointer,
  764. // non-interface field appearing in ForceSendFields will be sent to the
  765. // server regardless of whether the field is empty or not. This may be
  766. // used to include empty fields in Patch requests.
  767. ForceSendFields []string `json:"-"`
  768. // NullFields is a list of field names (e.g. "Height") to include in API
  769. // requests with the JSON null value. By default, fields with empty
  770. // values are omitted from API requests. However, any field with an
  771. // empty value appearing in NullFields will be sent to the server as
  772. // null. It is an error if a field in this list has a non-empty value.
  773. // This may be used to include null fields in Patch requests.
  774. NullFields []string `json:"-"`
  775. }
  776. func (s *ActivityObjectAttachmentsFullImage) MarshalJSON() ([]byte, error) {
  777. type NoMethod ActivityObjectAttachmentsFullImage
  778. raw := NoMethod(*s)
  779. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  780. }
  781. // ActivityObjectAttachmentsImage: The preview image for photos or
  782. // videos.
  783. type ActivityObjectAttachmentsImage struct {
  784. // Height: The height, in pixels, of the linked resource.
  785. Height int64 `json:"height,omitempty"`
  786. // Type: Media type of the link.
  787. Type string `json:"type,omitempty"`
  788. // Url: Image URL.
  789. Url string `json:"url,omitempty"`
  790. // Width: The width, in pixels, of the linked resource.
  791. Width int64 `json:"width,omitempty"`
  792. // ForceSendFields is a list of field names (e.g. "Height") to
  793. // unconditionally include in API requests. By default, fields with
  794. // empty values are omitted from API requests. However, any non-pointer,
  795. // non-interface field appearing in ForceSendFields will be sent to the
  796. // server regardless of whether the field is empty or not. This may be
  797. // used to include empty fields in Patch requests.
  798. ForceSendFields []string `json:"-"`
  799. // NullFields is a list of field names (e.g. "Height") to include in API
  800. // requests with the JSON null value. By default, fields with empty
  801. // values are omitted from API requests. However, any field with an
  802. // empty value appearing in NullFields will be sent to the server as
  803. // null. It is an error if a field in this list has a non-empty value.
  804. // This may be used to include null fields in Patch requests.
  805. NullFields []string `json:"-"`
  806. }
  807. func (s *ActivityObjectAttachmentsImage) MarshalJSON() ([]byte, error) {
  808. type NoMethod ActivityObjectAttachmentsImage
  809. raw := NoMethod(*s)
  810. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  811. }
  812. type ActivityObjectAttachmentsPreviewThumbnails struct {
  813. // Url: URL of the thumbnail image.
  814. Url string `json:"url,omitempty"`
  815. // ForceSendFields is a list of field names (e.g. "Url") to
  816. // unconditionally include in API requests. By default, fields with
  817. // empty values are omitted from API requests. However, any non-pointer,
  818. // non-interface field appearing in ForceSendFields will be sent to the
  819. // server regardless of whether the field is empty or not. This may be
  820. // used to include empty fields in Patch requests.
  821. ForceSendFields []string `json:"-"`
  822. // NullFields is a list of field names (e.g. "Url") to include in API
  823. // requests with the JSON null value. By default, fields with empty
  824. // values are omitted from API requests. However, any field with an
  825. // empty value appearing in NullFields will be sent to the server as
  826. // null. It is an error if a field in this list has a non-empty value.
  827. // This may be used to include null fields in Patch requests.
  828. NullFields []string `json:"-"`
  829. }
  830. func (s *ActivityObjectAttachmentsPreviewThumbnails) MarshalJSON() ([]byte, error) {
  831. type NoMethod ActivityObjectAttachmentsPreviewThumbnails
  832. raw := NoMethod(*s)
  833. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  834. }
  835. type ActivityObjectAttachmentsThumbnails struct {
  836. // Description: Potential name of the thumbnail.
  837. Description string `json:"description,omitempty"`
  838. // Image: Image resource.
  839. Image *ActivityObjectAttachmentsThumbnailsImage `json:"image,omitempty"`
  840. // Url: URL of the webpage containing the image.
  841. Url string `json:"url,omitempty"`
  842. // ForceSendFields is a list of field names (e.g. "Description") to
  843. // unconditionally include in API requests. By default, fields with
  844. // empty values are omitted from API requests. However, any non-pointer,
  845. // non-interface field appearing in ForceSendFields will be sent to the
  846. // server regardless of whether the field is empty or not. This may be
  847. // used to include empty fields in Patch requests.
  848. ForceSendFields []string `json:"-"`
  849. // NullFields is a list of field names (e.g. "Description") to include
  850. // in API requests with the JSON null value. By default, fields with
  851. // empty values are omitted from API requests. However, any field with
  852. // an empty value appearing in NullFields will be sent to the server as
  853. // null. It is an error if a field in this list has a non-empty value.
  854. // This may be used to include null fields in Patch requests.
  855. NullFields []string `json:"-"`
  856. }
  857. func (s *ActivityObjectAttachmentsThumbnails) MarshalJSON() ([]byte, error) {
  858. type NoMethod ActivityObjectAttachmentsThumbnails
  859. raw := NoMethod(*s)
  860. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  861. }
  862. // ActivityObjectAttachmentsThumbnailsImage: Image resource.
  863. type ActivityObjectAttachmentsThumbnailsImage struct {
  864. // Height: The height, in pixels, of the linked resource.
  865. Height int64 `json:"height,omitempty"`
  866. // Type: Media type of the link.
  867. Type string `json:"type,omitempty"`
  868. // Url: Image url.
  869. Url string `json:"url,omitempty"`
  870. // Width: The width, in pixels, of the linked resource.
  871. Width int64 `json:"width,omitempty"`
  872. // ForceSendFields is a list of field names (e.g. "Height") to
  873. // unconditionally include in API requests. By default, fields with
  874. // empty values are omitted from API requests. However, any non-pointer,
  875. // non-interface field appearing in ForceSendFields will be sent to the
  876. // server regardless of whether the field is empty or not. This may be
  877. // used to include empty fields in Patch requests.
  878. ForceSendFields []string `json:"-"`
  879. // NullFields is a list of field names (e.g. "Height") to include in API
  880. // requests with the JSON null value. By default, fields with empty
  881. // values are omitted from API requests. However, any field with an
  882. // empty value appearing in NullFields will be sent to the server as
  883. // null. It is an error if a field in this list has a non-empty value.
  884. // This may be used to include null fields in Patch requests.
  885. NullFields []string `json:"-"`
  886. }
  887. func (s *ActivityObjectAttachmentsThumbnailsImage) MarshalJSON() ([]byte, error) {
  888. type NoMethod ActivityObjectAttachmentsThumbnailsImage
  889. raw := NoMethod(*s)
  890. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  891. }
  892. // ActivityObjectPlusoners: People who +1'd this activity.
  893. type ActivityObjectPlusoners struct {
  894. // SelfLink: The URL for the collection of people who +1'd this
  895. // activity.
  896. SelfLink string `json:"selfLink,omitempty"`
  897. // TotalItems: Total number of people who +1'd this activity.
  898. TotalItems int64 `json:"totalItems,omitempty"`
  899. // ForceSendFields is a list of field names (e.g. "SelfLink") to
  900. // unconditionally include in API requests. By default, fields with
  901. // empty values are omitted from API requests. However, any non-pointer,
  902. // non-interface field appearing in ForceSendFields will be sent to the
  903. // server regardless of whether the field is empty or not. This may be
  904. // used to include empty fields in Patch requests.
  905. ForceSendFields []string `json:"-"`
  906. // NullFields is a list of field names (e.g. "SelfLink") to include in
  907. // API requests with the JSON null value. By default, fields with empty
  908. // values are omitted from API requests. However, any field with an
  909. // empty value appearing in NullFields will be sent to the server as
  910. // null. It is an error if a field in this list has a non-empty value.
  911. // This may be used to include null fields in Patch requests.
  912. NullFields []string `json:"-"`
  913. }
  914. func (s *ActivityObjectPlusoners) MarshalJSON() ([]byte, error) {
  915. type NoMethod ActivityObjectPlusoners
  916. raw := NoMethod(*s)
  917. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  918. }
  919. // ActivityObjectReplies: Comments in reply to this activity.
  920. type ActivityObjectReplies struct {
  921. // SelfLink: The URL for the collection of comments in reply to this
  922. // activity.
  923. SelfLink string `json:"selfLink,omitempty"`
  924. // TotalItems: Total number of comments on this activity.
  925. TotalItems int64 `json:"totalItems,omitempty"`
  926. // ForceSendFields is a list of field names (e.g. "SelfLink") to
  927. // unconditionally include in API requests. By default, fields with
  928. // empty values are omitted from API requests. However, any non-pointer,
  929. // non-interface field appearing in ForceSendFields will be sent to the
  930. // server regardless of whether the field is empty or not. This may be
  931. // used to include empty fields in Patch requests.
  932. ForceSendFields []string `json:"-"`
  933. // NullFields is a list of field names (e.g. "SelfLink") to include in
  934. // API requests with the JSON null value. By default, fields with empty
  935. // values are omitted from API requests. However, any field with an
  936. // empty value appearing in NullFields will be sent to the server as
  937. // null. It is an error if a field in this list has a non-empty value.
  938. // This may be used to include null fields in Patch requests.
  939. NullFields []string `json:"-"`
  940. }
  941. func (s *ActivityObjectReplies) MarshalJSON() ([]byte, error) {
  942. type NoMethod ActivityObjectReplies
  943. raw := NoMethod(*s)
  944. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  945. }
  946. // ActivityObjectResharers: People who reshared this activity.
  947. type ActivityObjectResharers struct {
  948. // SelfLink: The URL for the collection of resharers.
  949. SelfLink string `json:"selfLink,omitempty"`
  950. // TotalItems: Total number of people who reshared this activity.
  951. TotalItems int64 `json:"totalItems,omitempty"`
  952. // ForceSendFields is a list of field names (e.g. "SelfLink") to
  953. // unconditionally include in API requests. By default, fields with
  954. // empty values are omitted from API requests. However, any non-pointer,
  955. // non-interface field appearing in ForceSendFields will be sent to the
  956. // server regardless of whether the field is empty or not. This may be
  957. // used to include empty fields in Patch requests.
  958. ForceSendFields []string `json:"-"`
  959. // NullFields is a list of field names (e.g. "SelfLink") to include in
  960. // API requests with the JSON null value. By default, fields with empty
  961. // values are omitted from API requests. However, any field with an
  962. // empty value appearing in NullFields will be sent to the server as
  963. // null. It is an error if a field in this list has a non-empty value.
  964. // This may be used to include null fields in Patch requests.
  965. NullFields []string `json:"-"`
  966. }
  967. func (s *ActivityObjectResharers) MarshalJSON() ([]byte, error) {
  968. type NoMethod ActivityObjectResharers
  969. raw := NoMethod(*s)
  970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  971. }
  972. // ActivityObjectStatusForViewer: Status of the activity as seen by the
  973. // viewer.
  974. type ActivityObjectStatusForViewer struct {
  975. // CanComment: Whether the viewer can comment on the activity.
  976. CanComment bool `json:"canComment,omitempty"`
  977. // CanPlusone: Whether the viewer can +1 the activity.
  978. CanPlusone bool `json:"canPlusone,omitempty"`
  979. // CanUpdate: Whether the viewer can edit or delete the activity.
  980. CanUpdate bool `json:"canUpdate,omitempty"`
  981. // IsPlusOned: Whether the viewer has +1'd the activity.
  982. IsPlusOned bool `json:"isPlusOned,omitempty"`
  983. // ResharingDisabled: Whether reshares are disabled for the activity.
  984. ResharingDisabled bool `json:"resharingDisabled,omitempty"`
  985. // ForceSendFields is a list of field names (e.g. "CanComment") to
  986. // unconditionally include in API requests. By default, fields with
  987. // empty values are omitted from API requests. However, any non-pointer,
  988. // non-interface field appearing in ForceSendFields will be sent to the
  989. // server regardless of whether the field is empty or not. This may be
  990. // used to include empty fields in Patch requests.
  991. ForceSendFields []string `json:"-"`
  992. // NullFields is a list of field names (e.g. "CanComment") to include in
  993. // API requests with the JSON null value. By default, fields with empty
  994. // values are omitted from API requests. However, any field with an
  995. // empty value appearing in NullFields will be sent to the server as
  996. // null. It is an error if a field in this list has a non-empty value.
  997. // This may be used to include null fields in Patch requests.
  998. NullFields []string `json:"-"`
  999. }
  1000. func (s *ActivityObjectStatusForViewer) MarshalJSON() ([]byte, error) {
  1001. type NoMethod ActivityObjectStatusForViewer
  1002. raw := NoMethod(*s)
  1003. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1004. }
  1005. // ActivityProvider: The service provider that initially published this
  1006. // activity.
  1007. type ActivityProvider struct {
  1008. // Title: Name of the service provider.
  1009. Title string `json:"title,omitempty"`
  1010. // ForceSendFields is a list of field names (e.g. "Title") to
  1011. // unconditionally include in API requests. By default, fields with
  1012. // empty values are omitted from API requests. However, any non-pointer,
  1013. // non-interface field appearing in ForceSendFields will be sent to the
  1014. // server regardless of whether the field is empty or not. This may be
  1015. // used to include empty fields in Patch requests.
  1016. ForceSendFields []string `json:"-"`
  1017. // NullFields is a list of field names (e.g. "Title") to include in API
  1018. // requests with the JSON null value. By default, fields with empty
  1019. // values are omitted from API requests. However, any field with an
  1020. // empty value appearing in NullFields will be sent to the server as
  1021. // null. It is an error if a field in this list has a non-empty value.
  1022. // This may be used to include null fields in Patch requests.
  1023. NullFields []string `json:"-"`
  1024. }
  1025. func (s *ActivityProvider) MarshalJSON() ([]byte, error) {
  1026. type NoMethod ActivityProvider
  1027. raw := NoMethod(*s)
  1028. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1029. }
  1030. type ActivityFeed struct {
  1031. // Etag: ETag of this response for caching purposes.
  1032. Etag string `json:"etag,omitempty"`
  1033. // Id: The ID of this collection of activities. Deprecated.
  1034. Id string `json:"id,omitempty"`
  1035. // Items: The activities in this page of results.
  1036. Items []*Activity `json:"items,omitempty"`
  1037. // Kind: Identifies this resource as a collection of activities. Value:
  1038. // "plus#activityFeed".
  1039. Kind string `json:"kind,omitempty"`
  1040. // NextLink: Link to the next page of activities.
  1041. NextLink string `json:"nextLink,omitempty"`
  1042. // NextPageToken: The continuation token, which is used to page through
  1043. // large result sets. Provide this value in a subsequent request to
  1044. // return the next page of results.
  1045. NextPageToken string `json:"nextPageToken,omitempty"`
  1046. // SelfLink: Link to this activity resource.
  1047. SelfLink string `json:"selfLink,omitempty"`
  1048. // Title: The title of this collection of activities, which is a
  1049. // truncated portion of the content.
  1050. Title string `json:"title,omitempty"`
  1051. // Updated: The time at which this collection of activities was last
  1052. // updated. Formatted as an RFC 3339 timestamp.
  1053. Updated string `json:"updated,omitempty"`
  1054. // ServerResponse contains the HTTP response code and headers from the
  1055. // server.
  1056. googleapi.ServerResponse `json:"-"`
  1057. // ForceSendFields is a list of field names (e.g. "Etag") to
  1058. // unconditionally include in API requests. By default, fields with
  1059. // empty values are omitted from API requests. However, any non-pointer,
  1060. // non-interface field appearing in ForceSendFields will be sent to the
  1061. // server regardless of whether the field is empty or not. This may be
  1062. // used to include empty fields in Patch requests.
  1063. ForceSendFields []string `json:"-"`
  1064. // NullFields is a list of field names (e.g. "Etag") to include in API
  1065. // requests with the JSON null value. By default, fields with empty
  1066. // values are omitted from API requests. However, any field with an
  1067. // empty value appearing in NullFields will be sent to the server as
  1068. // null. It is an error if a field in this list has a non-empty value.
  1069. // This may be used to include null fields in Patch requests.
  1070. NullFields []string `json:"-"`
  1071. }
  1072. func (s *ActivityFeed) MarshalJSON() ([]byte, error) {
  1073. type NoMethod ActivityFeed
  1074. raw := NoMethod(*s)
  1075. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1076. }
  1077. type Audience struct {
  1078. // Etag: ETag of this response for caching purposes.
  1079. Etag string `json:"etag,omitempty"`
  1080. // Item: The access control list entry.
  1081. Item *PlusDomainsAclentryResource `json:"item,omitempty"`
  1082. // Kind: Identifies this resource as an audience. Value:
  1083. // "plus#audience".
  1084. Kind string `json:"kind,omitempty"`
  1085. // MemberCount: The number of people in this circle. This only applies
  1086. // if entity_type is CIRCLE.
  1087. MemberCount int64 `json:"memberCount,omitempty"`
  1088. // Visibility: The circle members' visibility as chosen by the owner of
  1089. // the circle. This only applies for items with "item.type" equals
  1090. // "circle". Possible values are:
  1091. // - "public" - Members are visible to the public.
  1092. // - "limited" - Members are visible to a limited audience.
  1093. // - "private" - Members are visible to the owner only.
  1094. Visibility string `json:"visibility,omitempty"`
  1095. // ForceSendFields is a list of field names (e.g. "Etag") to
  1096. // unconditionally include in API requests. By default, fields with
  1097. // empty values are omitted from API requests. However, any non-pointer,
  1098. // non-interface field appearing in ForceSendFields will be sent to the
  1099. // server regardless of whether the field is empty or not. This may be
  1100. // used to include empty fields in Patch requests.
  1101. ForceSendFields []string `json:"-"`
  1102. // NullFields is a list of field names (e.g. "Etag") to include in API
  1103. // requests with the JSON null value. By default, fields with empty
  1104. // values are omitted from API requests. However, any field with an
  1105. // empty value appearing in NullFields will be sent to the server as
  1106. // null. It is an error if a field in this list has a non-empty value.
  1107. // This may be used to include null fields in Patch requests.
  1108. NullFields []string `json:"-"`
  1109. }
  1110. func (s *Audience) MarshalJSON() ([]byte, error) {
  1111. type NoMethod Audience
  1112. raw := NoMethod(*s)
  1113. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1114. }
  1115. type AudiencesFeed struct {
  1116. // Etag: ETag of this response for caching purposes.
  1117. Etag string `json:"etag,omitempty"`
  1118. // Items: The audiences in this result.
  1119. Items []*Audience `json:"items,omitempty"`
  1120. // Kind: Identifies this resource as a collection of audiences. Value:
  1121. // "plus#audienceFeed".
  1122. Kind string `json:"kind,omitempty"`
  1123. // NextPageToken: The continuation token, which is used to page through
  1124. // large result sets. Provide this value in a subsequent request to
  1125. // return the next page of results.
  1126. NextPageToken string `json:"nextPageToken,omitempty"`
  1127. // TotalItems: The total number of ACL entries. The number of entries in
  1128. // this response may be smaller due to paging.
  1129. TotalItems int64 `json:"totalItems,omitempty"`
  1130. // ServerResponse contains the HTTP response code and headers from the
  1131. // server.
  1132. googleapi.ServerResponse `json:"-"`
  1133. // ForceSendFields is a list of field names (e.g. "Etag") to
  1134. // unconditionally include in API requests. By default, fields with
  1135. // empty values are omitted from API requests. However, any non-pointer,
  1136. // non-interface field appearing in ForceSendFields will be sent to the
  1137. // server regardless of whether the field is empty or not. This may be
  1138. // used to include empty fields in Patch requests.
  1139. ForceSendFields []string `json:"-"`
  1140. // NullFields is a list of field names (e.g. "Etag") to include in API
  1141. // requests with the JSON null value. By default, fields with empty
  1142. // values are omitted from API requests. However, any field with an
  1143. // empty value appearing in NullFields will be sent to the server as
  1144. // null. It is an error if a field in this list has a non-empty value.
  1145. // This may be used to include null fields in Patch requests.
  1146. NullFields []string `json:"-"`
  1147. }
  1148. func (s *AudiencesFeed) MarshalJSON() ([]byte, error) {
  1149. type NoMethod AudiencesFeed
  1150. raw := NoMethod(*s)
  1151. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1152. }
  1153. type Circle struct {
  1154. // Description: The description of this circle.
  1155. Description string `json:"description,omitempty"`
  1156. // DisplayName: The circle name.
  1157. DisplayName string `json:"displayName,omitempty"`
  1158. // Etag: ETag of this response for caching purposes.
  1159. Etag string `json:"etag,omitempty"`
  1160. // Id: The ID of the circle.
  1161. Id string `json:"id,omitempty"`
  1162. // Kind: Identifies this resource as a circle. Value: "plus#circle".
  1163. Kind string `json:"kind,omitempty"`
  1164. // People: The people in this circle.
  1165. People *CirclePeople `json:"people,omitempty"`
  1166. // SelfLink: Link to this circle resource
  1167. SelfLink string `json:"selfLink,omitempty"`
  1168. // ServerResponse contains the HTTP response code and headers from the
  1169. // server.
  1170. googleapi.ServerResponse `json:"-"`
  1171. // ForceSendFields is a list of field names (e.g. "Description") to
  1172. // unconditionally include in API requests. By default, fields with
  1173. // empty values are omitted from API requests. However, any non-pointer,
  1174. // non-interface field appearing in ForceSendFields will be sent to the
  1175. // server regardless of whether the field is empty or not. This may be
  1176. // used to include empty fields in Patch requests.
  1177. ForceSendFields []string `json:"-"`
  1178. // NullFields is a list of field names (e.g. "Description") to include
  1179. // in API requests with the JSON null value. By default, fields with
  1180. // empty values are omitted from API requests. However, any field with
  1181. // an empty value appearing in NullFields will be sent to the server as
  1182. // null. It is an error if a field in this list has a non-empty value.
  1183. // This may be used to include null fields in Patch requests.
  1184. NullFields []string `json:"-"`
  1185. }
  1186. func (s *Circle) MarshalJSON() ([]byte, error) {
  1187. type NoMethod Circle
  1188. raw := NoMethod(*s)
  1189. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1190. }
  1191. // CirclePeople: The people in this circle.
  1192. type CirclePeople struct {
  1193. // TotalItems: The total number of people in this circle.
  1194. TotalItems int64 `json:"totalItems,omitempty"`
  1195. // ForceSendFields is a list of field names (e.g. "TotalItems") to
  1196. // unconditionally include in API requests. By default, fields with
  1197. // empty values are omitted from API requests. However, any non-pointer,
  1198. // non-interface field appearing in ForceSendFields will be sent to the
  1199. // server regardless of whether the field is empty or not. This may be
  1200. // used to include empty fields in Patch requests.
  1201. ForceSendFields []string `json:"-"`
  1202. // NullFields is a list of field names (e.g. "TotalItems") to include in
  1203. // API requests with the JSON null value. By default, fields with empty
  1204. // values are omitted from API requests. However, any field with an
  1205. // empty value appearing in NullFields will be sent to the server as
  1206. // null. It is an error if a field in this list has a non-empty value.
  1207. // This may be used to include null fields in Patch requests.
  1208. NullFields []string `json:"-"`
  1209. }
  1210. func (s *CirclePeople) MarshalJSON() ([]byte, error) {
  1211. type NoMethod CirclePeople
  1212. raw := NoMethod(*s)
  1213. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1214. }
  1215. type CircleFeed struct {
  1216. // Etag: ETag of this response for caching purposes.
  1217. Etag string `json:"etag,omitempty"`
  1218. // Items: The circles in this page of results.
  1219. Items []*Circle `json:"items,omitempty"`
  1220. // Kind: Identifies this resource as a collection of circles. Value:
  1221. // "plus#circleFeed".
  1222. Kind string `json:"kind,omitempty"`
  1223. // NextLink: Link to the next page of circles.
  1224. NextLink string `json:"nextLink,omitempty"`
  1225. // NextPageToken: The continuation token, which is used to page through
  1226. // large result sets. Provide this value in a subsequent request to
  1227. // return the next page of results.
  1228. NextPageToken string `json:"nextPageToken,omitempty"`
  1229. // SelfLink: Link to this page of circles.
  1230. SelfLink string `json:"selfLink,omitempty"`
  1231. // Title: The title of this list of resources.
  1232. Title string `json:"title,omitempty"`
  1233. // TotalItems: The total number of circles. The number of circles in
  1234. // this response may be smaller due to paging.
  1235. TotalItems int64 `json:"totalItems,omitempty"`
  1236. // ServerResponse contains the HTTP response code and headers from the
  1237. // server.
  1238. googleapi.ServerResponse `json:"-"`
  1239. // ForceSendFields is a list of field names (e.g. "Etag") to
  1240. // unconditionally include in API requests. By default, fields with
  1241. // empty values are omitted from API requests. However, any non-pointer,
  1242. // non-interface field appearing in ForceSendFields will be sent to the
  1243. // server regardless of whether the field is empty or not. This may be
  1244. // used to include empty fields in Patch requests.
  1245. ForceSendFields []string `json:"-"`
  1246. // NullFields is a list of field names (e.g. "Etag") to include in API
  1247. // requests with the JSON null value. By default, fields with empty
  1248. // values are omitted from API requests. However, any field with an
  1249. // empty value appearing in NullFields will be sent to the server as
  1250. // null. It is an error if a field in this list has a non-empty value.
  1251. // This may be used to include null fields in Patch requests.
  1252. NullFields []string `json:"-"`
  1253. }
  1254. func (s *CircleFeed) MarshalJSON() ([]byte, error) {
  1255. type NoMethod CircleFeed
  1256. raw := NoMethod(*s)
  1257. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1258. }
  1259. type Comment struct {
  1260. // Actor: The person who posted this comment.
  1261. Actor *CommentActor `json:"actor,omitempty"`
  1262. // Etag: ETag of this response for caching purposes.
  1263. Etag string `json:"etag,omitempty"`
  1264. // Id: The ID of this comment.
  1265. Id string `json:"id,omitempty"`
  1266. // InReplyTo: The activity this comment replied to.
  1267. InReplyTo []*CommentInReplyTo `json:"inReplyTo,omitempty"`
  1268. // Kind: Identifies this resource as a comment. Value: "plus#comment".
  1269. Kind string `json:"kind,omitempty"`
  1270. // Object: The object of this comment.
  1271. Object *CommentObject `json:"object,omitempty"`
  1272. // Plusoners: People who +1'd this comment.
  1273. Plusoners *CommentPlusoners `json:"plusoners,omitempty"`
  1274. // Published: The time at which this comment was initially published.
  1275. // Formatted as an RFC 3339 timestamp.
  1276. Published string `json:"published,omitempty"`
  1277. // SelfLink: Link to this comment resource.
  1278. SelfLink string `json:"selfLink,omitempty"`
  1279. // Updated: The time at which this comment was last updated. Formatted
  1280. // as an RFC 3339 timestamp.
  1281. Updated string `json:"updated,omitempty"`
  1282. // Verb: This comment's verb, indicating what action was performed.
  1283. // Possible values are:
  1284. // - "post" - Publish content to the stream.
  1285. Verb string `json:"verb,omitempty"`
  1286. // ServerResponse contains the HTTP response code and headers from the
  1287. // server.
  1288. googleapi.ServerResponse `json:"-"`
  1289. // ForceSendFields is a list of field names (e.g. "Actor") to
  1290. // unconditionally include in API requests. By default, fields with
  1291. // empty values are omitted from API requests. However, any non-pointer,
  1292. // non-interface field appearing in ForceSendFields will be sent to the
  1293. // server regardless of whether the field is empty or not. This may be
  1294. // used to include empty fields in Patch requests.
  1295. ForceSendFields []string `json:"-"`
  1296. // NullFields is a list of field names (e.g. "Actor") to include in API
  1297. // requests with the JSON null value. By default, fields with empty
  1298. // values are omitted from API requests. However, any field with an
  1299. // empty value appearing in NullFields will be sent to the server as
  1300. // null. It is an error if a field in this list has a non-empty value.
  1301. // This may be used to include null fields in Patch requests.
  1302. NullFields []string `json:"-"`
  1303. }
  1304. func (s *Comment) MarshalJSON() ([]byte, error) {
  1305. type NoMethod Comment
  1306. raw := NoMethod(*s)
  1307. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1308. }
  1309. // CommentActor: The person who posted this comment.
  1310. type CommentActor struct {
  1311. // ClientSpecificActorInfo: Actor info specific to particular clients.
  1312. ClientSpecificActorInfo *CommentActorClientSpecificActorInfo `json:"clientSpecificActorInfo,omitempty"`
  1313. // DisplayName: The name of this actor, suitable for display.
  1314. DisplayName string `json:"displayName,omitempty"`
  1315. // Id: The ID of the actor.
  1316. Id string `json:"id,omitempty"`
  1317. // Image: The image representation of this actor.
  1318. Image *CommentActorImage `json:"image,omitempty"`
  1319. // Url: A link to the Person resource for this actor.
  1320. Url string `json:"url,omitempty"`
  1321. // Verification: Verification status of actor.
  1322. Verification *CommentActorVerification `json:"verification,omitempty"`
  1323. // ForceSendFields is a list of field names (e.g.
  1324. // "ClientSpecificActorInfo") to unconditionally include in API
  1325. // requests. By default, fields with empty values are omitted from API
  1326. // requests. However, any non-pointer, non-interface field appearing in
  1327. // ForceSendFields will be sent to the server regardless of whether the
  1328. // field is empty or not. This may be used to include empty fields in
  1329. // Patch requests.
  1330. ForceSendFields []string `json:"-"`
  1331. // NullFields is a list of field names (e.g. "ClientSpecificActorInfo")
  1332. // to include in API requests with the JSON null value. By default,
  1333. // fields with empty values are omitted from API requests. However, any
  1334. // field with an empty value appearing in NullFields will be sent to the
  1335. // server as null. It is an error if a field in this list has a
  1336. // non-empty value. This may be used to include null fields in Patch
  1337. // requests.
  1338. NullFields []string `json:"-"`
  1339. }
  1340. func (s *CommentActor) MarshalJSON() ([]byte, error) {
  1341. type NoMethod CommentActor
  1342. raw := NoMethod(*s)
  1343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1344. }
  1345. // CommentActorClientSpecificActorInfo: Actor info specific to
  1346. // particular clients.
  1347. type CommentActorClientSpecificActorInfo struct {
  1348. // YoutubeActorInfo: Actor info specific to YouTube clients.
  1349. YoutubeActorInfo *CommentActorClientSpecificActorInfoYoutubeActorInfo `json:"youtubeActorInfo,omitempty"`
  1350. // ForceSendFields is a list of field names (e.g. "YoutubeActorInfo") to
  1351. // unconditionally include in API requests. By default, fields with
  1352. // empty values are omitted from API requests. However, any non-pointer,
  1353. // non-interface field appearing in ForceSendFields will be sent to the
  1354. // server regardless of whether the field is empty or not. This may be
  1355. // used to include empty fields in Patch requests.
  1356. ForceSendFields []string `json:"-"`
  1357. // NullFields is a list of field names (e.g. "YoutubeActorInfo") to
  1358. // include in API requests with the JSON null value. By default, fields
  1359. // with empty values are omitted from API requests. However, any field
  1360. // with an empty value appearing in NullFields will be sent to the
  1361. // server as null. It is an error if a field in this list has a
  1362. // non-empty value. This may be used to include null fields in Patch
  1363. // requests.
  1364. NullFields []string `json:"-"`
  1365. }
  1366. func (s *CommentActorClientSpecificActorInfo) MarshalJSON() ([]byte, error) {
  1367. type NoMethod CommentActorClientSpecificActorInfo
  1368. raw := NoMethod(*s)
  1369. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1370. }
  1371. // CommentActorClientSpecificActorInfoYoutubeActorInfo: Actor info
  1372. // specific to YouTube clients.
  1373. type CommentActorClientSpecificActorInfoYoutubeActorInfo struct {
  1374. // ChannelId: ID of the YouTube channel owned by the Actor.
  1375. ChannelId string `json:"channelId,omitempty"`
  1376. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  1377. // unconditionally include in API requests. By default, fields with
  1378. // empty values are omitted from API requests. However, any non-pointer,
  1379. // non-interface field appearing in ForceSendFields will be sent to the
  1380. // server regardless of whether the field is empty or not. This may be
  1381. // used to include empty fields in Patch requests.
  1382. ForceSendFields []string `json:"-"`
  1383. // NullFields is a list of field names (e.g. "ChannelId") to include in
  1384. // API requests with the JSON null value. By default, fields with empty
  1385. // values are omitted from API requests. However, any field with an
  1386. // empty value appearing in NullFields will be sent to the server as
  1387. // null. It is an error if a field in this list has a non-empty value.
  1388. // This may be used to include null fields in Patch requests.
  1389. NullFields []string `json:"-"`
  1390. }
  1391. func (s *CommentActorClientSpecificActorInfoYoutubeActorInfo) MarshalJSON() ([]byte, error) {
  1392. type NoMethod CommentActorClientSpecificActorInfoYoutubeActorInfo
  1393. raw := NoMethod(*s)
  1394. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1395. }
  1396. // CommentActorImage: The image representation of this actor.
  1397. type CommentActorImage struct {
  1398. // Url: The URL of the actor's profile photo. To resize the image and
  1399. // crop it to a square, append the query string ?sz=x, where x is the
  1400. // dimension in pixels of each side.
  1401. Url string `json:"url,omitempty"`
  1402. // ForceSendFields is a list of field names (e.g. "Url") to
  1403. // unconditionally include in API requests. By default, fields with
  1404. // empty values are omitted from API requests. However, any non-pointer,
  1405. // non-interface field appearing in ForceSendFields will be sent to the
  1406. // server regardless of whether the field is empty or not. This may be
  1407. // used to include empty fields in Patch requests.
  1408. ForceSendFields []string `json:"-"`
  1409. // NullFields is a list of field names (e.g. "Url") to include in API
  1410. // requests with the JSON null value. By default, fields with empty
  1411. // values are omitted from API requests. However, any field with an
  1412. // empty value appearing in NullFields will be sent to the server as
  1413. // null. It is an error if a field in this list has a non-empty value.
  1414. // This may be used to include null fields in Patch requests.
  1415. NullFields []string `json:"-"`
  1416. }
  1417. func (s *CommentActorImage) MarshalJSON() ([]byte, error) {
  1418. type NoMethod CommentActorImage
  1419. raw := NoMethod(*s)
  1420. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1421. }
  1422. // CommentActorVerification: Verification status of actor.
  1423. type CommentActorVerification struct {
  1424. // AdHocVerified: Verification for one-time or manual processes.
  1425. AdHocVerified string `json:"adHocVerified,omitempty"`
  1426. // ForceSendFields is a list of field names (e.g. "AdHocVerified") to
  1427. // unconditionally include in API requests. By default, fields with
  1428. // empty values are omitted from API requests. However, any non-pointer,
  1429. // non-interface field appearing in ForceSendFields will be sent to the
  1430. // server regardless of whether the field is empty or not. This may be
  1431. // used to include empty fields in Patch requests.
  1432. ForceSendFields []string `json:"-"`
  1433. // NullFields is a list of field names (e.g. "AdHocVerified") to include
  1434. // in API requests with the JSON null value. By default, fields with
  1435. // empty values are omitted from API requests. However, any field with
  1436. // an empty value appearing in NullFields will be sent to the server as
  1437. // null. It is an error if a field in this list has a non-empty value.
  1438. // This may be used to include null fields in Patch requests.
  1439. NullFields []string `json:"-"`
  1440. }
  1441. func (s *CommentActorVerification) MarshalJSON() ([]byte, error) {
  1442. type NoMethod CommentActorVerification
  1443. raw := NoMethod(*s)
  1444. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1445. }
  1446. type CommentInReplyTo struct {
  1447. // Id: The ID of the activity.
  1448. Id string `json:"id,omitempty"`
  1449. // Url: The URL of the activity.
  1450. Url string `json:"url,omitempty"`
  1451. // ForceSendFields is a list of field names (e.g. "Id") to
  1452. // unconditionally include in API requests. By default, fields with
  1453. // empty values are omitted from API requests. However, any non-pointer,
  1454. // non-interface field appearing in ForceSendFields will be sent to the
  1455. // server regardless of whether the field is empty or not. This may be
  1456. // used to include empty fields in Patch requests.
  1457. ForceSendFields []string `json:"-"`
  1458. // NullFields is a list of field names (e.g. "Id") to include in API
  1459. // requests with the JSON null value. By default, fields with empty
  1460. // values are omitted from API requests. However, any field with an
  1461. // empty value appearing in NullFields will be sent to the server as
  1462. // null. It is an error if a field in this list has a non-empty value.
  1463. // This may be used to include null fields in Patch requests.
  1464. NullFields []string `json:"-"`
  1465. }
  1466. func (s *CommentInReplyTo) MarshalJSON() ([]byte, error) {
  1467. type NoMethod CommentInReplyTo
  1468. raw := NoMethod(*s)
  1469. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1470. }
  1471. // CommentObject: The object of this comment.
  1472. type CommentObject struct {
  1473. // Content: The HTML-formatted content, suitable for display.
  1474. Content string `json:"content,omitempty"`
  1475. // ObjectType: The object type of this comment. Possible values are:
  1476. // - "comment" - A comment in reply to an activity.
  1477. ObjectType string `json:"objectType,omitempty"`
  1478. // OriginalContent: The content (text) as provided by the author, stored
  1479. // without any HTML formatting. When creating or updating a comment,
  1480. // this value must be supplied as plain text in the request.
  1481. OriginalContent string `json:"originalContent,omitempty"`
  1482. // ForceSendFields is a list of field names (e.g. "Content") to
  1483. // unconditionally include in API requests. By default, fields with
  1484. // empty values are omitted from API requests. However, any non-pointer,
  1485. // non-interface field appearing in ForceSendFields will be sent to the
  1486. // server regardless of whether the field is empty or not. This may be
  1487. // used to include empty fields in Patch requests.
  1488. ForceSendFields []string `json:"-"`
  1489. // NullFields is a list of field names (e.g. "Content") to include in
  1490. // API requests with the JSON null value. By default, fields with empty
  1491. // values are omitted from API requests. However, any field with an
  1492. // empty value appearing in NullFields will be sent to the server as
  1493. // null. It is an error if a field in this list has a non-empty value.
  1494. // This may be used to include null fields in Patch requests.
  1495. NullFields []string `json:"-"`
  1496. }
  1497. func (s *CommentObject) MarshalJSON() ([]byte, error) {
  1498. type NoMethod CommentObject
  1499. raw := NoMethod(*s)
  1500. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1501. }
  1502. // CommentPlusoners: People who +1'd this comment.
  1503. type CommentPlusoners struct {
  1504. // TotalItems: Total number of people who +1'd this comment.
  1505. TotalItems int64 `json:"totalItems,omitempty"`
  1506. // ForceSendFields is a list of field names (e.g. "TotalItems") to
  1507. // unconditionally include in API requests. By default, fields with
  1508. // empty values are omitted from API requests. However, any non-pointer,
  1509. // non-interface field appearing in ForceSendFields will be sent to the
  1510. // server regardless of whether the field is empty or not. This may be
  1511. // used to include empty fields in Patch requests.
  1512. ForceSendFields []string `json:"-"`
  1513. // NullFields is a list of field names (e.g. "TotalItems") to include in
  1514. // API requests with the JSON null value. By default, fields with empty
  1515. // values are omitted from API requests. However, any field with an
  1516. // empty value appearing in NullFields will be sent to the server as
  1517. // null. It is an error if a field in this list has a non-empty value.
  1518. // This may be used to include null fields in Patch requests.
  1519. NullFields []string `json:"-"`
  1520. }
  1521. func (s *CommentPlusoners) MarshalJSON() ([]byte, error) {
  1522. type NoMethod CommentPlusoners
  1523. raw := NoMethod(*s)
  1524. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1525. }
  1526. type CommentFeed struct {
  1527. // Etag: ETag of this response for caching purposes.
  1528. Etag string `json:"etag,omitempty"`
  1529. // Id: The ID of this collection of comments.
  1530. Id string `json:"id,omitempty"`
  1531. // Items: The comments in this page of results.
  1532. Items []*Comment `json:"items,omitempty"`
  1533. // Kind: Identifies this resource as a collection of comments. Value:
  1534. // "plus#commentFeed".
  1535. Kind string `json:"kind,omitempty"`
  1536. // NextLink: Link to the next page of activities.
  1537. NextLink string `json:"nextLink,omitempty"`
  1538. // NextPageToken: The continuation token, which is used to page through
  1539. // large result sets. Provide this value in a subsequent request to
  1540. // return the next page of results.
  1541. NextPageToken string `json:"nextPageToken,omitempty"`
  1542. // Title: The title of this collection of comments.
  1543. Title string `json:"title,omitempty"`
  1544. // Updated: The time at which this collection of comments was last
  1545. // updated. Formatted as an RFC 3339 timestamp.
  1546. Updated string `json:"updated,omitempty"`
  1547. // ServerResponse contains the HTTP response code and headers from the
  1548. // server.
  1549. googleapi.ServerResponse `json:"-"`
  1550. // ForceSendFields is a list of field names (e.g. "Etag") to
  1551. // unconditionally include in API requests. By default, fields with
  1552. // empty values are omitted from API requests. However, any non-pointer,
  1553. // non-interface field appearing in ForceSendFields will be sent to the
  1554. // server regardless of whether the field is empty or not. This may be
  1555. // used to include empty fields in Patch requests.
  1556. ForceSendFields []string `json:"-"`
  1557. // NullFields is a list of field names (e.g. "Etag") to include in API
  1558. // requests with the JSON null value. By default, fields with empty
  1559. // values are omitted from API requests. However, any field with an
  1560. // empty value appearing in NullFields will be sent to the server as
  1561. // null. It is an error if a field in this list has a non-empty value.
  1562. // This may be used to include null fields in Patch requests.
  1563. NullFields []string `json:"-"`
  1564. }
  1565. func (s *CommentFeed) MarshalJSON() ([]byte, error) {
  1566. type NoMethod CommentFeed
  1567. raw := NoMethod(*s)
  1568. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1569. }
  1570. type Media struct {
  1571. // Author: The person who uploaded this media.
  1572. Author *MediaAuthor `json:"author,omitempty"`
  1573. // DisplayName: The display name for this media.
  1574. DisplayName string `json:"displayName,omitempty"`
  1575. // Etag: ETag of this response for caching purposes.
  1576. Etag string `json:"etag,omitempty"`
  1577. // Exif: Exif information of the media item.
  1578. Exif *MediaExif `json:"exif,omitempty"`
  1579. // Height: The height in pixels of the original image.
  1580. Height int64 `json:"height,omitempty"`
  1581. // Id: ID of this media, which is generated by the API.
  1582. Id string `json:"id,omitempty"`
  1583. // Kind: The type of resource.
  1584. Kind string `json:"kind,omitempty"`
  1585. // MediaCreatedTime: The time at which this media was originally created
  1586. // in UTC. Formatted as an RFC 3339 timestamp that matches this example:
  1587. // 2010-11-25T14:30:27.655Z
  1588. MediaCreatedTime string `json:"mediaCreatedTime,omitempty"`
  1589. // MediaUrl: The URL of this photo or video's still image.
  1590. MediaUrl string `json:"mediaUrl,omitempty"`
  1591. // Published: The time at which this media was uploaded. Formatted as an
  1592. // RFC 3339 timestamp.
  1593. Published string `json:"published,omitempty"`
  1594. // SizeBytes: The size in bytes of this video.
  1595. SizeBytes int64 `json:"sizeBytes,omitempty,string"`
  1596. // Streams: The list of video streams for this video. There might be
  1597. // several different streams available for a single video, either Flash
  1598. // or MPEG, of various sizes
  1599. Streams []*Videostream `json:"streams,omitempty"`
  1600. // Summary: A description, or caption, for this media.
  1601. Summary string `json:"summary,omitempty"`
  1602. // Updated: The time at which this media was last updated. This includes
  1603. // changes to media metadata. Formatted as an RFC 3339 timestamp.
  1604. Updated string `json:"updated,omitempty"`
  1605. // Url: The URL for the page that hosts this media.
  1606. Url string `json:"url,omitempty"`
  1607. // VideoDuration: The duration in milliseconds of this video.
  1608. VideoDuration int64 `json:"videoDuration,omitempty,string"`
  1609. // VideoStatus: The encoding status of this video. Possible values are:
  1610. //
  1611. // - "UPLOADING" - Not all the video bytes have been received.
  1612. // - "PENDING" - Video not yet processed.
  1613. // - "FAILED" - Video processing failed.
  1614. // - "READY" - A single video stream is playable.
  1615. // - "FINAL" - All video streams are playable.
  1616. VideoStatus string `json:"videoStatus,omitempty"`
  1617. // Width: The width in pixels of the original image.
  1618. Width int64 `json:"width,omitempty"`
  1619. // ServerResponse contains the HTTP response code and headers from the
  1620. // server.
  1621. googleapi.ServerResponse `json:"-"`
  1622. // ForceSendFields is a list of field names (e.g. "Author") to
  1623. // unconditionally include in API requests. By default, fields with
  1624. // empty values are omitted from API requests. However, any non-pointer,
  1625. // non-interface field appearing in ForceSendFields will be sent to the
  1626. // server regardless of whether the field is empty or not. This may be
  1627. // used to include empty fields in Patch requests.
  1628. ForceSendFields []string `json:"-"`
  1629. // NullFields is a list of field names (e.g. "Author") to include in API
  1630. // requests with the JSON null value. By default, fields with empty
  1631. // values are omitted from API requests. However, any field with an
  1632. // empty value appearing in NullFields will be sent to the server as
  1633. // null. It is an error if a field in this list has a non-empty value.
  1634. // This may be used to include null fields in Patch requests.
  1635. NullFields []string `json:"-"`
  1636. }
  1637. func (s *Media) MarshalJSON() ([]byte, error) {
  1638. type NoMethod Media
  1639. raw := NoMethod(*s)
  1640. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1641. }
  1642. // MediaAuthor: The person who uploaded this media.
  1643. type MediaAuthor struct {
  1644. // DisplayName: The author's name.
  1645. DisplayName string `json:"displayName,omitempty"`
  1646. // Id: ID of the author.
  1647. Id string `json:"id,omitempty"`
  1648. // Image: The author's Google profile image.
  1649. Image *MediaAuthorImage `json:"image,omitempty"`
  1650. // Url: A link to the author's Google profile.
  1651. Url string `json:"url,omitempty"`
  1652. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1653. // unconditionally include in API requests. By default, fields with
  1654. // empty values are omitted from API requests. However, any non-pointer,
  1655. // non-interface field appearing in ForceSendFields will be sent to the
  1656. // server regardless of whether the field is empty or not. This may be
  1657. // used to include empty fields in Patch requests.
  1658. ForceSendFields []string `json:"-"`
  1659. // NullFields is a list of field names (e.g. "DisplayName") to include
  1660. // in API requests with the JSON null value. By default, fields with
  1661. // empty values are omitted from API requests. However, any field with
  1662. // an empty value appearing in NullFields will be sent to the server as
  1663. // null. It is an error if a field in this list has a non-empty value.
  1664. // This may be used to include null fields in Patch requests.
  1665. NullFields []string `json:"-"`
  1666. }
  1667. func (s *MediaAuthor) MarshalJSON() ([]byte, error) {
  1668. type NoMethod MediaAuthor
  1669. raw := NoMethod(*s)
  1670. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1671. }
  1672. // MediaAuthorImage: The author's Google profile image.
  1673. type MediaAuthorImage struct {
  1674. // Url: The URL of the author's profile photo. To resize the image and
  1675. // crop it to a square, append the query string ?sz=x, where x is the
  1676. // dimension in pixels of each side.
  1677. Url string `json:"url,omitempty"`
  1678. // ForceSendFields is a list of field names (e.g. "Url") to
  1679. // unconditionally include in API requests. By default, fields with
  1680. // empty values are omitted from API requests. However, any non-pointer,
  1681. // non-interface field appearing in ForceSendFields will be sent to the
  1682. // server regardless of whether the field is empty or not. This may be
  1683. // used to include empty fields in Patch requests.
  1684. ForceSendFields []string `json:"-"`
  1685. // NullFields is a list of field names (e.g. "Url") to include in API
  1686. // requests with the JSON null value. By default, fields with empty
  1687. // values are omitted from API requests. However, any field with an
  1688. // empty value appearing in NullFields will be sent to the server as
  1689. // null. It is an error if a field in this list has a non-empty value.
  1690. // This may be used to include null fields in Patch requests.
  1691. NullFields []string `json:"-"`
  1692. }
  1693. func (s *MediaAuthorImage) MarshalJSON() ([]byte, error) {
  1694. type NoMethod MediaAuthorImage
  1695. raw := NoMethod(*s)
  1696. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1697. }
  1698. // MediaExif: Exif information of the media item.
  1699. type MediaExif struct {
  1700. // Time: The time the media was captured. Formatted as an RFC 3339
  1701. // timestamp.
  1702. Time string `json:"time,omitempty"`
  1703. // ForceSendFields is a list of field names (e.g. "Time") to
  1704. // unconditionally include in API requests. By default, fields with
  1705. // empty values are omitted from API requests. However, any non-pointer,
  1706. // non-interface field appearing in ForceSendFields will be sent to the
  1707. // server regardless of whether the field is empty or not. This may be
  1708. // used to include empty fields in Patch requests.
  1709. ForceSendFields []string `json:"-"`
  1710. // NullFields is a list of field names (e.g. "Time") to include in API
  1711. // requests with the JSON null value. By default, fields with empty
  1712. // values are omitted from API requests. However, any field with an
  1713. // empty value appearing in NullFields will be sent to the server as
  1714. // null. It is an error if a field in this list has a non-empty value.
  1715. // This may be used to include null fields in Patch requests.
  1716. NullFields []string `json:"-"`
  1717. }
  1718. func (s *MediaExif) MarshalJSON() ([]byte, error) {
  1719. type NoMethod MediaExif
  1720. raw := NoMethod(*s)
  1721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1722. }
  1723. type PeopleFeed struct {
  1724. // Etag: ETag of this response for caching purposes.
  1725. Etag string `json:"etag,omitempty"`
  1726. // Items: The people in this page of results. Each item includes the id,
  1727. // displayName, image, and url for the person. To retrieve additional
  1728. // profile data, see the people.get method.
  1729. Items []*Person `json:"items,omitempty"`
  1730. // Kind: Identifies this resource as a collection of people. Value:
  1731. // "plus#peopleFeed".
  1732. Kind string `json:"kind,omitempty"`
  1733. // NextPageToken: The continuation token, which is used to page through
  1734. // large result sets. Provide this value in a subsequent request to
  1735. // return the next page of results.
  1736. NextPageToken string `json:"nextPageToken,omitempty"`
  1737. // SelfLink: Link to this resource.
  1738. SelfLink string `json:"selfLink,omitempty"`
  1739. // Title: The title of this collection of people.
  1740. Title string `json:"title,omitempty"`
  1741. // TotalItems: The total number of people available in this list. The
  1742. // number of people in a response might be smaller due to paging. This
  1743. // might not be set for all collections.
  1744. TotalItems int64 `json:"totalItems,omitempty"`
  1745. // ServerResponse contains the HTTP response code and headers from the
  1746. // server.
  1747. googleapi.ServerResponse `json:"-"`
  1748. // ForceSendFields is a list of field names (e.g. "Etag") to
  1749. // unconditionally include in API requests. By default, fields with
  1750. // empty values are omitted from API requests. However, any non-pointer,
  1751. // non-interface field appearing in ForceSendFields will be sent to the
  1752. // server regardless of whether the field is empty or not. This may be
  1753. // used to include empty fields in Patch requests.
  1754. ForceSendFields []string `json:"-"`
  1755. // NullFields is a list of field names (e.g. "Etag") to include in API
  1756. // requests with the JSON null value. By default, fields with empty
  1757. // values are omitted from API requests. However, any field with an
  1758. // empty value appearing in NullFields will be sent to the server as
  1759. // null. It is an error if a field in this list has a non-empty value.
  1760. // This may be used to include null fields in Patch requests.
  1761. NullFields []string `json:"-"`
  1762. }
  1763. func (s *PeopleFeed) MarshalJSON() ([]byte, error) {
  1764. type NoMethod PeopleFeed
  1765. raw := NoMethod(*s)
  1766. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1767. }
  1768. type Person struct {
  1769. // AboutMe: A short biography for this person.
  1770. AboutMe string `json:"aboutMe,omitempty"`
  1771. // Birthday: The person's date of birth, represented as YYYY-MM-DD.
  1772. Birthday string `json:"birthday,omitempty"`
  1773. // BraggingRights: The "bragging rights" line of this person.
  1774. BraggingRights string `json:"braggingRights,omitempty"`
  1775. // CircledByCount: For followers who are visible, the number of people
  1776. // who have added this person or page to a circle.
  1777. CircledByCount int64 `json:"circledByCount,omitempty"`
  1778. // Cover: The cover photo content.
  1779. Cover *PersonCover `json:"cover,omitempty"`
  1780. // CurrentLocation: (this field is not currently used)
  1781. CurrentLocation string `json:"currentLocation,omitempty"`
  1782. // DisplayName: The name of this person, which is suitable for display.
  1783. DisplayName string `json:"displayName,omitempty"`
  1784. // Domain: The hosted domain name for the user's Google Apps account.
  1785. // For instance, example.com. The plus.profile.emails.read or email
  1786. // scope is needed to get this domain name.
  1787. Domain string `json:"domain,omitempty"`
  1788. // Emails: A list of email addresses that this person has, including
  1789. // their Google account email address, and the public verified email
  1790. // addresses on their Google+ profile. The plus.profile.emails.read
  1791. // scope is needed to retrieve these email addresses, or the email scope
  1792. // can be used to retrieve just the Google account email address.
  1793. Emails []*PersonEmails `json:"emails,omitempty"`
  1794. // Etag: ETag of this response for caching purposes.
  1795. Etag string `json:"etag,omitempty"`
  1796. // Gender: The person's gender. Possible values include, but are not
  1797. // limited to, the following values:
  1798. // - "male" - Male gender.
  1799. // - "female" - Female gender.
  1800. // - "other" - Other.
  1801. Gender string `json:"gender,omitempty"`
  1802. // Id: The ID of this person.
  1803. Id string `json:"id,omitempty"`
  1804. // Image: The representation of the person's profile photo.
  1805. Image *PersonImage `json:"image,omitempty"`
  1806. // IsPlusUser: Whether this user has signed up for Google+.
  1807. IsPlusUser bool `json:"isPlusUser,omitempty"`
  1808. // Kind: Identifies this resource as a person. Value: "plus#person".
  1809. Kind string `json:"kind,omitempty"`
  1810. // Name: An object representation of the individual components of a
  1811. // person's name.
  1812. Name *PersonName `json:"name,omitempty"`
  1813. // Nickname: The nickname of this person.
  1814. Nickname string `json:"nickname,omitempty"`
  1815. // ObjectType: Type of person within Google+. Possible values include,
  1816. // but are not limited to, the following values:
  1817. // - "person" - represents an actual person.
  1818. // - "page" - represents a page.
  1819. ObjectType string `json:"objectType,omitempty"`
  1820. // Occupation: The occupation of this person.
  1821. Occupation string `json:"occupation,omitempty"`
  1822. // Organizations: A list of current or past organizations with which
  1823. // this person is associated.
  1824. Organizations []*PersonOrganizations `json:"organizations,omitempty"`
  1825. // PlacesLived: A list of places where this person has lived.
  1826. PlacesLived []*PersonPlacesLived `json:"placesLived,omitempty"`
  1827. // PlusOneCount: If a Google+ Page, the number of people who have +1'd
  1828. // this page.
  1829. PlusOneCount int64 `json:"plusOneCount,omitempty"`
  1830. // RelationshipStatus: The person's relationship status. Possible values
  1831. // include, but are not limited to, the following values:
  1832. // - "single" - Person is single.
  1833. // - "in_a_relationship" - Person is in a relationship.
  1834. // - "engaged" - Person is engaged.
  1835. // - "married" - Person is married.
  1836. // - "its_complicated" - The relationship is complicated.
  1837. // - "open_relationship" - Person is in an open relationship.
  1838. // - "widowed" - Person is widowed.
  1839. // - "in_domestic_partnership" - Person is in a domestic partnership.
  1840. // - "in_civil_union" - Person is in a civil union.
  1841. RelationshipStatus string `json:"relationshipStatus,omitempty"`
  1842. // Skills: The person's skills.
  1843. Skills string `json:"skills,omitempty"`
  1844. // Tagline: The brief description (tagline) of this person.
  1845. Tagline string `json:"tagline,omitempty"`
  1846. // Url: The URL of this person's profile.
  1847. Url string `json:"url,omitempty"`
  1848. // Urls: A list of URLs for this person.
  1849. Urls []*PersonUrls `json:"urls,omitempty"`
  1850. // Verified: Whether the person or Google+ Page has been verified.
  1851. Verified bool `json:"verified,omitempty"`
  1852. // ServerResponse contains the HTTP response code and headers from the
  1853. // server.
  1854. googleapi.ServerResponse `json:"-"`
  1855. // ForceSendFields is a list of field names (e.g. "AboutMe") to
  1856. // unconditionally include in API requests. By default, fields with
  1857. // empty values are omitted from API requests. However, any non-pointer,
  1858. // non-interface field appearing in ForceSendFields will be sent to the
  1859. // server regardless of whether the field is empty or not. This may be
  1860. // used to include empty fields in Patch requests.
  1861. ForceSendFields []string `json:"-"`
  1862. // NullFields is a list of field names (e.g. "AboutMe") to include in
  1863. // API requests with the JSON null value. By default, fields with empty
  1864. // values are omitted from API requests. However, any field with an
  1865. // empty value appearing in NullFields will be sent to the server as
  1866. // null. It is an error if a field in this list has a non-empty value.
  1867. // This may be used to include null fields in Patch requests.
  1868. NullFields []string `json:"-"`
  1869. }
  1870. func (s *Person) MarshalJSON() ([]byte, error) {
  1871. type NoMethod Person
  1872. raw := NoMethod(*s)
  1873. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1874. }
  1875. // PersonCover: The cover photo content.
  1876. type PersonCover struct {
  1877. // CoverInfo: Extra information about the cover photo.
  1878. CoverInfo *PersonCoverCoverInfo `json:"coverInfo,omitempty"`
  1879. // CoverPhoto: The person's primary cover image.
  1880. CoverPhoto *PersonCoverCoverPhoto `json:"coverPhoto,omitempty"`
  1881. // Layout: The layout of the cover art. Possible values include, but are
  1882. // not limited to, the following values:
  1883. // - "banner" - One large image banner.
  1884. Layout string `json:"layout,omitempty"`
  1885. // ForceSendFields is a list of field names (e.g. "CoverInfo") to
  1886. // unconditionally include in API requests. By default, fields with
  1887. // empty values are omitted from API requests. However, any non-pointer,
  1888. // non-interface field appearing in ForceSendFields will be sent to the
  1889. // server regardless of whether the field is empty or not. This may be
  1890. // used to include empty fields in Patch requests.
  1891. ForceSendFields []string `json:"-"`
  1892. // NullFields is a list of field names (e.g. "CoverInfo") to include in
  1893. // API requests with the JSON null value. By default, fields with empty
  1894. // values are omitted from API requests. However, any field with an
  1895. // empty value appearing in NullFields will be sent to the server as
  1896. // null. It is an error if a field in this list has a non-empty value.
  1897. // This may be used to include null fields in Patch requests.
  1898. NullFields []string `json:"-"`
  1899. }
  1900. func (s *PersonCover) MarshalJSON() ([]byte, error) {
  1901. type NoMethod PersonCover
  1902. raw := NoMethod(*s)
  1903. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1904. }
  1905. // PersonCoverCoverInfo: Extra information about the cover photo.
  1906. type PersonCoverCoverInfo struct {
  1907. // LeftImageOffset: The difference between the left position of the
  1908. // cover image and the actual displayed cover image. Only valid for
  1909. // banner layout.
  1910. LeftImageOffset int64 `json:"leftImageOffset,omitempty"`
  1911. // TopImageOffset: The difference between the top position of the cover
  1912. // image and the actual displayed cover image. Only valid for banner
  1913. // layout.
  1914. TopImageOffset int64 `json:"topImageOffset,omitempty"`
  1915. // ForceSendFields is a list of field names (e.g. "LeftImageOffset") to
  1916. // unconditionally include in API requests. By default, fields with
  1917. // empty values are omitted from API requests. However, any non-pointer,
  1918. // non-interface field appearing in ForceSendFields will be sent to the
  1919. // server regardless of whether the field is empty or not. This may be
  1920. // used to include empty fields in Patch requests.
  1921. ForceSendFields []string `json:"-"`
  1922. // NullFields is a list of field names (e.g. "LeftImageOffset") to
  1923. // include in API requests with the JSON null value. By default, fields
  1924. // with empty values are omitted from API requests. However, any field
  1925. // with an empty value appearing in NullFields will be sent to the
  1926. // server as null. It is an error if a field in this list has a
  1927. // non-empty value. This may be used to include null fields in Patch
  1928. // requests.
  1929. NullFields []string `json:"-"`
  1930. }
  1931. func (s *PersonCoverCoverInfo) MarshalJSON() ([]byte, error) {
  1932. type NoMethod PersonCoverCoverInfo
  1933. raw := NoMethod(*s)
  1934. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1935. }
  1936. // PersonCoverCoverPhoto: The person's primary cover image.
  1937. type PersonCoverCoverPhoto struct {
  1938. // Height: The height of the image.
  1939. Height int64 `json:"height,omitempty"`
  1940. // Url: The URL of the image.
  1941. Url string `json:"url,omitempty"`
  1942. // Width: The width of the image.
  1943. Width int64 `json:"width,omitempty"`
  1944. // ForceSendFields is a list of field names (e.g. "Height") to
  1945. // unconditionally include in API requests. By default, fields with
  1946. // empty values are omitted from API requests. However, any non-pointer,
  1947. // non-interface field appearing in ForceSendFields will be sent to the
  1948. // server regardless of whether the field is empty or not. This may be
  1949. // used to include empty fields in Patch requests.
  1950. ForceSendFields []string `json:"-"`
  1951. // NullFields is a list of field names (e.g. "Height") to include in API
  1952. // requests with the JSON null value. By default, fields with empty
  1953. // values are omitted from API requests. However, any field with an
  1954. // empty value appearing in NullFields will be sent to the server as
  1955. // null. It is an error if a field in this list has a non-empty value.
  1956. // This may be used to include null fields in Patch requests.
  1957. NullFields []string `json:"-"`
  1958. }
  1959. func (s *PersonCoverCoverPhoto) MarshalJSON() ([]byte, error) {
  1960. type NoMethod PersonCoverCoverPhoto
  1961. raw := NoMethod(*s)
  1962. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1963. }
  1964. type PersonEmails struct {
  1965. // Type: The type of address. Possible values include, but are not
  1966. // limited to, the following values:
  1967. // - "account" - Google account email address.
  1968. // - "home" - Home email address.
  1969. // - "work" - Work email address.
  1970. // - "other" - Other.
  1971. Type string `json:"type,omitempty"`
  1972. // Value: The email address.
  1973. Value string `json:"value,omitempty"`
  1974. // ForceSendFields is a list of field names (e.g. "Type") to
  1975. // unconditionally include in API requests. By default, fields with
  1976. // empty values are omitted from API requests. However, any non-pointer,
  1977. // non-interface field appearing in ForceSendFields will be sent to the
  1978. // server regardless of whether the field is empty or not. This may be
  1979. // used to include empty fields in Patch requests.
  1980. ForceSendFields []string `json:"-"`
  1981. // NullFields is a list of field names (e.g. "Type") to include in API
  1982. // requests with the JSON null value. By default, fields with empty
  1983. // values are omitted from API requests. However, any field with an
  1984. // empty value appearing in NullFields will be sent to the server as
  1985. // null. It is an error if a field in this list has a non-empty value.
  1986. // This may be used to include null fields in Patch requests.
  1987. NullFields []string `json:"-"`
  1988. }
  1989. func (s *PersonEmails) MarshalJSON() ([]byte, error) {
  1990. type NoMethod PersonEmails
  1991. raw := NoMethod(*s)
  1992. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1993. }
  1994. // PersonImage: The representation of the person's profile photo.
  1995. type PersonImage struct {
  1996. // IsDefault: Whether the person's profile photo is the default one
  1997. IsDefault bool `json:"isDefault,omitempty"`
  1998. // Url: The URL of the person's profile photo. To resize the image and
  1999. // crop it to a square, append the query string ?sz=x, where x is the
  2000. // dimension in pixels of each side.
  2001. Url string `json:"url,omitempty"`
  2002. // ForceSendFields is a list of field names (e.g. "IsDefault") to
  2003. // unconditionally include in API requests. By default, fields with
  2004. // empty values are omitted from API requests. However, any non-pointer,
  2005. // non-interface field appearing in ForceSendFields will be sent to the
  2006. // server regardless of whether the field is empty or not. This may be
  2007. // used to include empty fields in Patch requests.
  2008. ForceSendFields []string `json:"-"`
  2009. // NullFields is a list of field names (e.g. "IsDefault") to include in
  2010. // API requests with the JSON null value. By default, fields with empty
  2011. // values are omitted from API requests. However, any field with an
  2012. // empty value appearing in NullFields will be sent to the server as
  2013. // null. It is an error if a field in this list has a non-empty value.
  2014. // This may be used to include null fields in Patch requests.
  2015. NullFields []string `json:"-"`
  2016. }
  2017. func (s *PersonImage) MarshalJSON() ([]byte, error) {
  2018. type NoMethod PersonImage
  2019. raw := NoMethod(*s)
  2020. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2021. }
  2022. // PersonName: An object representation of the individual components of
  2023. // a person's name.
  2024. type PersonName struct {
  2025. // FamilyName: The family name (last name) of this person.
  2026. FamilyName string `json:"familyName,omitempty"`
  2027. // Formatted: The full name of this person, including middle names,
  2028. // suffixes, etc.
  2029. Formatted string `json:"formatted,omitempty"`
  2030. // GivenName: The given name (first name) of this person.
  2031. GivenName string `json:"givenName,omitempty"`
  2032. // HonorificPrefix: The honorific prefixes (such as "Dr." or "Mrs.") for
  2033. // this person.
  2034. HonorificPrefix string `json:"honorificPrefix,omitempty"`
  2035. // HonorificSuffix: The honorific suffixes (such as "Jr.") for this
  2036. // person.
  2037. HonorificSuffix string `json:"honorificSuffix,omitempty"`
  2038. // MiddleName: The middle name of this person.
  2039. MiddleName string `json:"middleName,omitempty"`
  2040. // ForceSendFields is a list of field names (e.g. "FamilyName") to
  2041. // unconditionally include in API requests. By default, fields with
  2042. // empty values are omitted from API requests. However, any non-pointer,
  2043. // non-interface field appearing in ForceSendFields will be sent to the
  2044. // server regardless of whether the field is empty or not. This may be
  2045. // used to include empty fields in Patch requests.
  2046. ForceSendFields []string `json:"-"`
  2047. // NullFields is a list of field names (e.g. "FamilyName") to include in
  2048. // API requests with the JSON null value. By default, fields with empty
  2049. // values are omitted from API requests. However, any field with an
  2050. // empty value appearing in NullFields will be sent to the server as
  2051. // null. It is an error if a field in this list has a non-empty value.
  2052. // This may be used to include null fields in Patch requests.
  2053. NullFields []string `json:"-"`
  2054. }
  2055. func (s *PersonName) MarshalJSON() ([]byte, error) {
  2056. type NoMethod PersonName
  2057. raw := NoMethod(*s)
  2058. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2059. }
  2060. type PersonOrganizations struct {
  2061. // Department: The department within the organization. Deprecated.
  2062. Department string `json:"department,omitempty"`
  2063. // Description: A short description of the person's role in this
  2064. // organization. Deprecated.
  2065. Description string `json:"description,omitempty"`
  2066. // EndDate: The date that the person left this organization.
  2067. EndDate string `json:"endDate,omitempty"`
  2068. // Location: The location of this organization. Deprecated.
  2069. Location string `json:"location,omitempty"`
  2070. // Name: The name of the organization.
  2071. Name string `json:"name,omitempty"`
  2072. // Primary: If "true", indicates this organization is the person's
  2073. // primary one, which is typically interpreted as the current one.
  2074. Primary bool `json:"primary,omitempty"`
  2075. // StartDate: The date that the person joined this organization.
  2076. StartDate string `json:"startDate,omitempty"`
  2077. // Title: The person's job title or role within the organization.
  2078. Title string `json:"title,omitempty"`
  2079. // Type: The type of organization. Possible values include, but are not
  2080. // limited to, the following values:
  2081. // - "work" - Work.
  2082. // - "school" - School.
  2083. Type string `json:"type,omitempty"`
  2084. // ForceSendFields is a list of field names (e.g. "Department") to
  2085. // unconditionally include in API requests. By default, fields with
  2086. // empty values are omitted from API requests. However, any non-pointer,
  2087. // non-interface field appearing in ForceSendFields will be sent to the
  2088. // server regardless of whether the field is empty or not. This may be
  2089. // used to include empty fields in Patch requests.
  2090. ForceSendFields []string `json:"-"`
  2091. // NullFields is a list of field names (e.g. "Department") to include in
  2092. // API requests with the JSON null value. By default, fields with empty
  2093. // values are omitted from API requests. However, any field with an
  2094. // empty value appearing in NullFields will be sent to the server as
  2095. // null. It is an error if a field in this list has a non-empty value.
  2096. // This may be used to include null fields in Patch requests.
  2097. NullFields []string `json:"-"`
  2098. }
  2099. func (s *PersonOrganizations) MarshalJSON() ([]byte, error) {
  2100. type NoMethod PersonOrganizations
  2101. raw := NoMethod(*s)
  2102. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2103. }
  2104. type PersonPlacesLived struct {
  2105. // Primary: If "true", this place of residence is this person's primary
  2106. // residence.
  2107. Primary bool `json:"primary,omitempty"`
  2108. // Value: A place where this person has lived. For example: "Seattle,
  2109. // WA", "Near Toronto".
  2110. Value string `json:"value,omitempty"`
  2111. // ForceSendFields is a list of field names (e.g. "Primary") to
  2112. // unconditionally include in API requests. By default, fields with
  2113. // empty values are omitted from API requests. However, any non-pointer,
  2114. // non-interface field appearing in ForceSendFields will be sent to the
  2115. // server regardless of whether the field is empty or not. This may be
  2116. // used to include empty fields in Patch requests.
  2117. ForceSendFields []string `json:"-"`
  2118. // NullFields is a list of field names (e.g. "Primary") to include in
  2119. // API requests with the JSON null value. By default, fields with empty
  2120. // values are omitted from API requests. However, any field with an
  2121. // empty value appearing in NullFields will be sent to the server as
  2122. // null. It is an error if a field in this list has a non-empty value.
  2123. // This may be used to include null fields in Patch requests.
  2124. NullFields []string `json:"-"`
  2125. }
  2126. func (s *PersonPlacesLived) MarshalJSON() ([]byte, error) {
  2127. type NoMethod PersonPlacesLived
  2128. raw := NoMethod(*s)
  2129. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2130. }
  2131. type PersonUrls struct {
  2132. // Label: The label of the URL.
  2133. Label string `json:"label,omitempty"`
  2134. // Type: The type of URL. Possible values include, but are not limited
  2135. // to, the following values:
  2136. // - "otherProfile" - URL for another profile.
  2137. // - "contributor" - URL to a site for which this person is a
  2138. // contributor.
  2139. // - "website" - URL for this Google+ Page's primary website.
  2140. // - "other" - Other URL.
  2141. Type string `json:"type,omitempty"`
  2142. // Value: The URL value.
  2143. Value string `json:"value,omitempty"`
  2144. // ForceSendFields is a list of field names (e.g. "Label") to
  2145. // unconditionally include in API requests. By default, fields with
  2146. // empty values are omitted from API requests. However, any non-pointer,
  2147. // non-interface field appearing in ForceSendFields will be sent to the
  2148. // server regardless of whether the field is empty or not. This may be
  2149. // used to include empty fields in Patch requests.
  2150. ForceSendFields []string `json:"-"`
  2151. // NullFields is a list of field names (e.g. "Label") to include in API
  2152. // requests with the JSON null value. By default, fields with empty
  2153. // values are omitted from API requests. However, any field with an
  2154. // empty value appearing in NullFields will be sent to the server as
  2155. // null. It is an error if a field in this list has a non-empty value.
  2156. // This may be used to include null fields in Patch requests.
  2157. NullFields []string `json:"-"`
  2158. }
  2159. func (s *PersonUrls) MarshalJSON() ([]byte, error) {
  2160. type NoMethod PersonUrls
  2161. raw := NoMethod(*s)
  2162. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2163. }
  2164. type Place struct {
  2165. // Address: The physical address of the place.
  2166. Address *PlaceAddress `json:"address,omitempty"`
  2167. // DisplayName: The display name of the place.
  2168. DisplayName string `json:"displayName,omitempty"`
  2169. // Id: The id of the place.
  2170. Id string `json:"id,omitempty"`
  2171. // Kind: Identifies this resource as a place. Value: "plus#place".
  2172. Kind string `json:"kind,omitempty"`
  2173. // Position: The position of the place.
  2174. Position *PlacePosition `json:"position,omitempty"`
  2175. // ForceSendFields is a list of field names (e.g. "Address") to
  2176. // unconditionally include in API requests. By default, fields with
  2177. // empty values are omitted from API requests. However, any non-pointer,
  2178. // non-interface field appearing in ForceSendFields will be sent to the
  2179. // server regardless of whether the field is empty or not. This may be
  2180. // used to include empty fields in Patch requests.
  2181. ForceSendFields []string `json:"-"`
  2182. // NullFields is a list of field names (e.g. "Address") to include in
  2183. // API requests with the JSON null value. By default, fields with empty
  2184. // values are omitted from API requests. However, any field with an
  2185. // empty value appearing in NullFields will be sent to the server as
  2186. // null. It is an error if a field in this list has a non-empty value.
  2187. // This may be used to include null fields in Patch requests.
  2188. NullFields []string `json:"-"`
  2189. }
  2190. func (s *Place) MarshalJSON() ([]byte, error) {
  2191. type NoMethod Place
  2192. raw := NoMethod(*s)
  2193. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2194. }
  2195. // PlaceAddress: The physical address of the place.
  2196. type PlaceAddress struct {
  2197. // Formatted: The formatted address for display.
  2198. Formatted string `json:"formatted,omitempty"`
  2199. // ForceSendFields is a list of field names (e.g. "Formatted") to
  2200. // unconditionally include in API requests. By default, fields with
  2201. // empty values are omitted from API requests. However, any non-pointer,
  2202. // non-interface field appearing in ForceSendFields will be sent to the
  2203. // server regardless of whether the field is empty or not. This may be
  2204. // used to include empty fields in Patch requests.
  2205. ForceSendFields []string `json:"-"`
  2206. // NullFields is a list of field names (e.g. "Formatted") to include in
  2207. // API requests with the JSON null value. By default, fields with empty
  2208. // values are omitted from API requests. However, any field with an
  2209. // empty value appearing in NullFields will be sent to the server as
  2210. // null. It is an error if a field in this list has a non-empty value.
  2211. // This may be used to include null fields in Patch requests.
  2212. NullFields []string `json:"-"`
  2213. }
  2214. func (s *PlaceAddress) MarshalJSON() ([]byte, error) {
  2215. type NoMethod PlaceAddress
  2216. raw := NoMethod(*s)
  2217. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2218. }
  2219. // PlacePosition: The position of the place.
  2220. type PlacePosition struct {
  2221. // Latitude: The latitude of this position.
  2222. Latitude float64 `json:"latitude,omitempty"`
  2223. // Longitude: The longitude of this position.
  2224. Longitude float64 `json:"longitude,omitempty"`
  2225. // ForceSendFields is a list of field names (e.g. "Latitude") to
  2226. // unconditionally include in API requests. By default, fields with
  2227. // empty values are omitted from API requests. However, any non-pointer,
  2228. // non-interface field appearing in ForceSendFields will be sent to the
  2229. // server regardless of whether the field is empty or not. This may be
  2230. // used to include empty fields in Patch requests.
  2231. ForceSendFields []string `json:"-"`
  2232. // NullFields is a list of field names (e.g. "Latitude") to include in
  2233. // API requests with the JSON null value. By default, fields with empty
  2234. // values are omitted from API requests. However, any field with an
  2235. // empty value appearing in NullFields will be sent to the server as
  2236. // null. It is an error if a field in this list has a non-empty value.
  2237. // This may be used to include null fields in Patch requests.
  2238. NullFields []string `json:"-"`
  2239. }
  2240. func (s *PlacePosition) MarshalJSON() ([]byte, error) {
  2241. type NoMethod PlacePosition
  2242. raw := NoMethod(*s)
  2243. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2244. }
  2245. func (s *PlacePosition) UnmarshalJSON(data []byte) error {
  2246. type NoMethod PlacePosition
  2247. var s1 struct {
  2248. Latitude gensupport.JSONFloat64 `json:"latitude"`
  2249. Longitude gensupport.JSONFloat64 `json:"longitude"`
  2250. *NoMethod
  2251. }
  2252. s1.NoMethod = (*NoMethod)(s)
  2253. if err := json.Unmarshal(data, &s1); err != nil {
  2254. return err
  2255. }
  2256. s.Latitude = float64(s1.Latitude)
  2257. s.Longitude = float64(s1.Longitude)
  2258. return nil
  2259. }
  2260. type PlusDomainsAclentryResource struct {
  2261. // DisplayName: A descriptive name for this entry. Suitable for display.
  2262. DisplayName string `json:"displayName,omitempty"`
  2263. // Id: The ID of the entry. For entries of type "person" or "circle",
  2264. // this is the ID of the resource. For other types, this property is not
  2265. // set.
  2266. Id string `json:"id,omitempty"`
  2267. // Type: The type of entry describing to whom access is granted.
  2268. // Possible values are:
  2269. // - "person" - Access to an individual.
  2270. // - "circle" - Access to members of a circle.
  2271. // - "myCircles" - Access to members of all the person's circles.
  2272. // - "extendedCircles" - Access to members of all the person's circles,
  2273. // plus all of the people in their circles.
  2274. // - "domain" - Access to members of the person's Google Apps domain.
  2275. // - "public" - Access to anyone on the web.
  2276. Type string `json:"type,omitempty"`
  2277. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  2278. // unconditionally include in API requests. By default, fields with
  2279. // empty values are omitted from API requests. However, any non-pointer,
  2280. // non-interface field appearing in ForceSendFields will be sent to the
  2281. // server regardless of whether the field is empty or not. This may be
  2282. // used to include empty fields in Patch requests.
  2283. ForceSendFields []string `json:"-"`
  2284. // NullFields is a list of field names (e.g. "DisplayName") to include
  2285. // in API requests with the JSON null value. By default, fields with
  2286. // empty values are omitted from API requests. However, any field with
  2287. // an empty value appearing in NullFields will be sent to the server as
  2288. // null. It is an error if a field in this list has a non-empty value.
  2289. // This may be used to include null fields in Patch requests.
  2290. NullFields []string `json:"-"`
  2291. }
  2292. func (s *PlusDomainsAclentryResource) MarshalJSON() ([]byte, error) {
  2293. type NoMethod PlusDomainsAclentryResource
  2294. raw := NoMethod(*s)
  2295. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2296. }
  2297. type Videostream struct {
  2298. // Height: The height, in pixels, of the video resource.
  2299. Height int64 `json:"height,omitempty"`
  2300. // Type: MIME type of the video stream.
  2301. Type string `json:"type,omitempty"`
  2302. // Url: URL of the video stream.
  2303. Url string `json:"url,omitempty"`
  2304. // Width: The width, in pixels, of the video resource.
  2305. Width int64 `json:"width,omitempty"`
  2306. // ForceSendFields is a list of field names (e.g. "Height") to
  2307. // unconditionally include in API requests. By default, fields with
  2308. // empty values are omitted from API requests. However, any non-pointer,
  2309. // non-interface field appearing in ForceSendFields will be sent to the
  2310. // server regardless of whether the field is empty or not. This may be
  2311. // used to include empty fields in Patch requests.
  2312. ForceSendFields []string `json:"-"`
  2313. // NullFields is a list of field names (e.g. "Height") to include in API
  2314. // requests with the JSON null value. By default, fields with empty
  2315. // values are omitted from API requests. However, any field with an
  2316. // empty value appearing in NullFields will be sent to the server as
  2317. // null. It is an error if a field in this list has a non-empty value.
  2318. // This may be used to include null fields in Patch requests.
  2319. NullFields []string `json:"-"`
  2320. }
  2321. func (s *Videostream) MarshalJSON() ([]byte, error) {
  2322. type NoMethod Videostream
  2323. raw := NoMethod(*s)
  2324. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2325. }
  2326. // method id "plusDomains.activities.get":
  2327. type ActivitiesGetCall struct {
  2328. s *Service
  2329. activityId string
  2330. urlParams_ gensupport.URLParams
  2331. ifNoneMatch_ string
  2332. ctx_ context.Context
  2333. header_ http.Header
  2334. }
  2335. // Get: Get an activity.
  2336. func (r *ActivitiesService) Get(activityId string) *ActivitiesGetCall {
  2337. c := &ActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2338. c.activityId = activityId
  2339. return c
  2340. }
  2341. // Fields allows partial responses to be retrieved. See
  2342. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2343. // for more information.
  2344. func (c *ActivitiesGetCall) Fields(s ...googleapi.Field) *ActivitiesGetCall {
  2345. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2346. return c
  2347. }
  2348. // IfNoneMatch sets the optional parameter which makes the operation
  2349. // fail if the object's ETag matches the given value. This is useful for
  2350. // getting updates only after the object has changed since the last
  2351. // request. Use googleapi.IsNotModified to check whether the response
  2352. // error from Do is the result of In-None-Match.
  2353. func (c *ActivitiesGetCall) IfNoneMatch(entityTag string) *ActivitiesGetCall {
  2354. c.ifNoneMatch_ = entityTag
  2355. return c
  2356. }
  2357. // Context sets the context to be used in this call's Do method. Any
  2358. // pending HTTP request will be aborted if the provided context is
  2359. // canceled.
  2360. func (c *ActivitiesGetCall) Context(ctx context.Context) *ActivitiesGetCall {
  2361. c.ctx_ = ctx
  2362. return c
  2363. }
  2364. // Header returns an http.Header that can be modified by the caller to
  2365. // add HTTP headers to the request.
  2366. func (c *ActivitiesGetCall) Header() http.Header {
  2367. if c.header_ == nil {
  2368. c.header_ = make(http.Header)
  2369. }
  2370. return c.header_
  2371. }
  2372. func (c *ActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
  2373. reqHeaders := make(http.Header)
  2374. for k, v := range c.header_ {
  2375. reqHeaders[k] = v
  2376. }
  2377. reqHeaders.Set("User-Agent", c.s.userAgent())
  2378. if c.ifNoneMatch_ != "" {
  2379. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2380. }
  2381. var body io.Reader = nil
  2382. c.urlParams_.Set("alt", alt)
  2383. c.urlParams_.Set("prettyPrint", "false")
  2384. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}")
  2385. urls += "?" + c.urlParams_.Encode()
  2386. req, err := http.NewRequest("GET", urls, body)
  2387. if err != nil {
  2388. return nil, err
  2389. }
  2390. req.Header = reqHeaders
  2391. googleapi.Expand(req.URL, map[string]string{
  2392. "activityId": c.activityId,
  2393. })
  2394. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2395. }
  2396. // Do executes the "plusDomains.activities.get" call.
  2397. // Exactly one of *Activity or error will be non-nil. Any non-2xx status
  2398. // code is an error. Response headers are in either
  2399. // *Activity.ServerResponse.Header or (if a response was returned at
  2400. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2401. // to check whether the returned error was because
  2402. // http.StatusNotModified was returned.
  2403. func (c *ActivitiesGetCall) Do(opts ...googleapi.CallOption) (*Activity, error) {
  2404. gensupport.SetOptions(c.urlParams_, opts...)
  2405. res, err := c.doRequest("json")
  2406. if res != nil && res.StatusCode == http.StatusNotModified {
  2407. if res.Body != nil {
  2408. res.Body.Close()
  2409. }
  2410. return nil, &googleapi.Error{
  2411. Code: res.StatusCode,
  2412. Header: res.Header,
  2413. }
  2414. }
  2415. if err != nil {
  2416. return nil, err
  2417. }
  2418. defer googleapi.CloseBody(res)
  2419. if err := googleapi.CheckResponse(res); err != nil {
  2420. return nil, err
  2421. }
  2422. ret := &Activity{
  2423. ServerResponse: googleapi.ServerResponse{
  2424. Header: res.Header,
  2425. HTTPStatusCode: res.StatusCode,
  2426. },
  2427. }
  2428. target := &ret
  2429. if err := gensupport.DecodeResponse(target, res); err != nil {
  2430. return nil, err
  2431. }
  2432. return ret, nil
  2433. // {
  2434. // "description": "Get an activity.",
  2435. // "httpMethod": "GET",
  2436. // "id": "plusDomains.activities.get",
  2437. // "parameterOrder": [
  2438. // "activityId"
  2439. // ],
  2440. // "parameters": {
  2441. // "activityId": {
  2442. // "description": "The ID of the activity to get.",
  2443. // "location": "path",
  2444. // "required": true,
  2445. // "type": "string"
  2446. // }
  2447. // },
  2448. // "path": "activities/{activityId}",
  2449. // "response": {
  2450. // "$ref": "Activity"
  2451. // },
  2452. // "scopes": [
  2453. // "https://www.googleapis.com/auth/plus.login",
  2454. // "https://www.googleapis.com/auth/plus.me",
  2455. // "https://www.googleapis.com/auth/plus.stream.read"
  2456. // ]
  2457. // }
  2458. }
  2459. // method id "plusDomains.activities.insert":
  2460. type ActivitiesInsertCall struct {
  2461. s *Service
  2462. userId string
  2463. activity *Activity
  2464. urlParams_ gensupport.URLParams
  2465. ctx_ context.Context
  2466. header_ http.Header
  2467. }
  2468. // Insert: Create a new activity for the authenticated user.
  2469. func (r *ActivitiesService) Insert(userId string, activity *Activity) *ActivitiesInsertCall {
  2470. c := &ActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2471. c.userId = userId
  2472. c.activity = activity
  2473. return c
  2474. }
  2475. // Preview sets the optional parameter "preview": If "true", extract the
  2476. // potential media attachments for a URL. The response will include all
  2477. // possible attachments for a URL, including video, photos, and articles
  2478. // based on the content of the page.
  2479. func (c *ActivitiesInsertCall) Preview(preview bool) *ActivitiesInsertCall {
  2480. c.urlParams_.Set("preview", fmt.Sprint(preview))
  2481. return c
  2482. }
  2483. // Fields allows partial responses to be retrieved. See
  2484. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2485. // for more information.
  2486. func (c *ActivitiesInsertCall) Fields(s ...googleapi.Field) *ActivitiesInsertCall {
  2487. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2488. return c
  2489. }
  2490. // Context sets the context to be used in this call's Do method. Any
  2491. // pending HTTP request will be aborted if the provided context is
  2492. // canceled.
  2493. func (c *ActivitiesInsertCall) Context(ctx context.Context) *ActivitiesInsertCall {
  2494. c.ctx_ = ctx
  2495. return c
  2496. }
  2497. // Header returns an http.Header that can be modified by the caller to
  2498. // add HTTP headers to the request.
  2499. func (c *ActivitiesInsertCall) Header() http.Header {
  2500. if c.header_ == nil {
  2501. c.header_ = make(http.Header)
  2502. }
  2503. return c.header_
  2504. }
  2505. func (c *ActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
  2506. reqHeaders := make(http.Header)
  2507. for k, v := range c.header_ {
  2508. reqHeaders[k] = v
  2509. }
  2510. reqHeaders.Set("User-Agent", c.s.userAgent())
  2511. var body io.Reader = nil
  2512. body, err := googleapi.WithoutDataWrapper.JSONReader(c.activity)
  2513. if err != nil {
  2514. return nil, err
  2515. }
  2516. reqHeaders.Set("Content-Type", "application/json")
  2517. c.urlParams_.Set("alt", alt)
  2518. c.urlParams_.Set("prettyPrint", "false")
  2519. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/activities")
  2520. urls += "?" + c.urlParams_.Encode()
  2521. req, err := http.NewRequest("POST", urls, body)
  2522. if err != nil {
  2523. return nil, err
  2524. }
  2525. req.Header = reqHeaders
  2526. googleapi.Expand(req.URL, map[string]string{
  2527. "userId": c.userId,
  2528. })
  2529. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2530. }
  2531. // Do executes the "plusDomains.activities.insert" call.
  2532. // Exactly one of *Activity or error will be non-nil. Any non-2xx status
  2533. // code is an error. Response headers are in either
  2534. // *Activity.ServerResponse.Header or (if a response was returned at
  2535. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2536. // to check whether the returned error was because
  2537. // http.StatusNotModified was returned.
  2538. func (c *ActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*Activity, error) {
  2539. gensupport.SetOptions(c.urlParams_, opts...)
  2540. res, err := c.doRequest("json")
  2541. if res != nil && res.StatusCode == http.StatusNotModified {
  2542. if res.Body != nil {
  2543. res.Body.Close()
  2544. }
  2545. return nil, &googleapi.Error{
  2546. Code: res.StatusCode,
  2547. Header: res.Header,
  2548. }
  2549. }
  2550. if err != nil {
  2551. return nil, err
  2552. }
  2553. defer googleapi.CloseBody(res)
  2554. if err := googleapi.CheckResponse(res); err != nil {
  2555. return nil, err
  2556. }
  2557. ret := &Activity{
  2558. ServerResponse: googleapi.ServerResponse{
  2559. Header: res.Header,
  2560. HTTPStatusCode: res.StatusCode,
  2561. },
  2562. }
  2563. target := &ret
  2564. if err := gensupport.DecodeResponse(target, res); err != nil {
  2565. return nil, err
  2566. }
  2567. return ret, nil
  2568. // {
  2569. // "description": "Create a new activity for the authenticated user.",
  2570. // "httpMethod": "POST",
  2571. // "id": "plusDomains.activities.insert",
  2572. // "parameterOrder": [
  2573. // "userId"
  2574. // ],
  2575. // "parameters": {
  2576. // "preview": {
  2577. // "description": "If \"true\", extract the potential media attachments for a URL. The response will include all possible attachments for a URL, including video, photos, and articles based on the content of the page.",
  2578. // "location": "query",
  2579. // "type": "boolean"
  2580. // },
  2581. // "userId": {
  2582. // "description": "The ID of the user to create the activity on behalf of. Its value should be \"me\", to indicate the authenticated user.",
  2583. // "location": "path",
  2584. // "required": true,
  2585. // "type": "string"
  2586. // }
  2587. // },
  2588. // "path": "people/{userId}/activities",
  2589. // "request": {
  2590. // "$ref": "Activity"
  2591. // },
  2592. // "response": {
  2593. // "$ref": "Activity"
  2594. // },
  2595. // "scopes": [
  2596. // "https://www.googleapis.com/auth/plus.login",
  2597. // "https://www.googleapis.com/auth/plus.me",
  2598. // "https://www.googleapis.com/auth/plus.stream.write"
  2599. // ]
  2600. // }
  2601. }
  2602. // method id "plusDomains.activities.list":
  2603. type ActivitiesListCall struct {
  2604. s *Service
  2605. userId string
  2606. collection string
  2607. urlParams_ gensupport.URLParams
  2608. ifNoneMatch_ string
  2609. ctx_ context.Context
  2610. header_ http.Header
  2611. }
  2612. // List: List all of the activities in the specified collection for a
  2613. // particular user.
  2614. func (r *ActivitiesService) List(userId string, collection string) *ActivitiesListCall {
  2615. c := &ActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2616. c.userId = userId
  2617. c.collection = collection
  2618. return c
  2619. }
  2620. // MaxResults sets the optional parameter "maxResults": The maximum
  2621. // number of activities to include in the response, which is used for
  2622. // paging. For any response, the actual number returned might be less
  2623. // than the specified maxResults.
  2624. func (c *ActivitiesListCall) MaxResults(maxResults int64) *ActivitiesListCall {
  2625. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2626. return c
  2627. }
  2628. // PageToken sets the optional parameter "pageToken": The continuation
  2629. // token, which is used to page through large result sets. To get the
  2630. // next page of results, set this parameter to the value of
  2631. // "nextPageToken" from the previous response.
  2632. func (c *ActivitiesListCall) PageToken(pageToken string) *ActivitiesListCall {
  2633. c.urlParams_.Set("pageToken", pageToken)
  2634. return c
  2635. }
  2636. // Fields allows partial responses to be retrieved. See
  2637. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2638. // for more information.
  2639. func (c *ActivitiesListCall) Fields(s ...googleapi.Field) *ActivitiesListCall {
  2640. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2641. return c
  2642. }
  2643. // IfNoneMatch sets the optional parameter which makes the operation
  2644. // fail if the object's ETag matches the given value. This is useful for
  2645. // getting updates only after the object has changed since the last
  2646. // request. Use googleapi.IsNotModified to check whether the response
  2647. // error from Do is the result of In-None-Match.
  2648. func (c *ActivitiesListCall) IfNoneMatch(entityTag string) *ActivitiesListCall {
  2649. c.ifNoneMatch_ = entityTag
  2650. return c
  2651. }
  2652. // Context sets the context to be used in this call's Do method. Any
  2653. // pending HTTP request will be aborted if the provided context is
  2654. // canceled.
  2655. func (c *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
  2656. c.ctx_ = ctx
  2657. return c
  2658. }
  2659. // Header returns an http.Header that can be modified by the caller to
  2660. // add HTTP headers to the request.
  2661. func (c *ActivitiesListCall) Header() http.Header {
  2662. if c.header_ == nil {
  2663. c.header_ = make(http.Header)
  2664. }
  2665. return c.header_
  2666. }
  2667. func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
  2668. reqHeaders := make(http.Header)
  2669. for k, v := range c.header_ {
  2670. reqHeaders[k] = v
  2671. }
  2672. reqHeaders.Set("User-Agent", c.s.userAgent())
  2673. if c.ifNoneMatch_ != "" {
  2674. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2675. }
  2676. var body io.Reader = nil
  2677. c.urlParams_.Set("alt", alt)
  2678. c.urlParams_.Set("prettyPrint", "false")
  2679. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/activities/{collection}")
  2680. urls += "?" + c.urlParams_.Encode()
  2681. req, err := http.NewRequest("GET", urls, body)
  2682. if err != nil {
  2683. return nil, err
  2684. }
  2685. req.Header = reqHeaders
  2686. googleapi.Expand(req.URL, map[string]string{
  2687. "userId": c.userId,
  2688. "collection": c.collection,
  2689. })
  2690. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2691. }
  2692. // Do executes the "plusDomains.activities.list" call.
  2693. // Exactly one of *ActivityFeed or error will be non-nil. Any non-2xx
  2694. // status code is an error. Response headers are in either
  2695. // *ActivityFeed.ServerResponse.Header or (if a response was returned at
  2696. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2697. // to check whether the returned error was because
  2698. // http.StatusNotModified was returned.
  2699. func (c *ActivitiesListCall) Do(opts ...googleapi.CallOption) (*ActivityFeed, error) {
  2700. gensupport.SetOptions(c.urlParams_, opts...)
  2701. res, err := c.doRequest("json")
  2702. if res != nil && res.StatusCode == http.StatusNotModified {
  2703. if res.Body != nil {
  2704. res.Body.Close()
  2705. }
  2706. return nil, &googleapi.Error{
  2707. Code: res.StatusCode,
  2708. Header: res.Header,
  2709. }
  2710. }
  2711. if err != nil {
  2712. return nil, err
  2713. }
  2714. defer googleapi.CloseBody(res)
  2715. if err := googleapi.CheckResponse(res); err != nil {
  2716. return nil, err
  2717. }
  2718. ret := &ActivityFeed{
  2719. ServerResponse: googleapi.ServerResponse{
  2720. Header: res.Header,
  2721. HTTPStatusCode: res.StatusCode,
  2722. },
  2723. }
  2724. target := &ret
  2725. if err := gensupport.DecodeResponse(target, res); err != nil {
  2726. return nil, err
  2727. }
  2728. return ret, nil
  2729. // {
  2730. // "description": "List all of the activities in the specified collection for a particular user.",
  2731. // "httpMethod": "GET",
  2732. // "id": "plusDomains.activities.list",
  2733. // "parameterOrder": [
  2734. // "userId",
  2735. // "collection"
  2736. // ],
  2737. // "parameters": {
  2738. // "collection": {
  2739. // "description": "The collection of activities to list.",
  2740. // "enum": [
  2741. // "user"
  2742. // ],
  2743. // "enumDescriptions": [
  2744. // "All activities created by the specified user that the authenticated user is authorized to view."
  2745. // ],
  2746. // "location": "path",
  2747. // "required": true,
  2748. // "type": "string"
  2749. // },
  2750. // "maxResults": {
  2751. // "default": "20",
  2752. // "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.",
  2753. // "format": "uint32",
  2754. // "location": "query",
  2755. // "maximum": "100",
  2756. // "minimum": "1",
  2757. // "type": "integer"
  2758. // },
  2759. // "pageToken": {
  2760. // "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.",
  2761. // "location": "query",
  2762. // "type": "string"
  2763. // },
  2764. // "userId": {
  2765. // "description": "The ID of the user to get activities for. The special value \"me\" can be used to indicate the authenticated user.",
  2766. // "location": "path",
  2767. // "required": true,
  2768. // "type": "string"
  2769. // }
  2770. // },
  2771. // "path": "people/{userId}/activities/{collection}",
  2772. // "response": {
  2773. // "$ref": "ActivityFeed"
  2774. // },
  2775. // "scopes": [
  2776. // "https://www.googleapis.com/auth/plus.login",
  2777. // "https://www.googleapis.com/auth/plus.me",
  2778. // "https://www.googleapis.com/auth/plus.stream.read"
  2779. // ]
  2780. // }
  2781. }
  2782. // Pages invokes f for each page of results.
  2783. // A non-nil error returned from f will halt the iteration.
  2784. // The provided context supersedes any context provided to the Context method.
  2785. func (c *ActivitiesListCall) Pages(ctx context.Context, f func(*ActivityFeed) error) error {
  2786. c.ctx_ = ctx
  2787. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2788. for {
  2789. x, err := c.Do()
  2790. if err != nil {
  2791. return err
  2792. }
  2793. if err := f(x); err != nil {
  2794. return err
  2795. }
  2796. if x.NextPageToken == "" {
  2797. return nil
  2798. }
  2799. c.PageToken(x.NextPageToken)
  2800. }
  2801. }
  2802. // method id "plusDomains.audiences.list":
  2803. type AudiencesListCall struct {
  2804. s *Service
  2805. userId string
  2806. urlParams_ gensupport.URLParams
  2807. ifNoneMatch_ string
  2808. ctx_ context.Context
  2809. header_ http.Header
  2810. }
  2811. // List: List all of the audiences to which a user can share.
  2812. func (r *AudiencesService) List(userId string) *AudiencesListCall {
  2813. c := &AudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2814. c.userId = userId
  2815. return c
  2816. }
  2817. // MaxResults sets the optional parameter "maxResults": The maximum
  2818. // number of circles to include in the response, which is used for
  2819. // paging. For any response, the actual number returned might be less
  2820. // than the specified maxResults.
  2821. func (c *AudiencesListCall) MaxResults(maxResults int64) *AudiencesListCall {
  2822. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2823. return c
  2824. }
  2825. // PageToken sets the optional parameter "pageToken": The continuation
  2826. // token, which is used to page through large result sets. To get the
  2827. // next page of results, set this parameter to the value of
  2828. // "nextPageToken" from the previous response.
  2829. func (c *AudiencesListCall) PageToken(pageToken string) *AudiencesListCall {
  2830. c.urlParams_.Set("pageToken", pageToken)
  2831. return c
  2832. }
  2833. // Fields allows partial responses to be retrieved. See
  2834. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2835. // for more information.
  2836. func (c *AudiencesListCall) Fields(s ...googleapi.Field) *AudiencesListCall {
  2837. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2838. return c
  2839. }
  2840. // IfNoneMatch sets the optional parameter which makes the operation
  2841. // fail if the object's ETag matches the given value. This is useful for
  2842. // getting updates only after the object has changed since the last
  2843. // request. Use googleapi.IsNotModified to check whether the response
  2844. // error from Do is the result of In-None-Match.
  2845. func (c *AudiencesListCall) IfNoneMatch(entityTag string) *AudiencesListCall {
  2846. c.ifNoneMatch_ = entityTag
  2847. return c
  2848. }
  2849. // Context sets the context to be used in this call's Do method. Any
  2850. // pending HTTP request will be aborted if the provided context is
  2851. // canceled.
  2852. func (c *AudiencesListCall) Context(ctx context.Context) *AudiencesListCall {
  2853. c.ctx_ = ctx
  2854. return c
  2855. }
  2856. // Header returns an http.Header that can be modified by the caller to
  2857. // add HTTP headers to the request.
  2858. func (c *AudiencesListCall) Header() http.Header {
  2859. if c.header_ == nil {
  2860. c.header_ = make(http.Header)
  2861. }
  2862. return c.header_
  2863. }
  2864. func (c *AudiencesListCall) doRequest(alt string) (*http.Response, error) {
  2865. reqHeaders := make(http.Header)
  2866. for k, v := range c.header_ {
  2867. reqHeaders[k] = v
  2868. }
  2869. reqHeaders.Set("User-Agent", c.s.userAgent())
  2870. if c.ifNoneMatch_ != "" {
  2871. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2872. }
  2873. var body io.Reader = nil
  2874. c.urlParams_.Set("alt", alt)
  2875. c.urlParams_.Set("prettyPrint", "false")
  2876. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/audiences")
  2877. urls += "?" + c.urlParams_.Encode()
  2878. req, err := http.NewRequest("GET", urls, body)
  2879. if err != nil {
  2880. return nil, err
  2881. }
  2882. req.Header = reqHeaders
  2883. googleapi.Expand(req.URL, map[string]string{
  2884. "userId": c.userId,
  2885. })
  2886. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2887. }
  2888. // Do executes the "plusDomains.audiences.list" call.
  2889. // Exactly one of *AudiencesFeed or error will be non-nil. Any non-2xx
  2890. // status code is an error. Response headers are in either
  2891. // *AudiencesFeed.ServerResponse.Header or (if a response was returned
  2892. // at all) in error.(*googleapi.Error).Header. Use
  2893. // googleapi.IsNotModified to check whether the returned error was
  2894. // because http.StatusNotModified was returned.
  2895. func (c *AudiencesListCall) Do(opts ...googleapi.CallOption) (*AudiencesFeed, error) {
  2896. gensupport.SetOptions(c.urlParams_, opts...)
  2897. res, err := c.doRequest("json")
  2898. if res != nil && res.StatusCode == http.StatusNotModified {
  2899. if res.Body != nil {
  2900. res.Body.Close()
  2901. }
  2902. return nil, &googleapi.Error{
  2903. Code: res.StatusCode,
  2904. Header: res.Header,
  2905. }
  2906. }
  2907. if err != nil {
  2908. return nil, err
  2909. }
  2910. defer googleapi.CloseBody(res)
  2911. if err := googleapi.CheckResponse(res); err != nil {
  2912. return nil, err
  2913. }
  2914. ret := &AudiencesFeed{
  2915. ServerResponse: googleapi.ServerResponse{
  2916. Header: res.Header,
  2917. HTTPStatusCode: res.StatusCode,
  2918. },
  2919. }
  2920. target := &ret
  2921. if err := gensupport.DecodeResponse(target, res); err != nil {
  2922. return nil, err
  2923. }
  2924. return ret, nil
  2925. // {
  2926. // "description": "List all of the audiences to which a user can share.",
  2927. // "httpMethod": "GET",
  2928. // "id": "plusDomains.audiences.list",
  2929. // "parameterOrder": [
  2930. // "userId"
  2931. // ],
  2932. // "parameters": {
  2933. // "maxResults": {
  2934. // "default": "20",
  2935. // "description": "The maximum number of circles to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  2936. // "format": "uint32",
  2937. // "location": "query",
  2938. // "maximum": "100",
  2939. // "minimum": "1",
  2940. // "type": "integer"
  2941. // },
  2942. // "pageToken": {
  2943. // "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.",
  2944. // "location": "query",
  2945. // "type": "string"
  2946. // },
  2947. // "userId": {
  2948. // "description": "The ID of the user to get audiences for. The special value \"me\" can be used to indicate the authenticated user.",
  2949. // "location": "path",
  2950. // "required": true,
  2951. // "type": "string"
  2952. // }
  2953. // },
  2954. // "path": "people/{userId}/audiences",
  2955. // "response": {
  2956. // "$ref": "AudiencesFeed"
  2957. // },
  2958. // "scopes": [
  2959. // "https://www.googleapis.com/auth/plus.circles.read",
  2960. // "https://www.googleapis.com/auth/plus.login",
  2961. // "https://www.googleapis.com/auth/plus.me"
  2962. // ]
  2963. // }
  2964. }
  2965. // Pages invokes f for each page of results.
  2966. // A non-nil error returned from f will halt the iteration.
  2967. // The provided context supersedes any context provided to the Context method.
  2968. func (c *AudiencesListCall) Pages(ctx context.Context, f func(*AudiencesFeed) error) error {
  2969. c.ctx_ = ctx
  2970. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2971. for {
  2972. x, err := c.Do()
  2973. if err != nil {
  2974. return err
  2975. }
  2976. if err := f(x); err != nil {
  2977. return err
  2978. }
  2979. if x.NextPageToken == "" {
  2980. return nil
  2981. }
  2982. c.PageToken(x.NextPageToken)
  2983. }
  2984. }
  2985. // method id "plusDomains.circles.addPeople":
  2986. type CirclesAddPeopleCall struct {
  2987. s *Service
  2988. circleId string
  2989. urlParams_ gensupport.URLParams
  2990. ctx_ context.Context
  2991. header_ http.Header
  2992. }
  2993. // AddPeople: Add a person to a circle. Google+ limits certain circle
  2994. // operations, including the number of circle adds. Learn More.
  2995. func (r *CirclesService) AddPeople(circleId string) *CirclesAddPeopleCall {
  2996. c := &CirclesAddPeopleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2997. c.circleId = circleId
  2998. return c
  2999. }
  3000. // Email sets the optional parameter "email": Email of the people to add
  3001. // to the circle. Optional, can be repeated.
  3002. func (c *CirclesAddPeopleCall) Email(email ...string) *CirclesAddPeopleCall {
  3003. c.urlParams_.SetMulti("email", append([]string{}, email...))
  3004. return c
  3005. }
  3006. // UserId sets the optional parameter "userId": IDs of the people to add
  3007. // to the circle. Optional, can be repeated.
  3008. func (c *CirclesAddPeopleCall) UserId(userId ...string) *CirclesAddPeopleCall {
  3009. c.urlParams_.SetMulti("userId", append([]string{}, userId...))
  3010. return c
  3011. }
  3012. // Fields allows partial responses to be retrieved. See
  3013. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3014. // for more information.
  3015. func (c *CirclesAddPeopleCall) Fields(s ...googleapi.Field) *CirclesAddPeopleCall {
  3016. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3017. return c
  3018. }
  3019. // Context sets the context to be used in this call's Do method. Any
  3020. // pending HTTP request will be aborted if the provided context is
  3021. // canceled.
  3022. func (c *CirclesAddPeopleCall) Context(ctx context.Context) *CirclesAddPeopleCall {
  3023. c.ctx_ = ctx
  3024. return c
  3025. }
  3026. // Header returns an http.Header that can be modified by the caller to
  3027. // add HTTP headers to the request.
  3028. func (c *CirclesAddPeopleCall) Header() http.Header {
  3029. if c.header_ == nil {
  3030. c.header_ = make(http.Header)
  3031. }
  3032. return c.header_
  3033. }
  3034. func (c *CirclesAddPeopleCall) doRequest(alt string) (*http.Response, error) {
  3035. reqHeaders := make(http.Header)
  3036. for k, v := range c.header_ {
  3037. reqHeaders[k] = v
  3038. }
  3039. reqHeaders.Set("User-Agent", c.s.userAgent())
  3040. var body io.Reader = nil
  3041. c.urlParams_.Set("alt", alt)
  3042. c.urlParams_.Set("prettyPrint", "false")
  3043. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}/people")
  3044. urls += "?" + c.urlParams_.Encode()
  3045. req, err := http.NewRequest("PUT", urls, body)
  3046. if err != nil {
  3047. return nil, err
  3048. }
  3049. req.Header = reqHeaders
  3050. googleapi.Expand(req.URL, map[string]string{
  3051. "circleId": c.circleId,
  3052. })
  3053. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3054. }
  3055. // Do executes the "plusDomains.circles.addPeople" call.
  3056. // Exactly one of *Circle or error will be non-nil. Any non-2xx status
  3057. // code is an error. Response headers are in either
  3058. // *Circle.ServerResponse.Header or (if a response was returned at all)
  3059. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3060. // check whether the returned error was because http.StatusNotModified
  3061. // was returned.
  3062. func (c *CirclesAddPeopleCall) Do(opts ...googleapi.CallOption) (*Circle, error) {
  3063. gensupport.SetOptions(c.urlParams_, opts...)
  3064. res, err := c.doRequest("json")
  3065. if res != nil && res.StatusCode == http.StatusNotModified {
  3066. if res.Body != nil {
  3067. res.Body.Close()
  3068. }
  3069. return nil, &googleapi.Error{
  3070. Code: res.StatusCode,
  3071. Header: res.Header,
  3072. }
  3073. }
  3074. if err != nil {
  3075. return nil, err
  3076. }
  3077. defer googleapi.CloseBody(res)
  3078. if err := googleapi.CheckResponse(res); err != nil {
  3079. return nil, err
  3080. }
  3081. ret := &Circle{
  3082. ServerResponse: googleapi.ServerResponse{
  3083. Header: res.Header,
  3084. HTTPStatusCode: res.StatusCode,
  3085. },
  3086. }
  3087. target := &ret
  3088. if err := gensupport.DecodeResponse(target, res); err != nil {
  3089. return nil, err
  3090. }
  3091. return ret, nil
  3092. // {
  3093. // "description": "Add a person to a circle. Google+ limits certain circle operations, including the number of circle adds. Learn More.",
  3094. // "httpMethod": "PUT",
  3095. // "id": "plusDomains.circles.addPeople",
  3096. // "parameterOrder": [
  3097. // "circleId"
  3098. // ],
  3099. // "parameters": {
  3100. // "circleId": {
  3101. // "description": "The ID of the circle to add the person to.",
  3102. // "location": "path",
  3103. // "required": true,
  3104. // "type": "string"
  3105. // },
  3106. // "email": {
  3107. // "description": "Email of the people to add to the circle. Optional, can be repeated.",
  3108. // "location": "query",
  3109. // "repeated": true,
  3110. // "type": "string"
  3111. // },
  3112. // "userId": {
  3113. // "description": "IDs of the people to add to the circle. Optional, can be repeated.",
  3114. // "location": "query",
  3115. // "repeated": true,
  3116. // "type": "string"
  3117. // }
  3118. // },
  3119. // "path": "circles/{circleId}/people",
  3120. // "response": {
  3121. // "$ref": "Circle"
  3122. // },
  3123. // "scopes": [
  3124. // "https://www.googleapis.com/auth/plus.circles.write",
  3125. // "https://www.googleapis.com/auth/plus.login"
  3126. // ]
  3127. // }
  3128. }
  3129. // method id "plusDomains.circles.get":
  3130. type CirclesGetCall struct {
  3131. s *Service
  3132. circleId string
  3133. urlParams_ gensupport.URLParams
  3134. ifNoneMatch_ string
  3135. ctx_ context.Context
  3136. header_ http.Header
  3137. }
  3138. // Get: Get a circle.
  3139. func (r *CirclesService) Get(circleId string) *CirclesGetCall {
  3140. c := &CirclesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3141. c.circleId = circleId
  3142. return c
  3143. }
  3144. // Fields allows partial responses to be retrieved. See
  3145. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3146. // for more information.
  3147. func (c *CirclesGetCall) Fields(s ...googleapi.Field) *CirclesGetCall {
  3148. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3149. return c
  3150. }
  3151. // IfNoneMatch sets the optional parameter which makes the operation
  3152. // fail if the object's ETag matches the given value. This is useful for
  3153. // getting updates only after the object has changed since the last
  3154. // request. Use googleapi.IsNotModified to check whether the response
  3155. // error from Do is the result of In-None-Match.
  3156. func (c *CirclesGetCall) IfNoneMatch(entityTag string) *CirclesGetCall {
  3157. c.ifNoneMatch_ = entityTag
  3158. return c
  3159. }
  3160. // Context sets the context to be used in this call's Do method. Any
  3161. // pending HTTP request will be aborted if the provided context is
  3162. // canceled.
  3163. func (c *CirclesGetCall) Context(ctx context.Context) *CirclesGetCall {
  3164. c.ctx_ = ctx
  3165. return c
  3166. }
  3167. // Header returns an http.Header that can be modified by the caller to
  3168. // add HTTP headers to the request.
  3169. func (c *CirclesGetCall) Header() http.Header {
  3170. if c.header_ == nil {
  3171. c.header_ = make(http.Header)
  3172. }
  3173. return c.header_
  3174. }
  3175. func (c *CirclesGetCall) doRequest(alt string) (*http.Response, error) {
  3176. reqHeaders := make(http.Header)
  3177. for k, v := range c.header_ {
  3178. reqHeaders[k] = v
  3179. }
  3180. reqHeaders.Set("User-Agent", c.s.userAgent())
  3181. if c.ifNoneMatch_ != "" {
  3182. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3183. }
  3184. var body io.Reader = nil
  3185. c.urlParams_.Set("alt", alt)
  3186. c.urlParams_.Set("prettyPrint", "false")
  3187. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
  3188. urls += "?" + c.urlParams_.Encode()
  3189. req, err := http.NewRequest("GET", urls, body)
  3190. if err != nil {
  3191. return nil, err
  3192. }
  3193. req.Header = reqHeaders
  3194. googleapi.Expand(req.URL, map[string]string{
  3195. "circleId": c.circleId,
  3196. })
  3197. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3198. }
  3199. // Do executes the "plusDomains.circles.get" call.
  3200. // Exactly one of *Circle or error will be non-nil. Any non-2xx status
  3201. // code is an error. Response headers are in either
  3202. // *Circle.ServerResponse.Header or (if a response was returned at all)
  3203. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3204. // check whether the returned error was because http.StatusNotModified
  3205. // was returned.
  3206. func (c *CirclesGetCall) Do(opts ...googleapi.CallOption) (*Circle, error) {
  3207. gensupport.SetOptions(c.urlParams_, opts...)
  3208. res, err := c.doRequest("json")
  3209. if res != nil && res.StatusCode == http.StatusNotModified {
  3210. if res.Body != nil {
  3211. res.Body.Close()
  3212. }
  3213. return nil, &googleapi.Error{
  3214. Code: res.StatusCode,
  3215. Header: res.Header,
  3216. }
  3217. }
  3218. if err != nil {
  3219. return nil, err
  3220. }
  3221. defer googleapi.CloseBody(res)
  3222. if err := googleapi.CheckResponse(res); err != nil {
  3223. return nil, err
  3224. }
  3225. ret := &Circle{
  3226. ServerResponse: googleapi.ServerResponse{
  3227. Header: res.Header,
  3228. HTTPStatusCode: res.StatusCode,
  3229. },
  3230. }
  3231. target := &ret
  3232. if err := gensupport.DecodeResponse(target, res); err != nil {
  3233. return nil, err
  3234. }
  3235. return ret, nil
  3236. // {
  3237. // "description": "Get a circle.",
  3238. // "httpMethod": "GET",
  3239. // "id": "plusDomains.circles.get",
  3240. // "parameterOrder": [
  3241. // "circleId"
  3242. // ],
  3243. // "parameters": {
  3244. // "circleId": {
  3245. // "description": "The ID of the circle to get.",
  3246. // "location": "path",
  3247. // "required": true,
  3248. // "type": "string"
  3249. // }
  3250. // },
  3251. // "path": "circles/{circleId}",
  3252. // "response": {
  3253. // "$ref": "Circle"
  3254. // },
  3255. // "scopes": [
  3256. // "https://www.googleapis.com/auth/plus.circles.read",
  3257. // "https://www.googleapis.com/auth/plus.login"
  3258. // ]
  3259. // }
  3260. }
  3261. // method id "plusDomains.circles.insert":
  3262. type CirclesInsertCall struct {
  3263. s *Service
  3264. userId string
  3265. circle *Circle
  3266. urlParams_ gensupport.URLParams
  3267. ctx_ context.Context
  3268. header_ http.Header
  3269. }
  3270. // Insert: Create a new circle for the authenticated user.
  3271. func (r *CirclesService) Insert(userId string, circle *Circle) *CirclesInsertCall {
  3272. c := &CirclesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3273. c.userId = userId
  3274. c.circle = circle
  3275. return c
  3276. }
  3277. // Fields allows partial responses to be retrieved. See
  3278. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3279. // for more information.
  3280. func (c *CirclesInsertCall) Fields(s ...googleapi.Field) *CirclesInsertCall {
  3281. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3282. return c
  3283. }
  3284. // Context sets the context to be used in this call's Do method. Any
  3285. // pending HTTP request will be aborted if the provided context is
  3286. // canceled.
  3287. func (c *CirclesInsertCall) Context(ctx context.Context) *CirclesInsertCall {
  3288. c.ctx_ = ctx
  3289. return c
  3290. }
  3291. // Header returns an http.Header that can be modified by the caller to
  3292. // add HTTP headers to the request.
  3293. func (c *CirclesInsertCall) Header() http.Header {
  3294. if c.header_ == nil {
  3295. c.header_ = make(http.Header)
  3296. }
  3297. return c.header_
  3298. }
  3299. func (c *CirclesInsertCall) doRequest(alt string) (*http.Response, error) {
  3300. reqHeaders := make(http.Header)
  3301. for k, v := range c.header_ {
  3302. reqHeaders[k] = v
  3303. }
  3304. reqHeaders.Set("User-Agent", c.s.userAgent())
  3305. var body io.Reader = nil
  3306. body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
  3307. if err != nil {
  3308. return nil, err
  3309. }
  3310. reqHeaders.Set("Content-Type", "application/json")
  3311. c.urlParams_.Set("alt", alt)
  3312. c.urlParams_.Set("prettyPrint", "false")
  3313. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/circles")
  3314. urls += "?" + c.urlParams_.Encode()
  3315. req, err := http.NewRequest("POST", urls, body)
  3316. if err != nil {
  3317. return nil, err
  3318. }
  3319. req.Header = reqHeaders
  3320. googleapi.Expand(req.URL, map[string]string{
  3321. "userId": c.userId,
  3322. })
  3323. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3324. }
  3325. // Do executes the "plusDomains.circles.insert" call.
  3326. // Exactly one of *Circle or error will be non-nil. Any non-2xx status
  3327. // code is an error. Response headers are in either
  3328. // *Circle.ServerResponse.Header or (if a response was returned at all)
  3329. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3330. // check whether the returned error was because http.StatusNotModified
  3331. // was returned.
  3332. func (c *CirclesInsertCall) Do(opts ...googleapi.CallOption) (*Circle, error) {
  3333. gensupport.SetOptions(c.urlParams_, opts...)
  3334. res, err := c.doRequest("json")
  3335. if res != nil && res.StatusCode == http.StatusNotModified {
  3336. if res.Body != nil {
  3337. res.Body.Close()
  3338. }
  3339. return nil, &googleapi.Error{
  3340. Code: res.StatusCode,
  3341. Header: res.Header,
  3342. }
  3343. }
  3344. if err != nil {
  3345. return nil, err
  3346. }
  3347. defer googleapi.CloseBody(res)
  3348. if err := googleapi.CheckResponse(res); err != nil {
  3349. return nil, err
  3350. }
  3351. ret := &Circle{
  3352. ServerResponse: googleapi.ServerResponse{
  3353. Header: res.Header,
  3354. HTTPStatusCode: res.StatusCode,
  3355. },
  3356. }
  3357. target := &ret
  3358. if err := gensupport.DecodeResponse(target, res); err != nil {
  3359. return nil, err
  3360. }
  3361. return ret, nil
  3362. // {
  3363. // "description": "Create a new circle for the authenticated user.",
  3364. // "httpMethod": "POST",
  3365. // "id": "plusDomains.circles.insert",
  3366. // "parameterOrder": [
  3367. // "userId"
  3368. // ],
  3369. // "parameters": {
  3370. // "userId": {
  3371. // "description": "The ID of the user to create the circle on behalf of. The value \"me\" can be used to indicate the authenticated user.",
  3372. // "location": "path",
  3373. // "required": true,
  3374. // "type": "string"
  3375. // }
  3376. // },
  3377. // "path": "people/{userId}/circles",
  3378. // "request": {
  3379. // "$ref": "Circle"
  3380. // },
  3381. // "response": {
  3382. // "$ref": "Circle"
  3383. // },
  3384. // "scopes": [
  3385. // "https://www.googleapis.com/auth/plus.circles.write",
  3386. // "https://www.googleapis.com/auth/plus.login",
  3387. // "https://www.googleapis.com/auth/plus.me"
  3388. // ]
  3389. // }
  3390. }
  3391. // method id "plusDomains.circles.list":
  3392. type CirclesListCall struct {
  3393. s *Service
  3394. userId string
  3395. urlParams_ gensupport.URLParams
  3396. ifNoneMatch_ string
  3397. ctx_ context.Context
  3398. header_ http.Header
  3399. }
  3400. // List: List all of the circles for a user.
  3401. func (r *CirclesService) List(userId string) *CirclesListCall {
  3402. c := &CirclesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3403. c.userId = userId
  3404. return c
  3405. }
  3406. // MaxResults sets the optional parameter "maxResults": The maximum
  3407. // number of circles to include in the response, which is used for
  3408. // paging. For any response, the actual number returned might be less
  3409. // than the specified maxResults.
  3410. func (c *CirclesListCall) MaxResults(maxResults int64) *CirclesListCall {
  3411. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3412. return c
  3413. }
  3414. // PageToken sets the optional parameter "pageToken": The continuation
  3415. // token, which is used to page through large result sets. To get the
  3416. // next page of results, set this parameter to the value of
  3417. // "nextPageToken" from the previous response.
  3418. func (c *CirclesListCall) PageToken(pageToken string) *CirclesListCall {
  3419. c.urlParams_.Set("pageToken", pageToken)
  3420. return c
  3421. }
  3422. // Fields allows partial responses to be retrieved. See
  3423. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3424. // for more information.
  3425. func (c *CirclesListCall) Fields(s ...googleapi.Field) *CirclesListCall {
  3426. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3427. return c
  3428. }
  3429. // IfNoneMatch sets the optional parameter which makes the operation
  3430. // fail if the object's ETag matches the given value. This is useful for
  3431. // getting updates only after the object has changed since the last
  3432. // request. Use googleapi.IsNotModified to check whether the response
  3433. // error from Do is the result of In-None-Match.
  3434. func (c *CirclesListCall) IfNoneMatch(entityTag string) *CirclesListCall {
  3435. c.ifNoneMatch_ = entityTag
  3436. return c
  3437. }
  3438. // Context sets the context to be used in this call's Do method. Any
  3439. // pending HTTP request will be aborted if the provided context is
  3440. // canceled.
  3441. func (c *CirclesListCall) Context(ctx context.Context) *CirclesListCall {
  3442. c.ctx_ = ctx
  3443. return c
  3444. }
  3445. // Header returns an http.Header that can be modified by the caller to
  3446. // add HTTP headers to the request.
  3447. func (c *CirclesListCall) Header() http.Header {
  3448. if c.header_ == nil {
  3449. c.header_ = make(http.Header)
  3450. }
  3451. return c.header_
  3452. }
  3453. func (c *CirclesListCall) doRequest(alt string) (*http.Response, error) {
  3454. reqHeaders := make(http.Header)
  3455. for k, v := range c.header_ {
  3456. reqHeaders[k] = v
  3457. }
  3458. reqHeaders.Set("User-Agent", c.s.userAgent())
  3459. if c.ifNoneMatch_ != "" {
  3460. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3461. }
  3462. var body io.Reader = nil
  3463. c.urlParams_.Set("alt", alt)
  3464. c.urlParams_.Set("prettyPrint", "false")
  3465. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/circles")
  3466. urls += "?" + c.urlParams_.Encode()
  3467. req, err := http.NewRequest("GET", urls, body)
  3468. if err != nil {
  3469. return nil, err
  3470. }
  3471. req.Header = reqHeaders
  3472. googleapi.Expand(req.URL, map[string]string{
  3473. "userId": c.userId,
  3474. })
  3475. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3476. }
  3477. // Do executes the "plusDomains.circles.list" call.
  3478. // Exactly one of *CircleFeed or error will be non-nil. Any non-2xx
  3479. // status code is an error. Response headers are in either
  3480. // *CircleFeed.ServerResponse.Header or (if a response was returned at
  3481. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3482. // to check whether the returned error was because
  3483. // http.StatusNotModified was returned.
  3484. func (c *CirclesListCall) Do(opts ...googleapi.CallOption) (*CircleFeed, error) {
  3485. gensupport.SetOptions(c.urlParams_, opts...)
  3486. res, err := c.doRequest("json")
  3487. if res != nil && res.StatusCode == http.StatusNotModified {
  3488. if res.Body != nil {
  3489. res.Body.Close()
  3490. }
  3491. return nil, &googleapi.Error{
  3492. Code: res.StatusCode,
  3493. Header: res.Header,
  3494. }
  3495. }
  3496. if err != nil {
  3497. return nil, err
  3498. }
  3499. defer googleapi.CloseBody(res)
  3500. if err := googleapi.CheckResponse(res); err != nil {
  3501. return nil, err
  3502. }
  3503. ret := &CircleFeed{
  3504. ServerResponse: googleapi.ServerResponse{
  3505. Header: res.Header,
  3506. HTTPStatusCode: res.StatusCode,
  3507. },
  3508. }
  3509. target := &ret
  3510. if err := gensupport.DecodeResponse(target, res); err != nil {
  3511. return nil, err
  3512. }
  3513. return ret, nil
  3514. // {
  3515. // "description": "List all of the circles for a user.",
  3516. // "httpMethod": "GET",
  3517. // "id": "plusDomains.circles.list",
  3518. // "parameterOrder": [
  3519. // "userId"
  3520. // ],
  3521. // "parameters": {
  3522. // "maxResults": {
  3523. // "default": "20",
  3524. // "description": "The maximum number of circles to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
  3525. // "format": "uint32",
  3526. // "location": "query",
  3527. // "maximum": "100",
  3528. // "minimum": "1",
  3529. // "type": "integer"
  3530. // },
  3531. // "pageToken": {
  3532. // "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.",
  3533. // "location": "query",
  3534. // "type": "string"
  3535. // },
  3536. // "userId": {
  3537. // "description": "The ID of the user to get circles for. The special value \"me\" can be used to indicate the authenticated user.",
  3538. // "location": "path",
  3539. // "required": true,
  3540. // "type": "string"
  3541. // }
  3542. // },
  3543. // "path": "people/{userId}/circles",
  3544. // "response": {
  3545. // "$ref": "CircleFeed"
  3546. // },
  3547. // "scopes": [
  3548. // "https://www.googleapis.com/auth/plus.circles.read",
  3549. // "https://www.googleapis.com/auth/plus.login",
  3550. // "https://www.googleapis.com/auth/plus.me"
  3551. // ]
  3552. // }
  3553. }
  3554. // Pages invokes f for each page of results.
  3555. // A non-nil error returned from f will halt the iteration.
  3556. // The provided context supersedes any context provided to the Context method.
  3557. func (c *CirclesListCall) Pages(ctx context.Context, f func(*CircleFeed) error) error {
  3558. c.ctx_ = ctx
  3559. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3560. for {
  3561. x, err := c.Do()
  3562. if err != nil {
  3563. return err
  3564. }
  3565. if err := f(x); err != nil {
  3566. return err
  3567. }
  3568. if x.NextPageToken == "" {
  3569. return nil
  3570. }
  3571. c.PageToken(x.NextPageToken)
  3572. }
  3573. }
  3574. // method id "plusDomains.circles.patch":
  3575. type CirclesPatchCall struct {
  3576. s *Service
  3577. circleId string
  3578. circle *Circle
  3579. urlParams_ gensupport.URLParams
  3580. ctx_ context.Context
  3581. header_ http.Header
  3582. }
  3583. // Patch: Update a circle's description. This method supports patch
  3584. // semantics.
  3585. func (r *CirclesService) Patch(circleId string, circle *Circle) *CirclesPatchCall {
  3586. c := &CirclesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3587. c.circleId = circleId
  3588. c.circle = circle
  3589. return c
  3590. }
  3591. // Fields allows partial responses to be retrieved. See
  3592. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3593. // for more information.
  3594. func (c *CirclesPatchCall) Fields(s ...googleapi.Field) *CirclesPatchCall {
  3595. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3596. return c
  3597. }
  3598. // Context sets the context to be used in this call's Do method. Any
  3599. // pending HTTP request will be aborted if the provided context is
  3600. // canceled.
  3601. func (c *CirclesPatchCall) Context(ctx context.Context) *CirclesPatchCall {
  3602. c.ctx_ = ctx
  3603. return c
  3604. }
  3605. // Header returns an http.Header that can be modified by the caller to
  3606. // add HTTP headers to the request.
  3607. func (c *CirclesPatchCall) Header() http.Header {
  3608. if c.header_ == nil {
  3609. c.header_ = make(http.Header)
  3610. }
  3611. return c.header_
  3612. }
  3613. func (c *CirclesPatchCall) doRequest(alt string) (*http.Response, error) {
  3614. reqHeaders := make(http.Header)
  3615. for k, v := range c.header_ {
  3616. reqHeaders[k] = v
  3617. }
  3618. reqHeaders.Set("User-Agent", c.s.userAgent())
  3619. var body io.Reader = nil
  3620. body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
  3621. if err != nil {
  3622. return nil, err
  3623. }
  3624. reqHeaders.Set("Content-Type", "application/json")
  3625. c.urlParams_.Set("alt", alt)
  3626. c.urlParams_.Set("prettyPrint", "false")
  3627. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
  3628. urls += "?" + c.urlParams_.Encode()
  3629. req, err := http.NewRequest("PATCH", urls, body)
  3630. if err != nil {
  3631. return nil, err
  3632. }
  3633. req.Header = reqHeaders
  3634. googleapi.Expand(req.URL, map[string]string{
  3635. "circleId": c.circleId,
  3636. })
  3637. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3638. }
  3639. // Do executes the "plusDomains.circles.patch" call.
  3640. // Exactly one of *Circle or error will be non-nil. Any non-2xx status
  3641. // code is an error. Response headers are in either
  3642. // *Circle.ServerResponse.Header or (if a response was returned at all)
  3643. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3644. // check whether the returned error was because http.StatusNotModified
  3645. // was returned.
  3646. func (c *CirclesPatchCall) Do(opts ...googleapi.CallOption) (*Circle, error) {
  3647. gensupport.SetOptions(c.urlParams_, opts...)
  3648. res, err := c.doRequest("json")
  3649. if res != nil && res.StatusCode == http.StatusNotModified {
  3650. if res.Body != nil {
  3651. res.Body.Close()
  3652. }
  3653. return nil, &googleapi.Error{
  3654. Code: res.StatusCode,
  3655. Header: res.Header,
  3656. }
  3657. }
  3658. if err != nil {
  3659. return nil, err
  3660. }
  3661. defer googleapi.CloseBody(res)
  3662. if err := googleapi.CheckResponse(res); err != nil {
  3663. return nil, err
  3664. }
  3665. ret := &Circle{
  3666. ServerResponse: googleapi.ServerResponse{
  3667. Header: res.Header,
  3668. HTTPStatusCode: res.StatusCode,
  3669. },
  3670. }
  3671. target := &ret
  3672. if err := gensupport.DecodeResponse(target, res); err != nil {
  3673. return nil, err
  3674. }
  3675. return ret, nil
  3676. // {
  3677. // "description": "Update a circle's description. This method supports patch semantics.",
  3678. // "httpMethod": "PATCH",
  3679. // "id": "plusDomains.circles.patch",
  3680. // "parameterOrder": [
  3681. // "circleId"
  3682. // ],
  3683. // "parameters": {
  3684. // "circleId": {
  3685. // "description": "The ID of the circle to update.",
  3686. // "location": "path",
  3687. // "required": true,
  3688. // "type": "string"
  3689. // }
  3690. // },
  3691. // "path": "circles/{circleId}",
  3692. // "request": {
  3693. // "$ref": "Circle"
  3694. // },
  3695. // "response": {
  3696. // "$ref": "Circle"
  3697. // },
  3698. // "scopes": [
  3699. // "https://www.googleapis.com/auth/plus.circles.write",
  3700. // "https://www.googleapis.com/auth/plus.login"
  3701. // ]
  3702. // }
  3703. }
  3704. // method id "plusDomains.circles.remove":
  3705. type CirclesRemoveCall struct {
  3706. s *Service
  3707. circleId string
  3708. urlParams_ gensupport.URLParams
  3709. ctx_ context.Context
  3710. header_ http.Header
  3711. }
  3712. // Remove: Delete a circle.
  3713. func (r *CirclesService) Remove(circleId string) *CirclesRemoveCall {
  3714. c := &CirclesRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3715. c.circleId = circleId
  3716. return c
  3717. }
  3718. // Fields allows partial responses to be retrieved. See
  3719. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3720. // for more information.
  3721. func (c *CirclesRemoveCall) Fields(s ...googleapi.Field) *CirclesRemoveCall {
  3722. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3723. return c
  3724. }
  3725. // Context sets the context to be used in this call's Do method. Any
  3726. // pending HTTP request will be aborted if the provided context is
  3727. // canceled.
  3728. func (c *CirclesRemoveCall) Context(ctx context.Context) *CirclesRemoveCall {
  3729. c.ctx_ = ctx
  3730. return c
  3731. }
  3732. // Header returns an http.Header that can be modified by the caller to
  3733. // add HTTP headers to the request.
  3734. func (c *CirclesRemoveCall) Header() http.Header {
  3735. if c.header_ == nil {
  3736. c.header_ = make(http.Header)
  3737. }
  3738. return c.header_
  3739. }
  3740. func (c *CirclesRemoveCall) doRequest(alt string) (*http.Response, error) {
  3741. reqHeaders := make(http.Header)
  3742. for k, v := range c.header_ {
  3743. reqHeaders[k] = v
  3744. }
  3745. reqHeaders.Set("User-Agent", c.s.userAgent())
  3746. var body io.Reader = nil
  3747. c.urlParams_.Set("alt", alt)
  3748. c.urlParams_.Set("prettyPrint", "false")
  3749. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
  3750. urls += "?" + c.urlParams_.Encode()
  3751. req, err := http.NewRequest("DELETE", urls, body)
  3752. if err != nil {
  3753. return nil, err
  3754. }
  3755. req.Header = reqHeaders
  3756. googleapi.Expand(req.URL, map[string]string{
  3757. "circleId": c.circleId,
  3758. })
  3759. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3760. }
  3761. // Do executes the "plusDomains.circles.remove" call.
  3762. func (c *CirclesRemoveCall) Do(opts ...googleapi.CallOption) error {
  3763. gensupport.SetOptions(c.urlParams_, opts...)
  3764. res, err := c.doRequest("json")
  3765. if err != nil {
  3766. return err
  3767. }
  3768. defer googleapi.CloseBody(res)
  3769. if err := googleapi.CheckResponse(res); err != nil {
  3770. return err
  3771. }
  3772. return nil
  3773. // {
  3774. // "description": "Delete a circle.",
  3775. // "httpMethod": "DELETE",
  3776. // "id": "plusDomains.circles.remove",
  3777. // "parameterOrder": [
  3778. // "circleId"
  3779. // ],
  3780. // "parameters": {
  3781. // "circleId": {
  3782. // "description": "The ID of the circle to delete.",
  3783. // "location": "path",
  3784. // "required": true,
  3785. // "type": "string"
  3786. // }
  3787. // },
  3788. // "path": "circles/{circleId}",
  3789. // "scopes": [
  3790. // "https://www.googleapis.com/auth/plus.circles.write",
  3791. // "https://www.googleapis.com/auth/plus.login"
  3792. // ]
  3793. // }
  3794. }
  3795. // method id "plusDomains.circles.removePeople":
  3796. type CirclesRemovePeopleCall struct {
  3797. s *Service
  3798. circleId string
  3799. urlParams_ gensupport.URLParams
  3800. ctx_ context.Context
  3801. header_ http.Header
  3802. }
  3803. // RemovePeople: Remove a person from a circle.
  3804. func (r *CirclesService) RemovePeople(circleId string) *CirclesRemovePeopleCall {
  3805. c := &CirclesRemovePeopleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3806. c.circleId = circleId
  3807. return c
  3808. }
  3809. // Email sets the optional parameter "email": Email of the people to add
  3810. // to the circle. Optional, can be repeated.
  3811. func (c *CirclesRemovePeopleCall) Email(email ...string) *CirclesRemovePeopleCall {
  3812. c.urlParams_.SetMulti("email", append([]string{}, email...))
  3813. return c
  3814. }
  3815. // UserId sets the optional parameter "userId": IDs of the people to
  3816. // remove from the circle. Optional, can be repeated.
  3817. func (c *CirclesRemovePeopleCall) UserId(userId ...string) *CirclesRemovePeopleCall {
  3818. c.urlParams_.SetMulti("userId", append([]string{}, userId...))
  3819. return c
  3820. }
  3821. // Fields allows partial responses to be retrieved. See
  3822. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3823. // for more information.
  3824. func (c *CirclesRemovePeopleCall) Fields(s ...googleapi.Field) *CirclesRemovePeopleCall {
  3825. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3826. return c
  3827. }
  3828. // Context sets the context to be used in this call's Do method. Any
  3829. // pending HTTP request will be aborted if the provided context is
  3830. // canceled.
  3831. func (c *CirclesRemovePeopleCall) Context(ctx context.Context) *CirclesRemovePeopleCall {
  3832. c.ctx_ = ctx
  3833. return c
  3834. }
  3835. // Header returns an http.Header that can be modified by the caller to
  3836. // add HTTP headers to the request.
  3837. func (c *CirclesRemovePeopleCall) Header() http.Header {
  3838. if c.header_ == nil {
  3839. c.header_ = make(http.Header)
  3840. }
  3841. return c.header_
  3842. }
  3843. func (c *CirclesRemovePeopleCall) doRequest(alt string) (*http.Response, error) {
  3844. reqHeaders := make(http.Header)
  3845. for k, v := range c.header_ {
  3846. reqHeaders[k] = v
  3847. }
  3848. reqHeaders.Set("User-Agent", c.s.userAgent())
  3849. var body io.Reader = nil
  3850. c.urlParams_.Set("alt", alt)
  3851. c.urlParams_.Set("prettyPrint", "false")
  3852. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}/people")
  3853. urls += "?" + c.urlParams_.Encode()
  3854. req, err := http.NewRequest("DELETE", urls, body)
  3855. if err != nil {
  3856. return nil, err
  3857. }
  3858. req.Header = reqHeaders
  3859. googleapi.Expand(req.URL, map[string]string{
  3860. "circleId": c.circleId,
  3861. })
  3862. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3863. }
  3864. // Do executes the "plusDomains.circles.removePeople" call.
  3865. func (c *CirclesRemovePeopleCall) Do(opts ...googleapi.CallOption) error {
  3866. gensupport.SetOptions(c.urlParams_, opts...)
  3867. res, err := c.doRequest("json")
  3868. if err != nil {
  3869. return err
  3870. }
  3871. defer googleapi.CloseBody(res)
  3872. if err := googleapi.CheckResponse(res); err != nil {
  3873. return err
  3874. }
  3875. return nil
  3876. // {
  3877. // "description": "Remove a person from a circle.",
  3878. // "httpMethod": "DELETE",
  3879. // "id": "plusDomains.circles.removePeople",
  3880. // "parameterOrder": [
  3881. // "circleId"
  3882. // ],
  3883. // "parameters": {
  3884. // "circleId": {
  3885. // "description": "The ID of the circle to remove the person from.",
  3886. // "location": "path",
  3887. // "required": true,
  3888. // "type": "string"
  3889. // },
  3890. // "email": {
  3891. // "description": "Email of the people to add to the circle. Optional, can be repeated.",
  3892. // "location": "query",
  3893. // "repeated": true,
  3894. // "type": "string"
  3895. // },
  3896. // "userId": {
  3897. // "description": "IDs of the people to remove from the circle. Optional, can be repeated.",
  3898. // "location": "query",
  3899. // "repeated": true,
  3900. // "type": "string"
  3901. // }
  3902. // },
  3903. // "path": "circles/{circleId}/people",
  3904. // "scopes": [
  3905. // "https://www.googleapis.com/auth/plus.circles.write",
  3906. // "https://www.googleapis.com/auth/plus.login"
  3907. // ]
  3908. // }
  3909. }
  3910. // method id "plusDomains.circles.update":
  3911. type CirclesUpdateCall struct {
  3912. s *Service
  3913. circleId string
  3914. circle *Circle
  3915. urlParams_ gensupport.URLParams
  3916. ctx_ context.Context
  3917. header_ http.Header
  3918. }
  3919. // Update: Update a circle's description.
  3920. func (r *CirclesService) Update(circleId string, circle *Circle) *CirclesUpdateCall {
  3921. c := &CirclesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3922. c.circleId = circleId
  3923. c.circle = circle
  3924. return c
  3925. }
  3926. // Fields allows partial responses to be retrieved. See
  3927. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3928. // for more information.
  3929. func (c *CirclesUpdateCall) Fields(s ...googleapi.Field) *CirclesUpdateCall {
  3930. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3931. return c
  3932. }
  3933. // Context sets the context to be used in this call's Do method. Any
  3934. // pending HTTP request will be aborted if the provided context is
  3935. // canceled.
  3936. func (c *CirclesUpdateCall) Context(ctx context.Context) *CirclesUpdateCall {
  3937. c.ctx_ = ctx
  3938. return c
  3939. }
  3940. // Header returns an http.Header that can be modified by the caller to
  3941. // add HTTP headers to the request.
  3942. func (c *CirclesUpdateCall) Header() http.Header {
  3943. if c.header_ == nil {
  3944. c.header_ = make(http.Header)
  3945. }
  3946. return c.header_
  3947. }
  3948. func (c *CirclesUpdateCall) doRequest(alt string) (*http.Response, error) {
  3949. reqHeaders := make(http.Header)
  3950. for k, v := range c.header_ {
  3951. reqHeaders[k] = v
  3952. }
  3953. reqHeaders.Set("User-Agent", c.s.userAgent())
  3954. var body io.Reader = nil
  3955. body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
  3956. if err != nil {
  3957. return nil, err
  3958. }
  3959. reqHeaders.Set("Content-Type", "application/json")
  3960. c.urlParams_.Set("alt", alt)
  3961. c.urlParams_.Set("prettyPrint", "false")
  3962. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
  3963. urls += "?" + c.urlParams_.Encode()
  3964. req, err := http.NewRequest("PUT", urls, body)
  3965. if err != nil {
  3966. return nil, err
  3967. }
  3968. req.Header = reqHeaders
  3969. googleapi.Expand(req.URL, map[string]string{
  3970. "circleId": c.circleId,
  3971. })
  3972. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3973. }
  3974. // Do executes the "plusDomains.circles.update" call.
  3975. // Exactly one of *Circle or error will be non-nil. Any non-2xx status
  3976. // code is an error. Response headers are in either
  3977. // *Circle.ServerResponse.Header or (if a response was returned at all)
  3978. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3979. // check whether the returned error was because http.StatusNotModified
  3980. // was returned.
  3981. func (c *CirclesUpdateCall) Do(opts ...googleapi.CallOption) (*Circle, error) {
  3982. gensupport.SetOptions(c.urlParams_, opts...)
  3983. res, err := c.doRequest("json")
  3984. if res != nil && res.StatusCode == http.StatusNotModified {
  3985. if res.Body != nil {
  3986. res.Body.Close()
  3987. }
  3988. return nil, &googleapi.Error{
  3989. Code: res.StatusCode,
  3990. Header: res.Header,
  3991. }
  3992. }
  3993. if err != nil {
  3994. return nil, err
  3995. }
  3996. defer googleapi.CloseBody(res)
  3997. if err := googleapi.CheckResponse(res); err != nil {
  3998. return nil, err
  3999. }
  4000. ret := &Circle{
  4001. ServerResponse: googleapi.ServerResponse{
  4002. Header: res.Header,
  4003. HTTPStatusCode: res.StatusCode,
  4004. },
  4005. }
  4006. target := &ret
  4007. if err := gensupport.DecodeResponse(target, res); err != nil {
  4008. return nil, err
  4009. }
  4010. return ret, nil
  4011. // {
  4012. // "description": "Update a circle's description.",
  4013. // "httpMethod": "PUT",
  4014. // "id": "plusDomains.circles.update",
  4015. // "parameterOrder": [
  4016. // "circleId"
  4017. // ],
  4018. // "parameters": {
  4019. // "circleId": {
  4020. // "description": "The ID of the circle to update.",
  4021. // "location": "path",
  4022. // "required": true,
  4023. // "type": "string"
  4024. // }
  4025. // },
  4026. // "path": "circles/{circleId}",
  4027. // "request": {
  4028. // "$ref": "Circle"
  4029. // },
  4030. // "response": {
  4031. // "$ref": "Circle"
  4032. // },
  4033. // "scopes": [
  4034. // "https://www.googleapis.com/auth/plus.circles.write",
  4035. // "https://www.googleapis.com/auth/plus.login"
  4036. // ]
  4037. // }
  4038. }
  4039. // method id "plusDomains.comments.get":
  4040. type CommentsGetCall struct {
  4041. s *Service
  4042. commentId string
  4043. urlParams_ gensupport.URLParams
  4044. ifNoneMatch_ string
  4045. ctx_ context.Context
  4046. header_ http.Header
  4047. }
  4048. // Get: Get a comment.
  4049. func (r *CommentsService) Get(commentId string) *CommentsGetCall {
  4050. c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4051. c.commentId = commentId
  4052. return c
  4053. }
  4054. // Fields allows partial responses to be retrieved. See
  4055. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4056. // for more information.
  4057. func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
  4058. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4059. return c
  4060. }
  4061. // IfNoneMatch sets the optional parameter which makes the operation
  4062. // fail if the object's ETag matches the given value. This is useful for
  4063. // getting updates only after the object has changed since the last
  4064. // request. Use googleapi.IsNotModified to check whether the response
  4065. // error from Do is the result of In-None-Match.
  4066. func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
  4067. c.ifNoneMatch_ = entityTag
  4068. return c
  4069. }
  4070. // Context sets the context to be used in this call's Do method. Any
  4071. // pending HTTP request will be aborted if the provided context is
  4072. // canceled.
  4073. func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
  4074. c.ctx_ = ctx
  4075. return c
  4076. }
  4077. // Header returns an http.Header that can be modified by the caller to
  4078. // add HTTP headers to the request.
  4079. func (c *CommentsGetCall) Header() http.Header {
  4080. if c.header_ == nil {
  4081. c.header_ = make(http.Header)
  4082. }
  4083. return c.header_
  4084. }
  4085. func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
  4086. reqHeaders := make(http.Header)
  4087. for k, v := range c.header_ {
  4088. reqHeaders[k] = v
  4089. }
  4090. reqHeaders.Set("User-Agent", c.s.userAgent())
  4091. if c.ifNoneMatch_ != "" {
  4092. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4093. }
  4094. var body io.Reader = nil
  4095. c.urlParams_.Set("alt", alt)
  4096. c.urlParams_.Set("prettyPrint", "false")
  4097. urls := googleapi.ResolveRelative(c.s.BasePath, "comments/{commentId}")
  4098. urls += "?" + c.urlParams_.Encode()
  4099. req, err := http.NewRequest("GET", urls, body)
  4100. if err != nil {
  4101. return nil, err
  4102. }
  4103. req.Header = reqHeaders
  4104. googleapi.Expand(req.URL, map[string]string{
  4105. "commentId": c.commentId,
  4106. })
  4107. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4108. }
  4109. // Do executes the "plusDomains.comments.get" call.
  4110. // Exactly one of *Comment or error will be non-nil. Any non-2xx status
  4111. // code is an error. Response headers are in either
  4112. // *Comment.ServerResponse.Header or (if a response was returned at all)
  4113. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4114. // check whether the returned error was because http.StatusNotModified
  4115. // was returned.
  4116. func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  4117. gensupport.SetOptions(c.urlParams_, opts...)
  4118. res, err := c.doRequest("json")
  4119. if res != nil && res.StatusCode == http.StatusNotModified {
  4120. if res.Body != nil {
  4121. res.Body.Close()
  4122. }
  4123. return nil, &googleapi.Error{
  4124. Code: res.StatusCode,
  4125. Header: res.Header,
  4126. }
  4127. }
  4128. if err != nil {
  4129. return nil, err
  4130. }
  4131. defer googleapi.CloseBody(res)
  4132. if err := googleapi.CheckResponse(res); err != nil {
  4133. return nil, err
  4134. }
  4135. ret := &Comment{
  4136. ServerResponse: googleapi.ServerResponse{
  4137. Header: res.Header,
  4138. HTTPStatusCode: res.StatusCode,
  4139. },
  4140. }
  4141. target := &ret
  4142. if err := gensupport.DecodeResponse(target, res); err != nil {
  4143. return nil, err
  4144. }
  4145. return ret, nil
  4146. // {
  4147. // "description": "Get a comment.",
  4148. // "httpMethod": "GET",
  4149. // "id": "plusDomains.comments.get",
  4150. // "parameterOrder": [
  4151. // "commentId"
  4152. // ],
  4153. // "parameters": {
  4154. // "commentId": {
  4155. // "description": "The ID of the comment to get.",
  4156. // "location": "path",
  4157. // "required": true,
  4158. // "type": "string"
  4159. // }
  4160. // },
  4161. // "path": "comments/{commentId}",
  4162. // "response": {
  4163. // "$ref": "Comment"
  4164. // },
  4165. // "scopes": [
  4166. // "https://www.googleapis.com/auth/plus.login",
  4167. // "https://www.googleapis.com/auth/plus.stream.read"
  4168. // ]
  4169. // }
  4170. }
  4171. // method id "plusDomains.comments.insert":
  4172. type CommentsInsertCall struct {
  4173. s *Service
  4174. activityId string
  4175. comment *Comment
  4176. urlParams_ gensupport.URLParams
  4177. ctx_ context.Context
  4178. header_ http.Header
  4179. }
  4180. // Insert: Create a new comment in reply to an activity.
  4181. func (r *CommentsService) Insert(activityId string, comment *Comment) *CommentsInsertCall {
  4182. c := &CommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4183. c.activityId = activityId
  4184. c.comment = comment
  4185. return c
  4186. }
  4187. // Fields allows partial responses to be retrieved. See
  4188. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4189. // for more information.
  4190. func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
  4191. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4192. return c
  4193. }
  4194. // Context sets the context to be used in this call's Do method. Any
  4195. // pending HTTP request will be aborted if the provided context is
  4196. // canceled.
  4197. func (c *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
  4198. c.ctx_ = ctx
  4199. return c
  4200. }
  4201. // Header returns an http.Header that can be modified by the caller to
  4202. // add HTTP headers to the request.
  4203. func (c *CommentsInsertCall) Header() http.Header {
  4204. if c.header_ == nil {
  4205. c.header_ = make(http.Header)
  4206. }
  4207. return c.header_
  4208. }
  4209. func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
  4210. reqHeaders := make(http.Header)
  4211. for k, v := range c.header_ {
  4212. reqHeaders[k] = v
  4213. }
  4214. reqHeaders.Set("User-Agent", c.s.userAgent())
  4215. var body io.Reader = nil
  4216. body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
  4217. if err != nil {
  4218. return nil, err
  4219. }
  4220. reqHeaders.Set("Content-Type", "application/json")
  4221. c.urlParams_.Set("alt", alt)
  4222. c.urlParams_.Set("prettyPrint", "false")
  4223. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/comments")
  4224. urls += "?" + c.urlParams_.Encode()
  4225. req, err := http.NewRequest("POST", urls, body)
  4226. if err != nil {
  4227. return nil, err
  4228. }
  4229. req.Header = reqHeaders
  4230. googleapi.Expand(req.URL, map[string]string{
  4231. "activityId": c.activityId,
  4232. })
  4233. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4234. }
  4235. // Do executes the "plusDomains.comments.insert" call.
  4236. // Exactly one of *Comment or error will be non-nil. Any non-2xx status
  4237. // code is an error. Response headers are in either
  4238. // *Comment.ServerResponse.Header or (if a response was returned at all)
  4239. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4240. // check whether the returned error was because http.StatusNotModified
  4241. // was returned.
  4242. func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  4243. gensupport.SetOptions(c.urlParams_, opts...)
  4244. res, err := c.doRequest("json")
  4245. if res != nil && res.StatusCode == http.StatusNotModified {
  4246. if res.Body != nil {
  4247. res.Body.Close()
  4248. }
  4249. return nil, &googleapi.Error{
  4250. Code: res.StatusCode,
  4251. Header: res.Header,
  4252. }
  4253. }
  4254. if err != nil {
  4255. return nil, err
  4256. }
  4257. defer googleapi.CloseBody(res)
  4258. if err := googleapi.CheckResponse(res); err != nil {
  4259. return nil, err
  4260. }
  4261. ret := &Comment{
  4262. ServerResponse: googleapi.ServerResponse{
  4263. Header: res.Header,
  4264. HTTPStatusCode: res.StatusCode,
  4265. },
  4266. }
  4267. target := &ret
  4268. if err := gensupport.DecodeResponse(target, res); err != nil {
  4269. return nil, err
  4270. }
  4271. return ret, nil
  4272. // {
  4273. // "description": "Create a new comment in reply to an activity.",
  4274. // "httpMethod": "POST",
  4275. // "id": "plusDomains.comments.insert",
  4276. // "parameterOrder": [
  4277. // "activityId"
  4278. // ],
  4279. // "parameters": {
  4280. // "activityId": {
  4281. // "description": "The ID of the activity to reply to.",
  4282. // "location": "path",
  4283. // "required": true,
  4284. // "type": "string"
  4285. // }
  4286. // },
  4287. // "path": "activities/{activityId}/comments",
  4288. // "request": {
  4289. // "$ref": "Comment"
  4290. // },
  4291. // "response": {
  4292. // "$ref": "Comment"
  4293. // },
  4294. // "scopes": [
  4295. // "https://www.googleapis.com/auth/plus.login",
  4296. // "https://www.googleapis.com/auth/plus.stream.write"
  4297. // ]
  4298. // }
  4299. }
  4300. // method id "plusDomains.comments.list":
  4301. type CommentsListCall struct {
  4302. s *Service
  4303. activityId string
  4304. urlParams_ gensupport.URLParams
  4305. ifNoneMatch_ string
  4306. ctx_ context.Context
  4307. header_ http.Header
  4308. }
  4309. // List: List all of the comments for an activity.
  4310. func (r *CommentsService) List(activityId string) *CommentsListCall {
  4311. c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4312. c.activityId = activityId
  4313. return c
  4314. }
  4315. // MaxResults sets the optional parameter "maxResults": The maximum
  4316. // number of comments to include in the response, which is used for
  4317. // paging. For any response, the actual number returned might be less
  4318. // than the specified maxResults.
  4319. func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
  4320. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4321. return c
  4322. }
  4323. // PageToken sets the optional parameter "pageToken": The continuation
  4324. // token, which is used to page through large result sets. To get the
  4325. // next page of results, set this parameter to the value of
  4326. // "nextPageToken" from the previous response.
  4327. func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
  4328. c.urlParams_.Set("pageToken", pageToken)
  4329. return c
  4330. }
  4331. // SortOrder sets the optional parameter "sortOrder": The order in which
  4332. // to sort the list of comments.
  4333. //
  4334. // Possible values:
  4335. // "ascending" (default) - Sort oldest comments first.
  4336. // "descending" - Sort newest comments first.
  4337. func (c *CommentsListCall) SortOrder(sortOrder string) *CommentsListCall {
  4338. c.urlParams_.Set("sortOrder", sortOrder)
  4339. return c
  4340. }
  4341. // Fields allows partial responses to be retrieved. See
  4342. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4343. // for more information.
  4344. func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
  4345. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4346. return c
  4347. }
  4348. // IfNoneMatch sets the optional parameter which makes the operation
  4349. // fail if the object's ETag matches the given value. This is useful for
  4350. // getting updates only after the object has changed since the last
  4351. // request. Use googleapi.IsNotModified to check whether the response
  4352. // error from Do is the result of In-None-Match.
  4353. func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
  4354. c.ifNoneMatch_ = entityTag
  4355. return c
  4356. }
  4357. // Context sets the context to be used in this call's Do method. Any
  4358. // pending HTTP request will be aborted if the provided context is
  4359. // canceled.
  4360. func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
  4361. c.ctx_ = ctx
  4362. return c
  4363. }
  4364. // Header returns an http.Header that can be modified by the caller to
  4365. // add HTTP headers to the request.
  4366. func (c *CommentsListCall) Header() http.Header {
  4367. if c.header_ == nil {
  4368. c.header_ = make(http.Header)
  4369. }
  4370. return c.header_
  4371. }
  4372. func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
  4373. reqHeaders := make(http.Header)
  4374. for k, v := range c.header_ {
  4375. reqHeaders[k] = v
  4376. }
  4377. reqHeaders.Set("User-Agent", c.s.userAgent())
  4378. if c.ifNoneMatch_ != "" {
  4379. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4380. }
  4381. var body io.Reader = nil
  4382. c.urlParams_.Set("alt", alt)
  4383. c.urlParams_.Set("prettyPrint", "false")
  4384. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/comments")
  4385. urls += "?" + c.urlParams_.Encode()
  4386. req, err := http.NewRequest("GET", urls, body)
  4387. if err != nil {
  4388. return nil, err
  4389. }
  4390. req.Header = reqHeaders
  4391. googleapi.Expand(req.URL, map[string]string{
  4392. "activityId": c.activityId,
  4393. })
  4394. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4395. }
  4396. // Do executes the "plusDomains.comments.list" call.
  4397. // Exactly one of *CommentFeed or error will be non-nil. Any non-2xx
  4398. // status code is an error. Response headers are in either
  4399. // *CommentFeed.ServerResponse.Header or (if a response was returned at
  4400. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4401. // to check whether the returned error was because
  4402. // http.StatusNotModified was returned.
  4403. func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentFeed, error) {
  4404. gensupport.SetOptions(c.urlParams_, opts...)
  4405. res, err := c.doRequest("json")
  4406. if res != nil && res.StatusCode == http.StatusNotModified {
  4407. if res.Body != nil {
  4408. res.Body.Close()
  4409. }
  4410. return nil, &googleapi.Error{
  4411. Code: res.StatusCode,
  4412. Header: res.Header,
  4413. }
  4414. }
  4415. if err != nil {
  4416. return nil, err
  4417. }
  4418. defer googleapi.CloseBody(res)
  4419. if err := googleapi.CheckResponse(res); err != nil {
  4420. return nil, err
  4421. }
  4422. ret := &CommentFeed{
  4423. ServerResponse: googleapi.ServerResponse{
  4424. Header: res.Header,
  4425. HTTPStatusCode: res.StatusCode,
  4426. },
  4427. }
  4428. target := &ret
  4429. if err := gensupport.DecodeResponse(target, res); err != nil {
  4430. return nil, err
  4431. }
  4432. return ret, nil
  4433. // {
  4434. // "description": "List all of the comments for an activity.",
  4435. // "httpMethod": "GET",
  4436. // "id": "plusDomains.comments.list",
  4437. // "parameterOrder": [
  4438. // "activityId"
  4439. // ],
  4440. // "parameters": {
  4441. // "activityId": {
  4442. // "description": "The ID of the activity to get comments for.",
  4443. // "location": "path",
  4444. // "required": true,
  4445. // "type": "string"
  4446. // },
  4447. // "maxResults": {
  4448. // "default": "20",
  4449. // "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.",
  4450. // "format": "uint32",
  4451. // "location": "query",
  4452. // "maximum": "500",
  4453. // "minimum": "0",
  4454. // "type": "integer"
  4455. // },
  4456. // "pageToken": {
  4457. // "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.",
  4458. // "location": "query",
  4459. // "type": "string"
  4460. // },
  4461. // "sortOrder": {
  4462. // "default": "ascending",
  4463. // "description": "The order in which to sort the list of comments.",
  4464. // "enum": [
  4465. // "ascending",
  4466. // "descending"
  4467. // ],
  4468. // "enumDescriptions": [
  4469. // "Sort oldest comments first.",
  4470. // "Sort newest comments first."
  4471. // ],
  4472. // "location": "query",
  4473. // "type": "string"
  4474. // }
  4475. // },
  4476. // "path": "activities/{activityId}/comments",
  4477. // "response": {
  4478. // "$ref": "CommentFeed"
  4479. // },
  4480. // "scopes": [
  4481. // "https://www.googleapis.com/auth/plus.login",
  4482. // "https://www.googleapis.com/auth/plus.stream.read"
  4483. // ]
  4484. // }
  4485. }
  4486. // Pages invokes f for each page of results.
  4487. // A non-nil error returned from f will halt the iteration.
  4488. // The provided context supersedes any context provided to the Context method.
  4489. func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentFeed) error) error {
  4490. c.ctx_ = ctx
  4491. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4492. for {
  4493. x, err := c.Do()
  4494. if err != nil {
  4495. return err
  4496. }
  4497. if err := f(x); err != nil {
  4498. return err
  4499. }
  4500. if x.NextPageToken == "" {
  4501. return nil
  4502. }
  4503. c.PageToken(x.NextPageToken)
  4504. }
  4505. }
  4506. // method id "plusDomains.media.insert":
  4507. type MediaInsertCall struct {
  4508. s *Service
  4509. userId string
  4510. collection string
  4511. media *Media
  4512. urlParams_ gensupport.URLParams
  4513. mediaInfo_ *gensupport.MediaInfo
  4514. ctx_ context.Context
  4515. header_ http.Header
  4516. }
  4517. // Insert: Add a new media item to an album. The current upload size
  4518. // limitations are 36MB for a photo and 1GB for a video. Uploads do not
  4519. // count against quota if photos are less than 2048 pixels on their
  4520. // longest side or videos are less than 15 minutes in length.
  4521. func (r *MediaService) Insert(userId string, collection string, media *Media) *MediaInsertCall {
  4522. c := &MediaInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4523. c.userId = userId
  4524. c.collection = collection
  4525. c.media = media
  4526. return c
  4527. }
  4528. // Media specifies the media to upload in one or more chunks. The chunk
  4529. // size may be controlled by supplying a MediaOption generated by
  4530. // googleapi.ChunkSize. The chunk size defaults to
  4531. // googleapi.DefaultUploadChunkSize.The Content-Type header used in the
  4532. // upload request will be determined by sniffing the contents of r,
  4533. // unless a MediaOption generated by googleapi.ContentType is
  4534. // supplied.
  4535. // At most one of Media and ResumableMedia may be set.
  4536. func (c *MediaInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaInsertCall {
  4537. c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  4538. return c
  4539. }
  4540. // ResumableMedia specifies the media to upload in chunks and can be
  4541. // canceled with ctx.
  4542. //
  4543. // Deprecated: use Media instead.
  4544. //
  4545. // At most one of Media and ResumableMedia may be set. mediaType
  4546. // identifies the MIME media type of the upload, such as "image/png". If
  4547. // mediaType is "", it will be auto-detected. The provided ctx will
  4548. // supersede any context previously provided to the Context method.
  4549. func (c *MediaInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaInsertCall {
  4550. c.ctx_ = ctx
  4551. c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  4552. return c
  4553. }
  4554. // ProgressUpdater provides a callback function that will be called
  4555. // after every chunk. It should be a low-latency function in order to
  4556. // not slow down the upload operation. This should only be called when
  4557. // using ResumableMedia (as opposed to Media).
  4558. func (c *MediaInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaInsertCall {
  4559. c.mediaInfo_.SetProgressUpdater(pu)
  4560. return c
  4561. }
  4562. // Fields allows partial responses to be retrieved. See
  4563. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4564. // for more information.
  4565. func (c *MediaInsertCall) Fields(s ...googleapi.Field) *MediaInsertCall {
  4566. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4567. return c
  4568. }
  4569. // Context sets the context to be used in this call's Do method. Any
  4570. // pending HTTP request will be aborted if the provided context is
  4571. // canceled.
  4572. // This context will supersede any context previously provided to the
  4573. // ResumableMedia method.
  4574. func (c *MediaInsertCall) Context(ctx context.Context) *MediaInsertCall {
  4575. c.ctx_ = ctx
  4576. return c
  4577. }
  4578. // Header returns an http.Header that can be modified by the caller to
  4579. // add HTTP headers to the request.
  4580. func (c *MediaInsertCall) Header() http.Header {
  4581. if c.header_ == nil {
  4582. c.header_ = make(http.Header)
  4583. }
  4584. return c.header_
  4585. }
  4586. func (c *MediaInsertCall) doRequest(alt string) (*http.Response, error) {
  4587. reqHeaders := make(http.Header)
  4588. for k, v := range c.header_ {
  4589. reqHeaders[k] = v
  4590. }
  4591. reqHeaders.Set("User-Agent", c.s.userAgent())
  4592. var body io.Reader = nil
  4593. body, err := googleapi.WithoutDataWrapper.JSONReader(c.media)
  4594. if err != nil {
  4595. return nil, err
  4596. }
  4597. reqHeaders.Set("Content-Type", "application/json")
  4598. c.urlParams_.Set("alt", alt)
  4599. c.urlParams_.Set("prettyPrint", "false")
  4600. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/media/{collection}")
  4601. if c.mediaInfo_ != nil {
  4602. urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
  4603. c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  4604. }
  4605. if body == nil {
  4606. body = new(bytes.Buffer)
  4607. reqHeaders.Set("Content-Type", "application/json")
  4608. }
  4609. body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  4610. defer cleanup()
  4611. urls += "?" + c.urlParams_.Encode()
  4612. req, err := http.NewRequest("POST", urls, body)
  4613. if err != nil {
  4614. return nil, err
  4615. }
  4616. req.Header = reqHeaders
  4617. req.GetBody = getBody
  4618. googleapi.Expand(req.URL, map[string]string{
  4619. "userId": c.userId,
  4620. "collection": c.collection,
  4621. })
  4622. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4623. }
  4624. // Do executes the "plusDomains.media.insert" call.
  4625. // Exactly one of *Media or error will be non-nil. Any non-2xx status
  4626. // code is an error. Response headers are in either
  4627. // *Media.ServerResponse.Header or (if a response was returned at all)
  4628. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4629. // check whether the returned error was because http.StatusNotModified
  4630. // was returned.
  4631. func (c *MediaInsertCall) Do(opts ...googleapi.CallOption) (*Media, error) {
  4632. gensupport.SetOptions(c.urlParams_, opts...)
  4633. res, err := c.doRequest("json")
  4634. if res != nil && res.StatusCode == http.StatusNotModified {
  4635. if res.Body != nil {
  4636. res.Body.Close()
  4637. }
  4638. return nil, &googleapi.Error{
  4639. Code: res.StatusCode,
  4640. Header: res.Header,
  4641. }
  4642. }
  4643. if err != nil {
  4644. return nil, err
  4645. }
  4646. defer googleapi.CloseBody(res)
  4647. if err := googleapi.CheckResponse(res); err != nil {
  4648. return nil, err
  4649. }
  4650. rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  4651. if rx != nil {
  4652. rx.Client = c.s.client
  4653. rx.UserAgent = c.s.userAgent()
  4654. ctx := c.ctx_
  4655. if ctx == nil {
  4656. ctx = context.TODO()
  4657. }
  4658. res, err = rx.Upload(ctx)
  4659. if err != nil {
  4660. return nil, err
  4661. }
  4662. defer res.Body.Close()
  4663. if err := googleapi.CheckResponse(res); err != nil {
  4664. return nil, err
  4665. }
  4666. }
  4667. ret := &Media{
  4668. ServerResponse: googleapi.ServerResponse{
  4669. Header: res.Header,
  4670. HTTPStatusCode: res.StatusCode,
  4671. },
  4672. }
  4673. target := &ret
  4674. if err := gensupport.DecodeResponse(target, res); err != nil {
  4675. return nil, err
  4676. }
  4677. return ret, nil
  4678. // {
  4679. // "description": "Add a new media item to an album. The current upload size limitations are 36MB for a photo and 1GB for a video. Uploads do not count against quota if photos are less than 2048 pixels on their longest side or videos are less than 15 minutes in length.",
  4680. // "httpMethod": "POST",
  4681. // "id": "plusDomains.media.insert",
  4682. // "mediaUpload": {
  4683. // "accept": [
  4684. // "image/*",
  4685. // "video/*"
  4686. // ],
  4687. // "protocols": {
  4688. // "resumable": {
  4689. // "multipart": true,
  4690. // "path": "/resumable/upload/plusDomains/v1/people/{userId}/media/{collection}"
  4691. // },
  4692. // "simple": {
  4693. // "multipart": true,
  4694. // "path": "/upload/plusDomains/v1/people/{userId}/media/{collection}"
  4695. // }
  4696. // }
  4697. // },
  4698. // "parameterOrder": [
  4699. // "userId",
  4700. // "collection"
  4701. // ],
  4702. // "parameters": {
  4703. // "collection": {
  4704. // "enum": [
  4705. // "cloud"
  4706. // ],
  4707. // "enumDescriptions": [
  4708. // "Upload the media to share on Google+."
  4709. // ],
  4710. // "location": "path",
  4711. // "required": true,
  4712. // "type": "string"
  4713. // },
  4714. // "userId": {
  4715. // "description": "The ID of the user to create the activity on behalf of.",
  4716. // "location": "path",
  4717. // "required": true,
  4718. // "type": "string"
  4719. // }
  4720. // },
  4721. // "path": "people/{userId}/media/{collection}",
  4722. // "request": {
  4723. // "$ref": "Media"
  4724. // },
  4725. // "response": {
  4726. // "$ref": "Media"
  4727. // },
  4728. // "scopes": [
  4729. // "https://www.googleapis.com/auth/plus.login",
  4730. // "https://www.googleapis.com/auth/plus.me",
  4731. // "https://www.googleapis.com/auth/plus.media.upload"
  4732. // ],
  4733. // "supportsMediaUpload": true
  4734. // }
  4735. }
  4736. // method id "plusDomains.people.get":
  4737. type PeopleGetCall struct {
  4738. s *Service
  4739. userId string
  4740. urlParams_ gensupport.URLParams
  4741. ifNoneMatch_ string
  4742. ctx_ context.Context
  4743. header_ http.Header
  4744. }
  4745. // Get: Get a person's profile.
  4746. func (r *PeopleService) Get(userId string) *PeopleGetCall {
  4747. c := &PeopleGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4748. c.userId = userId
  4749. return c
  4750. }
  4751. // Fields allows partial responses to be retrieved. See
  4752. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4753. // for more information.
  4754. func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall {
  4755. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4756. return c
  4757. }
  4758. // IfNoneMatch sets the optional parameter which makes the operation
  4759. // fail if the object's ETag matches the given value. This is useful for
  4760. // getting updates only after the object has changed since the last
  4761. // request. Use googleapi.IsNotModified to check whether the response
  4762. // error from Do is the result of In-None-Match.
  4763. func (c *PeopleGetCall) IfNoneMatch(entityTag string) *PeopleGetCall {
  4764. c.ifNoneMatch_ = entityTag
  4765. return c
  4766. }
  4767. // Context sets the context to be used in this call's Do method. Any
  4768. // pending HTTP request will be aborted if the provided context is
  4769. // canceled.
  4770. func (c *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
  4771. c.ctx_ = ctx
  4772. return c
  4773. }
  4774. // Header returns an http.Header that can be modified by the caller to
  4775. // add HTTP headers to the request.
  4776. func (c *PeopleGetCall) Header() http.Header {
  4777. if c.header_ == nil {
  4778. c.header_ = make(http.Header)
  4779. }
  4780. return c.header_
  4781. }
  4782. func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
  4783. reqHeaders := make(http.Header)
  4784. for k, v := range c.header_ {
  4785. reqHeaders[k] = v
  4786. }
  4787. reqHeaders.Set("User-Agent", c.s.userAgent())
  4788. if c.ifNoneMatch_ != "" {
  4789. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4790. }
  4791. var body io.Reader = nil
  4792. c.urlParams_.Set("alt", alt)
  4793. c.urlParams_.Set("prettyPrint", "false")
  4794. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}")
  4795. urls += "?" + c.urlParams_.Encode()
  4796. req, err := http.NewRequest("GET", urls, body)
  4797. if err != nil {
  4798. return nil, err
  4799. }
  4800. req.Header = reqHeaders
  4801. googleapi.Expand(req.URL, map[string]string{
  4802. "userId": c.userId,
  4803. })
  4804. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4805. }
  4806. // Do executes the "plusDomains.people.get" call.
  4807. // Exactly one of *Person or error will be non-nil. Any non-2xx status
  4808. // code is an error. Response headers are in either
  4809. // *Person.ServerResponse.Header or (if a response was returned at all)
  4810. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4811. // check whether the returned error was because http.StatusNotModified
  4812. // was returned.
  4813. func (c *PeopleGetCall) Do(opts ...googleapi.CallOption) (*Person, error) {
  4814. gensupport.SetOptions(c.urlParams_, opts...)
  4815. res, err := c.doRequest("json")
  4816. if res != nil && res.StatusCode == http.StatusNotModified {
  4817. if res.Body != nil {
  4818. res.Body.Close()
  4819. }
  4820. return nil, &googleapi.Error{
  4821. Code: res.StatusCode,
  4822. Header: res.Header,
  4823. }
  4824. }
  4825. if err != nil {
  4826. return nil, err
  4827. }
  4828. defer googleapi.CloseBody(res)
  4829. if err := googleapi.CheckResponse(res); err != nil {
  4830. return nil, err
  4831. }
  4832. ret := &Person{
  4833. ServerResponse: googleapi.ServerResponse{
  4834. Header: res.Header,
  4835. HTTPStatusCode: res.StatusCode,
  4836. },
  4837. }
  4838. target := &ret
  4839. if err := gensupport.DecodeResponse(target, res); err != nil {
  4840. return nil, err
  4841. }
  4842. return ret, nil
  4843. // {
  4844. // "description": "Get a person's profile.",
  4845. // "httpMethod": "GET",
  4846. // "id": "plusDomains.people.get",
  4847. // "parameterOrder": [
  4848. // "userId"
  4849. // ],
  4850. // "parameters": {
  4851. // "userId": {
  4852. // "description": "The ID of the person to get the profile for. The special value \"me\" can be used to indicate the authenticated user.",
  4853. // "location": "path",
  4854. // "required": true,
  4855. // "type": "string"
  4856. // }
  4857. // },
  4858. // "path": "people/{userId}",
  4859. // "response": {
  4860. // "$ref": "Person"
  4861. // },
  4862. // "scopes": [
  4863. // "https://www.googleapis.com/auth/plus.login",
  4864. // "https://www.googleapis.com/auth/plus.me",
  4865. // "https://www.googleapis.com/auth/plus.profiles.read",
  4866. // "https://www.googleapis.com/auth/userinfo.email",
  4867. // "https://www.googleapis.com/auth/userinfo.profile"
  4868. // ]
  4869. // }
  4870. }
  4871. // method id "plusDomains.people.list":
  4872. type PeopleListCall struct {
  4873. s *Service
  4874. userId string
  4875. collection string
  4876. urlParams_ gensupport.URLParams
  4877. ifNoneMatch_ string
  4878. ctx_ context.Context
  4879. header_ http.Header
  4880. }
  4881. // List: List all of the people in the specified collection.
  4882. func (r *PeopleService) List(userId string, collection string) *PeopleListCall {
  4883. c := &PeopleListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4884. c.userId = userId
  4885. c.collection = collection
  4886. return c
  4887. }
  4888. // MaxResults sets the optional parameter "maxResults": The maximum
  4889. // number of people to include in the response, which is used for
  4890. // paging. For any response, the actual number returned might be less
  4891. // than the specified maxResults.
  4892. func (c *PeopleListCall) MaxResults(maxResults int64) *PeopleListCall {
  4893. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4894. return c
  4895. }
  4896. // OrderBy sets the optional parameter "orderBy": The order to return
  4897. // people in.
  4898. //
  4899. // Possible values:
  4900. // "alphabetical" - Order the people by their display name.
  4901. // "best" - Order people based on the relevence to the viewer.
  4902. func (c *PeopleListCall) OrderBy(orderBy string) *PeopleListCall {
  4903. c.urlParams_.Set("orderBy", orderBy)
  4904. return c
  4905. }
  4906. // PageToken sets the optional parameter "pageToken": The continuation
  4907. // token, which is used to page through large result sets. To get the
  4908. // next page of results, set this parameter to the value of
  4909. // "nextPageToken" from the previous response.
  4910. func (c *PeopleListCall) PageToken(pageToken string) *PeopleListCall {
  4911. c.urlParams_.Set("pageToken", pageToken)
  4912. return c
  4913. }
  4914. // Fields allows partial responses to be retrieved. See
  4915. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4916. // for more information.
  4917. func (c *PeopleListCall) Fields(s ...googleapi.Field) *PeopleListCall {
  4918. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4919. return c
  4920. }
  4921. // IfNoneMatch sets the optional parameter which makes the operation
  4922. // fail if the object's ETag matches the given value. This is useful for
  4923. // getting updates only after the object has changed since the last
  4924. // request. Use googleapi.IsNotModified to check whether the response
  4925. // error from Do is the result of In-None-Match.
  4926. func (c *PeopleListCall) IfNoneMatch(entityTag string) *PeopleListCall {
  4927. c.ifNoneMatch_ = entityTag
  4928. return c
  4929. }
  4930. // Context sets the context to be used in this call's Do method. Any
  4931. // pending HTTP request will be aborted if the provided context is
  4932. // canceled.
  4933. func (c *PeopleListCall) Context(ctx context.Context) *PeopleListCall {
  4934. c.ctx_ = ctx
  4935. return c
  4936. }
  4937. // Header returns an http.Header that can be modified by the caller to
  4938. // add HTTP headers to the request.
  4939. func (c *PeopleListCall) Header() http.Header {
  4940. if c.header_ == nil {
  4941. c.header_ = make(http.Header)
  4942. }
  4943. return c.header_
  4944. }
  4945. func (c *PeopleListCall) doRequest(alt string) (*http.Response, error) {
  4946. reqHeaders := make(http.Header)
  4947. for k, v := range c.header_ {
  4948. reqHeaders[k] = v
  4949. }
  4950. reqHeaders.Set("User-Agent", c.s.userAgent())
  4951. if c.ifNoneMatch_ != "" {
  4952. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4953. }
  4954. var body io.Reader = nil
  4955. c.urlParams_.Set("alt", alt)
  4956. c.urlParams_.Set("prettyPrint", "false")
  4957. urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/people/{collection}")
  4958. urls += "?" + c.urlParams_.Encode()
  4959. req, err := http.NewRequest("GET", urls, body)
  4960. if err != nil {
  4961. return nil, err
  4962. }
  4963. req.Header = reqHeaders
  4964. googleapi.Expand(req.URL, map[string]string{
  4965. "userId": c.userId,
  4966. "collection": c.collection,
  4967. })
  4968. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4969. }
  4970. // Do executes the "plusDomains.people.list" call.
  4971. // Exactly one of *PeopleFeed or error will be non-nil. Any non-2xx
  4972. // status code is an error. Response headers are in either
  4973. // *PeopleFeed.ServerResponse.Header or (if a response was returned at
  4974. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4975. // to check whether the returned error was because
  4976. // http.StatusNotModified was returned.
  4977. func (c *PeopleListCall) Do(opts ...googleapi.CallOption) (*PeopleFeed, error) {
  4978. gensupport.SetOptions(c.urlParams_, opts...)
  4979. res, err := c.doRequest("json")
  4980. if res != nil && res.StatusCode == http.StatusNotModified {
  4981. if res.Body != nil {
  4982. res.Body.Close()
  4983. }
  4984. return nil, &googleapi.Error{
  4985. Code: res.StatusCode,
  4986. Header: res.Header,
  4987. }
  4988. }
  4989. if err != nil {
  4990. return nil, err
  4991. }
  4992. defer googleapi.CloseBody(res)
  4993. if err := googleapi.CheckResponse(res); err != nil {
  4994. return nil, err
  4995. }
  4996. ret := &PeopleFeed{
  4997. ServerResponse: googleapi.ServerResponse{
  4998. Header: res.Header,
  4999. HTTPStatusCode: res.StatusCode,
  5000. },
  5001. }
  5002. target := &ret
  5003. if err := gensupport.DecodeResponse(target, res); err != nil {
  5004. return nil, err
  5005. }
  5006. return ret, nil
  5007. // {
  5008. // "description": "List all of the people in the specified collection.",
  5009. // "httpMethod": "GET",
  5010. // "id": "plusDomains.people.list",
  5011. // "parameterOrder": [
  5012. // "userId",
  5013. // "collection"
  5014. // ],
  5015. // "parameters": {
  5016. // "collection": {
  5017. // "description": "The collection of people to list.",
  5018. // "enum": [
  5019. // "circled"
  5020. // ],
  5021. // "enumDescriptions": [
  5022. // "The list of people who this user has added to one or more circles."
  5023. // ],
  5024. // "location": "path",
  5025. // "required": true,
  5026. // "type": "string"
  5027. // },
  5028. // "maxResults": {
  5029. // "default": "100",
  5030. // "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.",
  5031. // "format": "uint32",
  5032. // "location": "query",
  5033. // "maximum": "100",
  5034. // "minimum": "1",
  5035. // "type": "integer"
  5036. // },
  5037. // "orderBy": {
  5038. // "description": "The order to return people in.",
  5039. // "enum": [
  5040. // "alphabetical",
  5041. // "best"
  5042. // ],
  5043. // "enumDescriptions": [
  5044. // "Order the people by their display name.",
  5045. // "Order people based on the relevence to the viewer."
  5046. // ],
  5047. // "location": "query",
  5048. // "type": "string"
  5049. // },
  5050. // "pageToken": {
  5051. // "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.",
  5052. // "location": "query",
  5053. // "type": "string"
  5054. // },
  5055. // "userId": {
  5056. // "description": "Get the collection of people for the person identified. Use \"me\" to indicate the authenticated user.",
  5057. // "location": "path",
  5058. // "required": true,
  5059. // "type": "string"
  5060. // }
  5061. // },
  5062. // "path": "people/{userId}/people/{collection}",
  5063. // "response": {
  5064. // "$ref": "PeopleFeed"
  5065. // },
  5066. // "scopes": [
  5067. // "https://www.googleapis.com/auth/plus.circles.read",
  5068. // "https://www.googleapis.com/auth/plus.login",
  5069. // "https://www.googleapis.com/auth/plus.me"
  5070. // ]
  5071. // }
  5072. }
  5073. // Pages invokes f for each page of results.
  5074. // A non-nil error returned from f will halt the iteration.
  5075. // The provided context supersedes any context provided to the Context method.
  5076. func (c *PeopleListCall) Pages(ctx context.Context, f func(*PeopleFeed) error) error {
  5077. c.ctx_ = ctx
  5078. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5079. for {
  5080. x, err := c.Do()
  5081. if err != nil {
  5082. return err
  5083. }
  5084. if err := f(x); err != nil {
  5085. return err
  5086. }
  5087. if x.NextPageToken == "" {
  5088. return nil
  5089. }
  5090. c.PageToken(x.NextPageToken)
  5091. }
  5092. }
  5093. // method id "plusDomains.people.listByActivity":
  5094. type PeopleListByActivityCall struct {
  5095. s *Service
  5096. activityId string
  5097. collection string
  5098. urlParams_ gensupport.URLParams
  5099. ifNoneMatch_ string
  5100. ctx_ context.Context
  5101. header_ http.Header
  5102. }
  5103. // ListByActivity: List all of the people in the specified collection
  5104. // for a particular activity.
  5105. func (r *PeopleService) ListByActivity(activityId string, collection string) *PeopleListByActivityCall {
  5106. c := &PeopleListByActivityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5107. c.activityId = activityId
  5108. c.collection = collection
  5109. return c
  5110. }
  5111. // MaxResults sets the optional parameter "maxResults": The maximum
  5112. // number of people to include in the response, which is used for
  5113. // paging. For any response, the actual number returned might be less
  5114. // than the specified maxResults.
  5115. func (c *PeopleListByActivityCall) MaxResults(maxResults int64) *PeopleListByActivityCall {
  5116. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5117. return c
  5118. }
  5119. // PageToken sets the optional parameter "pageToken": The continuation
  5120. // token, which is used to page through large result sets. To get the
  5121. // next page of results, set this parameter to the value of
  5122. // "nextPageToken" from the previous response.
  5123. func (c *PeopleListByActivityCall) PageToken(pageToken string) *PeopleListByActivityCall {
  5124. c.urlParams_.Set("pageToken", pageToken)
  5125. return c
  5126. }
  5127. // Fields allows partial responses to be retrieved. See
  5128. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5129. // for more information.
  5130. func (c *PeopleListByActivityCall) Fields(s ...googleapi.Field) *PeopleListByActivityCall {
  5131. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5132. return c
  5133. }
  5134. // IfNoneMatch sets the optional parameter which makes the operation
  5135. // fail if the object's ETag matches the given value. This is useful for
  5136. // getting updates only after the object has changed since the last
  5137. // request. Use googleapi.IsNotModified to check whether the response
  5138. // error from Do is the result of In-None-Match.
  5139. func (c *PeopleListByActivityCall) IfNoneMatch(entityTag string) *PeopleListByActivityCall {
  5140. c.ifNoneMatch_ = entityTag
  5141. return c
  5142. }
  5143. // Context sets the context to be used in this call's Do method. Any
  5144. // pending HTTP request will be aborted if the provided context is
  5145. // canceled.
  5146. func (c *PeopleListByActivityCall) Context(ctx context.Context) *PeopleListByActivityCall {
  5147. c.ctx_ = ctx
  5148. return c
  5149. }
  5150. // Header returns an http.Header that can be modified by the caller to
  5151. // add HTTP headers to the request.
  5152. func (c *PeopleListByActivityCall) Header() http.Header {
  5153. if c.header_ == nil {
  5154. c.header_ = make(http.Header)
  5155. }
  5156. return c.header_
  5157. }
  5158. func (c *PeopleListByActivityCall) doRequest(alt string) (*http.Response, error) {
  5159. reqHeaders := make(http.Header)
  5160. for k, v := range c.header_ {
  5161. reqHeaders[k] = v
  5162. }
  5163. reqHeaders.Set("User-Agent", c.s.userAgent())
  5164. if c.ifNoneMatch_ != "" {
  5165. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5166. }
  5167. var body io.Reader = nil
  5168. c.urlParams_.Set("alt", alt)
  5169. c.urlParams_.Set("prettyPrint", "false")
  5170. urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/people/{collection}")
  5171. urls += "?" + c.urlParams_.Encode()
  5172. req, err := http.NewRequest("GET", urls, body)
  5173. if err != nil {
  5174. return nil, err
  5175. }
  5176. req.Header = reqHeaders
  5177. googleapi.Expand(req.URL, map[string]string{
  5178. "activityId": c.activityId,
  5179. "collection": c.collection,
  5180. })
  5181. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5182. }
  5183. // Do executes the "plusDomains.people.listByActivity" call.
  5184. // Exactly one of *PeopleFeed or error will be non-nil. Any non-2xx
  5185. // status code is an error. Response headers are in either
  5186. // *PeopleFeed.ServerResponse.Header or (if a response was returned at
  5187. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5188. // to check whether the returned error was because
  5189. // http.StatusNotModified was returned.
  5190. func (c *PeopleListByActivityCall) Do(opts ...googleapi.CallOption) (*PeopleFeed, error) {
  5191. gensupport.SetOptions(c.urlParams_, opts...)
  5192. res, err := c.doRequest("json")
  5193. if res != nil && res.StatusCode == http.StatusNotModified {
  5194. if res.Body != nil {
  5195. res.Body.Close()
  5196. }
  5197. return nil, &googleapi.Error{
  5198. Code: res.StatusCode,
  5199. Header: res.Header,
  5200. }
  5201. }
  5202. if err != nil {
  5203. return nil, err
  5204. }
  5205. defer googleapi.CloseBody(res)
  5206. if err := googleapi.CheckResponse(res); err != nil {
  5207. return nil, err
  5208. }
  5209. ret := &PeopleFeed{
  5210. ServerResponse: googleapi.ServerResponse{
  5211. Header: res.Header,
  5212. HTTPStatusCode: res.StatusCode,
  5213. },
  5214. }
  5215. target := &ret
  5216. if err := gensupport.DecodeResponse(target, res); err != nil {
  5217. return nil, err
  5218. }
  5219. return ret, nil
  5220. // {
  5221. // "description": "List all of the people in the specified collection for a particular activity.",
  5222. // "httpMethod": "GET",
  5223. // "id": "plusDomains.people.listByActivity",
  5224. // "parameterOrder": [
  5225. // "activityId",
  5226. // "collection"
  5227. // ],
  5228. // "parameters": {
  5229. // "activityId": {
  5230. // "description": "The ID of the activity to get the list of people for.",
  5231. // "location": "path",
  5232. // "required": true,
  5233. // "type": "string"
  5234. // },
  5235. // "collection": {
  5236. // "description": "The collection of people to list.",
  5237. // "enum": [
  5238. // "plusoners",
  5239. // "resharers",
  5240. // "sharedto"
  5241. // ],
  5242. // "enumDescriptions": [
  5243. // "List all people who have +1'd this activity.",
  5244. // "List all people who have reshared this activity.",
  5245. // "List all people who this activity was shared to."
  5246. // ],
  5247. // "location": "path",
  5248. // "required": true,
  5249. // "type": "string"
  5250. // },
  5251. // "maxResults": {
  5252. // "default": "20",
  5253. // "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.",
  5254. // "format": "uint32",
  5255. // "location": "query",
  5256. // "maximum": "100",
  5257. // "minimum": "1",
  5258. // "type": "integer"
  5259. // },
  5260. // "pageToken": {
  5261. // "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.",
  5262. // "location": "query",
  5263. // "type": "string"
  5264. // }
  5265. // },
  5266. // "path": "activities/{activityId}/people/{collection}",
  5267. // "response": {
  5268. // "$ref": "PeopleFeed"
  5269. // },
  5270. // "scopes": [
  5271. // "https://www.googleapis.com/auth/plus.login",
  5272. // "https://www.googleapis.com/auth/plus.stream.read"
  5273. // ]
  5274. // }
  5275. }
  5276. // Pages invokes f for each page of results.
  5277. // A non-nil error returned from f will halt the iteration.
  5278. // The provided context supersedes any context provided to the Context method.
  5279. func (c *PeopleListByActivityCall) Pages(ctx context.Context, f func(*PeopleFeed) error) error {
  5280. c.ctx_ = ctx
  5281. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5282. for {
  5283. x, err := c.Do()
  5284. if err != nil {
  5285. return err
  5286. }
  5287. if err := f(x); err != nil {
  5288. return err
  5289. }
  5290. if x.NextPageToken == "" {
  5291. return nil
  5292. }
  5293. c.PageToken(x.NextPageToken)
  5294. }
  5295. }
  5296. // method id "plusDomains.people.listByCircle":
  5297. type PeopleListByCircleCall struct {
  5298. s *Service
  5299. circleId string
  5300. urlParams_ gensupport.URLParams
  5301. ifNoneMatch_ string
  5302. ctx_ context.Context
  5303. header_ http.Header
  5304. }
  5305. // ListByCircle: List all of the people who are members of a circle.
  5306. func (r *PeopleService) ListByCircle(circleId string) *PeopleListByCircleCall {
  5307. c := &PeopleListByCircleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5308. c.circleId = circleId
  5309. return c
  5310. }
  5311. // MaxResults sets the optional parameter "maxResults": The maximum
  5312. // number of people to include in the response, which is used for
  5313. // paging. For any response, the actual number returned might be less
  5314. // than the specified maxResults.
  5315. func (c *PeopleListByCircleCall) MaxResults(maxResults int64) *PeopleListByCircleCall {
  5316. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5317. return c
  5318. }
  5319. // PageToken sets the optional parameter "pageToken": The continuation
  5320. // token, which is used to page through large result sets. To get the
  5321. // next page of results, set this parameter to the value of
  5322. // "nextPageToken" from the previous response.
  5323. func (c *PeopleListByCircleCall) PageToken(pageToken string) *PeopleListByCircleCall {
  5324. c.urlParams_.Set("pageToken", pageToken)
  5325. return c
  5326. }
  5327. // Fields allows partial responses to be retrieved. See
  5328. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5329. // for more information.
  5330. func (c *PeopleListByCircleCall) Fields(s ...googleapi.Field) *PeopleListByCircleCall {
  5331. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5332. return c
  5333. }
  5334. // IfNoneMatch sets the optional parameter which makes the operation
  5335. // fail if the object's ETag matches the given value. This is useful for
  5336. // getting updates only after the object has changed since the last
  5337. // request. Use googleapi.IsNotModified to check whether the response
  5338. // error from Do is the result of In-None-Match.
  5339. func (c *PeopleListByCircleCall) IfNoneMatch(entityTag string) *PeopleListByCircleCall {
  5340. c.ifNoneMatch_ = entityTag
  5341. return c
  5342. }
  5343. // Context sets the context to be used in this call's Do method. Any
  5344. // pending HTTP request will be aborted if the provided context is
  5345. // canceled.
  5346. func (c *PeopleListByCircleCall) Context(ctx context.Context) *PeopleListByCircleCall {
  5347. c.ctx_ = ctx
  5348. return c
  5349. }
  5350. // Header returns an http.Header that can be modified by the caller to
  5351. // add HTTP headers to the request.
  5352. func (c *PeopleListByCircleCall) Header() http.Header {
  5353. if c.header_ == nil {
  5354. c.header_ = make(http.Header)
  5355. }
  5356. return c.header_
  5357. }
  5358. func (c *PeopleListByCircleCall) doRequest(alt string) (*http.Response, error) {
  5359. reqHeaders := make(http.Header)
  5360. for k, v := range c.header_ {
  5361. reqHeaders[k] = v
  5362. }
  5363. reqHeaders.Set("User-Agent", c.s.userAgent())
  5364. if c.ifNoneMatch_ != "" {
  5365. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5366. }
  5367. var body io.Reader = nil
  5368. c.urlParams_.Set("alt", alt)
  5369. c.urlParams_.Set("prettyPrint", "false")
  5370. urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}/people")
  5371. urls += "?" + c.urlParams_.Encode()
  5372. req, err := http.NewRequest("GET", urls, body)
  5373. if err != nil {
  5374. return nil, err
  5375. }
  5376. req.Header = reqHeaders
  5377. googleapi.Expand(req.URL, map[string]string{
  5378. "circleId": c.circleId,
  5379. })
  5380. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5381. }
  5382. // Do executes the "plusDomains.people.listByCircle" call.
  5383. // Exactly one of *PeopleFeed or error will be non-nil. Any non-2xx
  5384. // status code is an error. Response headers are in either
  5385. // *PeopleFeed.ServerResponse.Header or (if a response was returned at
  5386. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5387. // to check whether the returned error was because
  5388. // http.StatusNotModified was returned.
  5389. func (c *PeopleListByCircleCall) Do(opts ...googleapi.CallOption) (*PeopleFeed, error) {
  5390. gensupport.SetOptions(c.urlParams_, opts...)
  5391. res, err := c.doRequest("json")
  5392. if res != nil && res.StatusCode == http.StatusNotModified {
  5393. if res.Body != nil {
  5394. res.Body.Close()
  5395. }
  5396. return nil, &googleapi.Error{
  5397. Code: res.StatusCode,
  5398. Header: res.Header,
  5399. }
  5400. }
  5401. if err != nil {
  5402. return nil, err
  5403. }
  5404. defer googleapi.CloseBody(res)
  5405. if err := googleapi.CheckResponse(res); err != nil {
  5406. return nil, err
  5407. }
  5408. ret := &PeopleFeed{
  5409. ServerResponse: googleapi.ServerResponse{
  5410. Header: res.Header,
  5411. HTTPStatusCode: res.StatusCode,
  5412. },
  5413. }
  5414. target := &ret
  5415. if err := gensupport.DecodeResponse(target, res); err != nil {
  5416. return nil, err
  5417. }
  5418. return ret, nil
  5419. // {
  5420. // "description": "List all of the people who are members of a circle.",
  5421. // "httpMethod": "GET",
  5422. // "id": "plusDomains.people.listByCircle",
  5423. // "parameterOrder": [
  5424. // "circleId"
  5425. // ],
  5426. // "parameters": {
  5427. // "circleId": {
  5428. // "description": "The ID of the circle to get the members of.",
  5429. // "location": "path",
  5430. // "required": true,
  5431. // "type": "string"
  5432. // },
  5433. // "maxResults": {
  5434. // "default": "20",
  5435. // "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.",
  5436. // "format": "uint32",
  5437. // "location": "query",
  5438. // "maximum": "100",
  5439. // "minimum": "1",
  5440. // "type": "integer"
  5441. // },
  5442. // "pageToken": {
  5443. // "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.",
  5444. // "location": "query",
  5445. // "type": "string"
  5446. // }
  5447. // },
  5448. // "path": "circles/{circleId}/people",
  5449. // "response": {
  5450. // "$ref": "PeopleFeed"
  5451. // },
  5452. // "scopes": [
  5453. // "https://www.googleapis.com/auth/plus.circles.read",
  5454. // "https://www.googleapis.com/auth/plus.login"
  5455. // ]
  5456. // }
  5457. }
  5458. // Pages invokes f for each page of results.
  5459. // A non-nil error returned from f will halt the iteration.
  5460. // The provided context supersedes any context provided to the Context method.
  5461. func (c *PeopleListByCircleCall) Pages(ctx context.Context, f func(*PeopleFeed) error) error {
  5462. c.ctx_ = ctx
  5463. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5464. for {
  5465. x, err := c.Do()
  5466. if err != nil {
  5467. return err
  5468. }
  5469. if err := f(x); err != nil {
  5470. return err
  5471. }
  5472. if x.NextPageToken == "" {
  5473. return nil
  5474. }
  5475. c.PageToken(x.NextPageToken)
  5476. }
  5477. }