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.
 
 
 

6060 lines
214 KiB

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