licensing-gen.go 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. // Package licensing provides access to the Enterprise License Manager API.
  2. //
  3. // See https://developers.google.com/google-apps/licensing/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/licensing/v1"
  8. // ...
  9. // licensingService, err := licensing.New(oauthHttpClient)
  10. package licensing // import "google.golang.org/api/licensing/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 = "licensing:v1"
  41. const apiName = "licensing"
  42. const apiVersion = "v1"
  43. const basePath = "https://www.googleapis.com/apps/licensing/v1/product/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage Google Apps licenses for your domain
  47. AppsLicensingScope = "https://www.googleapis.com/auth/apps.licensing"
  48. )
  49. func New(client *http.Client) (*Service, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &Service{client: client, BasePath: basePath}
  54. s.LicenseAssignments = NewLicenseAssignmentsService(s)
  55. return s, nil
  56. }
  57. type Service struct {
  58. client *http.Client
  59. BasePath string // API endpoint base URL
  60. UserAgent string // optional additional User-Agent fragment
  61. LicenseAssignments *LicenseAssignmentsService
  62. }
  63. func (s *Service) userAgent() string {
  64. if s.UserAgent == "" {
  65. return googleapi.UserAgent
  66. }
  67. return googleapi.UserAgent + " " + s.UserAgent
  68. }
  69. func NewLicenseAssignmentsService(s *Service) *LicenseAssignmentsService {
  70. rs := &LicenseAssignmentsService{s: s}
  71. return rs
  72. }
  73. type LicenseAssignmentsService struct {
  74. s *Service
  75. }
  76. // LicenseAssignment: Template for LiscenseAssignment Resource
  77. type LicenseAssignment struct {
  78. // Etags: ETag of the resource.
  79. Etags string `json:"etags,omitempty"`
  80. // Kind: Identifies the resource as a LicenseAssignment.
  81. Kind string `json:"kind,omitempty"`
  82. // ProductId: Name of the product.
  83. ProductId string `json:"productId,omitempty"`
  84. // SelfLink: Link to this page.
  85. SelfLink string `json:"selfLink,omitempty"`
  86. // SkuId: Name of the sku of the product.
  87. SkuId string `json:"skuId,omitempty"`
  88. // UserId: Email id of the user.
  89. UserId string `json:"userId,omitempty"`
  90. // ServerResponse contains the HTTP response code and headers from the
  91. // server.
  92. googleapi.ServerResponse `json:"-"`
  93. // ForceSendFields is a list of field names (e.g. "Etags") to
  94. // unconditionally include in API requests. By default, fields with
  95. // empty values are omitted from API requests. However, any non-pointer,
  96. // non-interface field appearing in ForceSendFields will be sent to the
  97. // server regardless of whether the field is empty or not. This may be
  98. // used to include empty fields in Patch requests.
  99. ForceSendFields []string `json:"-"`
  100. }
  101. func (s *LicenseAssignment) MarshalJSON() ([]byte, error) {
  102. type noMethod LicenseAssignment
  103. raw := noMethod(*s)
  104. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  105. }
  106. // LicenseAssignmentInsert: Template for LicenseAssignment Insert
  107. // request
  108. type LicenseAssignmentInsert struct {
  109. // UserId: Email id of the user
  110. UserId string `json:"userId,omitempty"`
  111. // ForceSendFields is a list of field names (e.g. "UserId") to
  112. // unconditionally include in API requests. By default, fields with
  113. // empty values are omitted from API requests. However, any non-pointer,
  114. // non-interface field appearing in ForceSendFields will be sent to the
  115. // server regardless of whether the field is empty or not. This may be
  116. // used to include empty fields in Patch requests.
  117. ForceSendFields []string `json:"-"`
  118. }
  119. func (s *LicenseAssignmentInsert) MarshalJSON() ([]byte, error) {
  120. type noMethod LicenseAssignmentInsert
  121. raw := noMethod(*s)
  122. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  123. }
  124. // LicenseAssignmentList: LicesnseAssignment List for a given
  125. // product/sku for a customer.
  126. type LicenseAssignmentList struct {
  127. // Etag: ETag of the resource.
  128. Etag string `json:"etag,omitempty"`
  129. // Items: The LicenseAssignments in this page of results.
  130. Items []*LicenseAssignment `json:"items,omitempty"`
  131. // Kind: Identifies the resource as a collection of LicenseAssignments.
  132. Kind string `json:"kind,omitempty"`
  133. // NextPageToken: The continuation token, used to page through large
  134. // result sets. Provide this value in a subsequent request to return the
  135. // next page of results.
  136. NextPageToken string `json:"nextPageToken,omitempty"`
  137. // ServerResponse contains the HTTP response code and headers from the
  138. // server.
  139. googleapi.ServerResponse `json:"-"`
  140. // ForceSendFields is a list of field names (e.g. "Etag") to
  141. // unconditionally include in API requests. By default, fields with
  142. // empty values are omitted from API requests. However, any non-pointer,
  143. // non-interface field appearing in ForceSendFields will be sent to the
  144. // server regardless of whether the field is empty or not. This may be
  145. // used to include empty fields in Patch requests.
  146. ForceSendFields []string `json:"-"`
  147. }
  148. func (s *LicenseAssignmentList) MarshalJSON() ([]byte, error) {
  149. type noMethod LicenseAssignmentList
  150. raw := noMethod(*s)
  151. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  152. }
  153. // method id "licensing.licenseAssignments.delete":
  154. type LicenseAssignmentsDeleteCall struct {
  155. s *Service
  156. productId string
  157. skuId string
  158. userId string
  159. urlParams_ gensupport.URLParams
  160. ctx_ context.Context
  161. }
  162. // Delete: Revoke License.
  163. func (r *LicenseAssignmentsService) Delete(productId string, skuId string, userId string) *LicenseAssignmentsDeleteCall {
  164. c := &LicenseAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  165. c.productId = productId
  166. c.skuId = skuId
  167. c.userId = userId
  168. return c
  169. }
  170. // Fields allows partial responses to be retrieved. See
  171. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  172. // for more information.
  173. func (c *LicenseAssignmentsDeleteCall) Fields(s ...googleapi.Field) *LicenseAssignmentsDeleteCall {
  174. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  175. return c
  176. }
  177. // Context sets the context to be used in this call's Do method. Any
  178. // pending HTTP request will be aborted if the provided context is
  179. // canceled.
  180. func (c *LicenseAssignmentsDeleteCall) Context(ctx context.Context) *LicenseAssignmentsDeleteCall {
  181. c.ctx_ = ctx
  182. return c
  183. }
  184. func (c *LicenseAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  185. var body io.Reader = nil
  186. c.urlParams_.Set("alt", alt)
  187. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/sku/{skuId}/user/{userId}")
  188. urls += "?" + c.urlParams_.Encode()
  189. req, _ := http.NewRequest("DELETE", urls, body)
  190. googleapi.Expand(req.URL, map[string]string{
  191. "productId": c.productId,
  192. "skuId": c.skuId,
  193. "userId": c.userId,
  194. })
  195. req.Header.Set("User-Agent", c.s.userAgent())
  196. if c.ctx_ != nil {
  197. return ctxhttp.Do(c.ctx_, c.s.client, req)
  198. }
  199. return c.s.client.Do(req)
  200. }
  201. // Do executes the "licensing.licenseAssignments.delete" call.
  202. func (c *LicenseAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) error {
  203. gensupport.SetOptions(c.urlParams_, opts...)
  204. res, err := c.doRequest("json")
  205. if err != nil {
  206. return err
  207. }
  208. defer googleapi.CloseBody(res)
  209. if err := googleapi.CheckResponse(res); err != nil {
  210. return err
  211. }
  212. return nil
  213. // {
  214. // "description": "Revoke License.",
  215. // "httpMethod": "DELETE",
  216. // "id": "licensing.licenseAssignments.delete",
  217. // "parameterOrder": [
  218. // "productId",
  219. // "skuId",
  220. // "userId"
  221. // ],
  222. // "parameters": {
  223. // "productId": {
  224. // "description": "Name for product",
  225. // "location": "path",
  226. // "required": true,
  227. // "type": "string"
  228. // },
  229. // "skuId": {
  230. // "description": "Name for sku",
  231. // "location": "path",
  232. // "required": true,
  233. // "type": "string"
  234. // },
  235. // "userId": {
  236. // "description": "email id or unique Id of the user",
  237. // "location": "path",
  238. // "required": true,
  239. // "type": "string"
  240. // }
  241. // },
  242. // "path": "{productId}/sku/{skuId}/user/{userId}",
  243. // "scopes": [
  244. // "https://www.googleapis.com/auth/apps.licensing"
  245. // ]
  246. // }
  247. }
  248. // method id "licensing.licenseAssignments.get":
  249. type LicenseAssignmentsGetCall struct {
  250. s *Service
  251. productId string
  252. skuId string
  253. userId string
  254. urlParams_ gensupport.URLParams
  255. ifNoneMatch_ string
  256. ctx_ context.Context
  257. }
  258. // Get: Get license assignment of a particular product and sku for a
  259. // user
  260. func (r *LicenseAssignmentsService) Get(productId string, skuId string, userId string) *LicenseAssignmentsGetCall {
  261. c := &LicenseAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  262. c.productId = productId
  263. c.skuId = skuId
  264. c.userId = userId
  265. return c
  266. }
  267. // Fields allows partial responses to be retrieved. See
  268. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  269. // for more information.
  270. func (c *LicenseAssignmentsGetCall) Fields(s ...googleapi.Field) *LicenseAssignmentsGetCall {
  271. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  272. return c
  273. }
  274. // IfNoneMatch sets the optional parameter which makes the operation
  275. // fail if the object's ETag matches the given value. This is useful for
  276. // getting updates only after the object has changed since the last
  277. // request. Use googleapi.IsNotModified to check whether the response
  278. // error from Do is the result of In-None-Match.
  279. func (c *LicenseAssignmentsGetCall) IfNoneMatch(entityTag string) *LicenseAssignmentsGetCall {
  280. c.ifNoneMatch_ = entityTag
  281. return c
  282. }
  283. // Context sets the context to be used in this call's Do method. Any
  284. // pending HTTP request will be aborted if the provided context is
  285. // canceled.
  286. func (c *LicenseAssignmentsGetCall) Context(ctx context.Context) *LicenseAssignmentsGetCall {
  287. c.ctx_ = ctx
  288. return c
  289. }
  290. func (c *LicenseAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
  291. var body io.Reader = nil
  292. c.urlParams_.Set("alt", alt)
  293. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/sku/{skuId}/user/{userId}")
  294. urls += "?" + c.urlParams_.Encode()
  295. req, _ := http.NewRequest("GET", urls, body)
  296. googleapi.Expand(req.URL, map[string]string{
  297. "productId": c.productId,
  298. "skuId": c.skuId,
  299. "userId": c.userId,
  300. })
  301. req.Header.Set("User-Agent", c.s.userAgent())
  302. if c.ifNoneMatch_ != "" {
  303. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  304. }
  305. if c.ctx_ != nil {
  306. return ctxhttp.Do(c.ctx_, c.s.client, req)
  307. }
  308. return c.s.client.Do(req)
  309. }
  310. // Do executes the "licensing.licenseAssignments.get" call.
  311. // Exactly one of *LicenseAssignment or error will be non-nil. Any
  312. // non-2xx status code is an error. Response headers are in either
  313. // *LicenseAssignment.ServerResponse.Header or (if a response was
  314. // returned at all) in error.(*googleapi.Error).Header. Use
  315. // googleapi.IsNotModified to check whether the returned error was
  316. // because http.StatusNotModified was returned.
  317. func (c *LicenseAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error) {
  318. gensupport.SetOptions(c.urlParams_, opts...)
  319. res, err := c.doRequest("json")
  320. if res != nil && res.StatusCode == http.StatusNotModified {
  321. if res.Body != nil {
  322. res.Body.Close()
  323. }
  324. return nil, &googleapi.Error{
  325. Code: res.StatusCode,
  326. Header: res.Header,
  327. }
  328. }
  329. if err != nil {
  330. return nil, err
  331. }
  332. defer googleapi.CloseBody(res)
  333. if err := googleapi.CheckResponse(res); err != nil {
  334. return nil, err
  335. }
  336. ret := &LicenseAssignment{
  337. ServerResponse: googleapi.ServerResponse{
  338. Header: res.Header,
  339. HTTPStatusCode: res.StatusCode,
  340. },
  341. }
  342. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  343. return nil, err
  344. }
  345. return ret, nil
  346. // {
  347. // "description": "Get license assignment of a particular product and sku for a user",
  348. // "httpMethod": "GET",
  349. // "id": "licensing.licenseAssignments.get",
  350. // "parameterOrder": [
  351. // "productId",
  352. // "skuId",
  353. // "userId"
  354. // ],
  355. // "parameters": {
  356. // "productId": {
  357. // "description": "Name for product",
  358. // "location": "path",
  359. // "required": true,
  360. // "type": "string"
  361. // },
  362. // "skuId": {
  363. // "description": "Name for sku",
  364. // "location": "path",
  365. // "required": true,
  366. // "type": "string"
  367. // },
  368. // "userId": {
  369. // "description": "email id or unique Id of the user",
  370. // "location": "path",
  371. // "required": true,
  372. // "type": "string"
  373. // }
  374. // },
  375. // "path": "{productId}/sku/{skuId}/user/{userId}",
  376. // "response": {
  377. // "$ref": "LicenseAssignment"
  378. // },
  379. // "scopes": [
  380. // "https://www.googleapis.com/auth/apps.licensing"
  381. // ]
  382. // }
  383. }
  384. // method id "licensing.licenseAssignments.insert":
  385. type LicenseAssignmentsInsertCall struct {
  386. s *Service
  387. productId string
  388. skuId string
  389. licenseassignmentinsert *LicenseAssignmentInsert
  390. urlParams_ gensupport.URLParams
  391. ctx_ context.Context
  392. }
  393. // Insert: Assign License.
  394. func (r *LicenseAssignmentsService) Insert(productId string, skuId string, licenseassignmentinsert *LicenseAssignmentInsert) *LicenseAssignmentsInsertCall {
  395. c := &LicenseAssignmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  396. c.productId = productId
  397. c.skuId = skuId
  398. c.licenseassignmentinsert = licenseassignmentinsert
  399. return c
  400. }
  401. // Fields allows partial responses to be retrieved. See
  402. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  403. // for more information.
  404. func (c *LicenseAssignmentsInsertCall) Fields(s ...googleapi.Field) *LicenseAssignmentsInsertCall {
  405. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  406. return c
  407. }
  408. // Context sets the context to be used in this call's Do method. Any
  409. // pending HTTP request will be aborted if the provided context is
  410. // canceled.
  411. func (c *LicenseAssignmentsInsertCall) Context(ctx context.Context) *LicenseAssignmentsInsertCall {
  412. c.ctx_ = ctx
  413. return c
  414. }
  415. func (c *LicenseAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) {
  416. var body io.Reader = nil
  417. body, err := googleapi.WithoutDataWrapper.JSONReader(c.licenseassignmentinsert)
  418. if err != nil {
  419. return nil, err
  420. }
  421. ctype := "application/json"
  422. c.urlParams_.Set("alt", alt)
  423. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/sku/{skuId}/user")
  424. urls += "?" + c.urlParams_.Encode()
  425. req, _ := http.NewRequest("POST", urls, body)
  426. googleapi.Expand(req.URL, map[string]string{
  427. "productId": c.productId,
  428. "skuId": c.skuId,
  429. })
  430. req.Header.Set("Content-Type", ctype)
  431. req.Header.Set("User-Agent", c.s.userAgent())
  432. if c.ctx_ != nil {
  433. return ctxhttp.Do(c.ctx_, c.s.client, req)
  434. }
  435. return c.s.client.Do(req)
  436. }
  437. // Do executes the "licensing.licenseAssignments.insert" call.
  438. // Exactly one of *LicenseAssignment or error will be non-nil. Any
  439. // non-2xx status code is an error. Response headers are in either
  440. // *LicenseAssignment.ServerResponse.Header or (if a response was
  441. // returned at all) in error.(*googleapi.Error).Header. Use
  442. // googleapi.IsNotModified to check whether the returned error was
  443. // because http.StatusNotModified was returned.
  444. func (c *LicenseAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error) {
  445. gensupport.SetOptions(c.urlParams_, opts...)
  446. res, err := c.doRequest("json")
  447. if res != nil && res.StatusCode == http.StatusNotModified {
  448. if res.Body != nil {
  449. res.Body.Close()
  450. }
  451. return nil, &googleapi.Error{
  452. Code: res.StatusCode,
  453. Header: res.Header,
  454. }
  455. }
  456. if err != nil {
  457. return nil, err
  458. }
  459. defer googleapi.CloseBody(res)
  460. if err := googleapi.CheckResponse(res); err != nil {
  461. return nil, err
  462. }
  463. ret := &LicenseAssignment{
  464. ServerResponse: googleapi.ServerResponse{
  465. Header: res.Header,
  466. HTTPStatusCode: res.StatusCode,
  467. },
  468. }
  469. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  470. return nil, err
  471. }
  472. return ret, nil
  473. // {
  474. // "description": "Assign License.",
  475. // "httpMethod": "POST",
  476. // "id": "licensing.licenseAssignments.insert",
  477. // "parameterOrder": [
  478. // "productId",
  479. // "skuId"
  480. // ],
  481. // "parameters": {
  482. // "productId": {
  483. // "description": "Name for product",
  484. // "location": "path",
  485. // "required": true,
  486. // "type": "string"
  487. // },
  488. // "skuId": {
  489. // "description": "Name for sku",
  490. // "location": "path",
  491. // "required": true,
  492. // "type": "string"
  493. // }
  494. // },
  495. // "path": "{productId}/sku/{skuId}/user",
  496. // "request": {
  497. // "$ref": "LicenseAssignmentInsert"
  498. // },
  499. // "response": {
  500. // "$ref": "LicenseAssignment"
  501. // },
  502. // "scopes": [
  503. // "https://www.googleapis.com/auth/apps.licensing"
  504. // ]
  505. // }
  506. }
  507. // method id "licensing.licenseAssignments.listForProduct":
  508. type LicenseAssignmentsListForProductCall struct {
  509. s *Service
  510. productId string
  511. urlParams_ gensupport.URLParams
  512. ifNoneMatch_ string
  513. ctx_ context.Context
  514. }
  515. // ListForProduct: List license assignments for given product of the
  516. // customer.
  517. func (r *LicenseAssignmentsService) ListForProduct(productId string, customerId string) *LicenseAssignmentsListForProductCall {
  518. c := &LicenseAssignmentsListForProductCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  519. c.productId = productId
  520. c.urlParams_.Set("customerId", customerId)
  521. return c
  522. }
  523. // MaxResults sets the optional parameter "maxResults": Maximum number
  524. // of campaigns to return at one time. Must be positive. Default value
  525. // is 100.
  526. func (c *LicenseAssignmentsListForProductCall) MaxResults(maxResults int64) *LicenseAssignmentsListForProductCall {
  527. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  528. return c
  529. }
  530. // PageToken sets the optional parameter "pageToken": Token to fetch the
  531. // next page. By default server will return first page
  532. func (c *LicenseAssignmentsListForProductCall) PageToken(pageToken string) *LicenseAssignmentsListForProductCall {
  533. c.urlParams_.Set("pageToken", pageToken)
  534. return c
  535. }
  536. // Fields allows partial responses to be retrieved. See
  537. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  538. // for more information.
  539. func (c *LicenseAssignmentsListForProductCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductCall {
  540. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  541. return c
  542. }
  543. // IfNoneMatch sets the optional parameter which makes the operation
  544. // fail if the object's ETag matches the given value. This is useful for
  545. // getting updates only after the object has changed since the last
  546. // request. Use googleapi.IsNotModified to check whether the response
  547. // error from Do is the result of In-None-Match.
  548. func (c *LicenseAssignmentsListForProductCall) IfNoneMatch(entityTag string) *LicenseAssignmentsListForProductCall {
  549. c.ifNoneMatch_ = entityTag
  550. return c
  551. }
  552. // Context sets the context to be used in this call's Do method. Any
  553. // pending HTTP request will be aborted if the provided context is
  554. // canceled.
  555. func (c *LicenseAssignmentsListForProductCall) Context(ctx context.Context) *LicenseAssignmentsListForProductCall {
  556. c.ctx_ = ctx
  557. return c
  558. }
  559. func (c *LicenseAssignmentsListForProductCall) doRequest(alt string) (*http.Response, error) {
  560. var body io.Reader = nil
  561. c.urlParams_.Set("alt", alt)
  562. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/users")
  563. urls += "?" + c.urlParams_.Encode()
  564. req, _ := http.NewRequest("GET", urls, body)
  565. googleapi.Expand(req.URL, map[string]string{
  566. "productId": c.productId,
  567. })
  568. req.Header.Set("User-Agent", c.s.userAgent())
  569. if c.ifNoneMatch_ != "" {
  570. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  571. }
  572. if c.ctx_ != nil {
  573. return ctxhttp.Do(c.ctx_, c.s.client, req)
  574. }
  575. return c.s.client.Do(req)
  576. }
  577. // Do executes the "licensing.licenseAssignments.listForProduct" call.
  578. // Exactly one of *LicenseAssignmentList or error will be non-nil. Any
  579. // non-2xx status code is an error. Response headers are in either
  580. // *LicenseAssignmentList.ServerResponse.Header or (if a response was
  581. // returned at all) in error.(*googleapi.Error).Header. Use
  582. // googleapi.IsNotModified to check whether the returned error was
  583. // because http.StatusNotModified was returned.
  584. func (c *LicenseAssignmentsListForProductCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList, error) {
  585. gensupport.SetOptions(c.urlParams_, opts...)
  586. res, err := c.doRequest("json")
  587. if res != nil && res.StatusCode == http.StatusNotModified {
  588. if res.Body != nil {
  589. res.Body.Close()
  590. }
  591. return nil, &googleapi.Error{
  592. Code: res.StatusCode,
  593. Header: res.Header,
  594. }
  595. }
  596. if err != nil {
  597. return nil, err
  598. }
  599. defer googleapi.CloseBody(res)
  600. if err := googleapi.CheckResponse(res); err != nil {
  601. return nil, err
  602. }
  603. ret := &LicenseAssignmentList{
  604. ServerResponse: googleapi.ServerResponse{
  605. Header: res.Header,
  606. HTTPStatusCode: res.StatusCode,
  607. },
  608. }
  609. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  610. return nil, err
  611. }
  612. return ret, nil
  613. // {
  614. // "description": "List license assignments for given product of the customer.",
  615. // "httpMethod": "GET",
  616. // "id": "licensing.licenseAssignments.listForProduct",
  617. // "parameterOrder": [
  618. // "productId",
  619. // "customerId"
  620. // ],
  621. // "parameters": {
  622. // "customerId": {
  623. // "description": "CustomerId represents the customer for whom licenseassignments are queried",
  624. // "location": "query",
  625. // "required": true,
  626. // "type": "string"
  627. // },
  628. // "maxResults": {
  629. // "default": "100",
  630. // "description": "Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100.",
  631. // "format": "uint32",
  632. // "location": "query",
  633. // "maximum": "1000",
  634. // "minimum": "1",
  635. // "type": "integer"
  636. // },
  637. // "pageToken": {
  638. // "default": "",
  639. // "description": "Token to fetch the next page.Optional. By default server will return first page",
  640. // "location": "query",
  641. // "type": "string"
  642. // },
  643. // "productId": {
  644. // "description": "Name for product",
  645. // "location": "path",
  646. // "required": true,
  647. // "type": "string"
  648. // }
  649. // },
  650. // "path": "{productId}/users",
  651. // "response": {
  652. // "$ref": "LicenseAssignmentList"
  653. // },
  654. // "scopes": [
  655. // "https://www.googleapis.com/auth/apps.licensing"
  656. // ]
  657. // }
  658. }
  659. // Pages invokes f for each page of results.
  660. // A non-nil error returned from f will halt the iteration.
  661. // The provided context supersedes any context provided to the Context method.
  662. func (c *LicenseAssignmentsListForProductCall) Pages(ctx context.Context, f func(*LicenseAssignmentList) error) error {
  663. c.ctx_ = ctx
  664. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  665. for {
  666. x, err := c.Do()
  667. if err != nil {
  668. return err
  669. }
  670. if err := f(x); err != nil {
  671. return err
  672. }
  673. if x.NextPageToken == "" {
  674. return nil
  675. }
  676. c.PageToken(x.NextPageToken)
  677. }
  678. }
  679. // method id "licensing.licenseAssignments.listForProductAndSku":
  680. type LicenseAssignmentsListForProductAndSkuCall struct {
  681. s *Service
  682. productId string
  683. skuId string
  684. urlParams_ gensupport.URLParams
  685. ifNoneMatch_ string
  686. ctx_ context.Context
  687. }
  688. // ListForProductAndSku: List license assignments for given product and
  689. // sku of the customer.
  690. func (r *LicenseAssignmentsService) ListForProductAndSku(productId string, skuId string, customerId string) *LicenseAssignmentsListForProductAndSkuCall {
  691. c := &LicenseAssignmentsListForProductAndSkuCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  692. c.productId = productId
  693. c.skuId = skuId
  694. c.urlParams_.Set("customerId", customerId)
  695. return c
  696. }
  697. // MaxResults sets the optional parameter "maxResults": Maximum number
  698. // of campaigns to return at one time. Must be positive. Default value
  699. // is 100.
  700. func (c *LicenseAssignmentsListForProductAndSkuCall) MaxResults(maxResults int64) *LicenseAssignmentsListForProductAndSkuCall {
  701. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  702. return c
  703. }
  704. // PageToken sets the optional parameter "pageToken": Token to fetch the
  705. // next page. By default server will return first page
  706. func (c *LicenseAssignmentsListForProductAndSkuCall) PageToken(pageToken string) *LicenseAssignmentsListForProductAndSkuCall {
  707. c.urlParams_.Set("pageToken", pageToken)
  708. return c
  709. }
  710. // Fields allows partial responses to be retrieved. See
  711. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  712. // for more information.
  713. func (c *LicenseAssignmentsListForProductAndSkuCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductAndSkuCall {
  714. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  715. return c
  716. }
  717. // IfNoneMatch sets the optional parameter which makes the operation
  718. // fail if the object's ETag matches the given value. This is useful for
  719. // getting updates only after the object has changed since the last
  720. // request. Use googleapi.IsNotModified to check whether the response
  721. // error from Do is the result of In-None-Match.
  722. func (c *LicenseAssignmentsListForProductAndSkuCall) IfNoneMatch(entityTag string) *LicenseAssignmentsListForProductAndSkuCall {
  723. c.ifNoneMatch_ = entityTag
  724. return c
  725. }
  726. // Context sets the context to be used in this call's Do method. Any
  727. // pending HTTP request will be aborted if the provided context is
  728. // canceled.
  729. func (c *LicenseAssignmentsListForProductAndSkuCall) Context(ctx context.Context) *LicenseAssignmentsListForProductAndSkuCall {
  730. c.ctx_ = ctx
  731. return c
  732. }
  733. func (c *LicenseAssignmentsListForProductAndSkuCall) doRequest(alt string) (*http.Response, error) {
  734. var body io.Reader = nil
  735. c.urlParams_.Set("alt", alt)
  736. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/sku/{skuId}/users")
  737. urls += "?" + c.urlParams_.Encode()
  738. req, _ := http.NewRequest("GET", urls, body)
  739. googleapi.Expand(req.URL, map[string]string{
  740. "productId": c.productId,
  741. "skuId": c.skuId,
  742. })
  743. req.Header.Set("User-Agent", c.s.userAgent())
  744. if c.ifNoneMatch_ != "" {
  745. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  746. }
  747. if c.ctx_ != nil {
  748. return ctxhttp.Do(c.ctx_, c.s.client, req)
  749. }
  750. return c.s.client.Do(req)
  751. }
  752. // Do executes the "licensing.licenseAssignments.listForProductAndSku" call.
  753. // Exactly one of *LicenseAssignmentList or error will be non-nil. Any
  754. // non-2xx status code is an error. Response headers are in either
  755. // *LicenseAssignmentList.ServerResponse.Header or (if a response was
  756. // returned at all) in error.(*googleapi.Error).Header. Use
  757. // googleapi.IsNotModified to check whether the returned error was
  758. // because http.StatusNotModified was returned.
  759. func (c *LicenseAssignmentsListForProductAndSkuCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList, error) {
  760. gensupport.SetOptions(c.urlParams_, opts...)
  761. res, err := c.doRequest("json")
  762. if res != nil && res.StatusCode == http.StatusNotModified {
  763. if res.Body != nil {
  764. res.Body.Close()
  765. }
  766. return nil, &googleapi.Error{
  767. Code: res.StatusCode,
  768. Header: res.Header,
  769. }
  770. }
  771. if err != nil {
  772. return nil, err
  773. }
  774. defer googleapi.CloseBody(res)
  775. if err := googleapi.CheckResponse(res); err != nil {
  776. return nil, err
  777. }
  778. ret := &LicenseAssignmentList{
  779. ServerResponse: googleapi.ServerResponse{
  780. Header: res.Header,
  781. HTTPStatusCode: res.StatusCode,
  782. },
  783. }
  784. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  785. return nil, err
  786. }
  787. return ret, nil
  788. // {
  789. // "description": "List license assignments for given product and sku of the customer.",
  790. // "httpMethod": "GET",
  791. // "id": "licensing.licenseAssignments.listForProductAndSku",
  792. // "parameterOrder": [
  793. // "productId",
  794. // "skuId",
  795. // "customerId"
  796. // ],
  797. // "parameters": {
  798. // "customerId": {
  799. // "description": "CustomerId represents the customer for whom licenseassignments are queried",
  800. // "location": "query",
  801. // "required": true,
  802. // "type": "string"
  803. // },
  804. // "maxResults": {
  805. // "default": "100",
  806. // "description": "Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100.",
  807. // "format": "uint32",
  808. // "location": "query",
  809. // "maximum": "1000",
  810. // "minimum": "1",
  811. // "type": "integer"
  812. // },
  813. // "pageToken": {
  814. // "default": "",
  815. // "description": "Token to fetch the next page.Optional. By default server will return first page",
  816. // "location": "query",
  817. // "type": "string"
  818. // },
  819. // "productId": {
  820. // "description": "Name for product",
  821. // "location": "path",
  822. // "required": true,
  823. // "type": "string"
  824. // },
  825. // "skuId": {
  826. // "description": "Name for sku",
  827. // "location": "path",
  828. // "required": true,
  829. // "type": "string"
  830. // }
  831. // },
  832. // "path": "{productId}/sku/{skuId}/users",
  833. // "response": {
  834. // "$ref": "LicenseAssignmentList"
  835. // },
  836. // "scopes": [
  837. // "https://www.googleapis.com/auth/apps.licensing"
  838. // ]
  839. // }
  840. }
  841. // Pages invokes f for each page of results.
  842. // A non-nil error returned from f will halt the iteration.
  843. // The provided context supersedes any context provided to the Context method.
  844. func (c *LicenseAssignmentsListForProductAndSkuCall) Pages(ctx context.Context, f func(*LicenseAssignmentList) error) error {
  845. c.ctx_ = ctx
  846. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  847. for {
  848. x, err := c.Do()
  849. if err != nil {
  850. return err
  851. }
  852. if err := f(x); err != nil {
  853. return err
  854. }
  855. if x.NextPageToken == "" {
  856. return nil
  857. }
  858. c.PageToken(x.NextPageToken)
  859. }
  860. }
  861. // method id "licensing.licenseAssignments.patch":
  862. type LicenseAssignmentsPatchCall struct {
  863. s *Service
  864. productId string
  865. skuId string
  866. userId string
  867. licenseassignment *LicenseAssignment
  868. urlParams_ gensupport.URLParams
  869. ctx_ context.Context
  870. }
  871. // Patch: Assign License. This method supports patch semantics.
  872. func (r *LicenseAssignmentsService) Patch(productId string, skuId string, userId string, licenseassignment *LicenseAssignment) *LicenseAssignmentsPatchCall {
  873. c := &LicenseAssignmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  874. c.productId = productId
  875. c.skuId = skuId
  876. c.userId = userId
  877. c.licenseassignment = licenseassignment
  878. return c
  879. }
  880. // Fields allows partial responses to be retrieved. See
  881. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  882. // for more information.
  883. func (c *LicenseAssignmentsPatchCall) Fields(s ...googleapi.Field) *LicenseAssignmentsPatchCall {
  884. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  885. return c
  886. }
  887. // Context sets the context to be used in this call's Do method. Any
  888. // pending HTTP request will be aborted if the provided context is
  889. // canceled.
  890. func (c *LicenseAssignmentsPatchCall) Context(ctx context.Context) *LicenseAssignmentsPatchCall {
  891. c.ctx_ = ctx
  892. return c
  893. }
  894. func (c *LicenseAssignmentsPatchCall) doRequest(alt string) (*http.Response, error) {
  895. var body io.Reader = nil
  896. body, err := googleapi.WithoutDataWrapper.JSONReader(c.licenseassignment)
  897. if err != nil {
  898. return nil, err
  899. }
  900. ctype := "application/json"
  901. c.urlParams_.Set("alt", alt)
  902. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/sku/{skuId}/user/{userId}")
  903. urls += "?" + c.urlParams_.Encode()
  904. req, _ := http.NewRequest("PATCH", urls, body)
  905. googleapi.Expand(req.URL, map[string]string{
  906. "productId": c.productId,
  907. "skuId": c.skuId,
  908. "userId": c.userId,
  909. })
  910. req.Header.Set("Content-Type", ctype)
  911. req.Header.Set("User-Agent", c.s.userAgent())
  912. if c.ctx_ != nil {
  913. return ctxhttp.Do(c.ctx_, c.s.client, req)
  914. }
  915. return c.s.client.Do(req)
  916. }
  917. // Do executes the "licensing.licenseAssignments.patch" call.
  918. // Exactly one of *LicenseAssignment or error will be non-nil. Any
  919. // non-2xx status code is an error. Response headers are in either
  920. // *LicenseAssignment.ServerResponse.Header or (if a response was
  921. // returned at all) in error.(*googleapi.Error).Header. Use
  922. // googleapi.IsNotModified to check whether the returned error was
  923. // because http.StatusNotModified was returned.
  924. func (c *LicenseAssignmentsPatchCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error) {
  925. gensupport.SetOptions(c.urlParams_, opts...)
  926. res, err := c.doRequest("json")
  927. if res != nil && res.StatusCode == http.StatusNotModified {
  928. if res.Body != nil {
  929. res.Body.Close()
  930. }
  931. return nil, &googleapi.Error{
  932. Code: res.StatusCode,
  933. Header: res.Header,
  934. }
  935. }
  936. if err != nil {
  937. return nil, err
  938. }
  939. defer googleapi.CloseBody(res)
  940. if err := googleapi.CheckResponse(res); err != nil {
  941. return nil, err
  942. }
  943. ret := &LicenseAssignment{
  944. ServerResponse: googleapi.ServerResponse{
  945. Header: res.Header,
  946. HTTPStatusCode: res.StatusCode,
  947. },
  948. }
  949. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  950. return nil, err
  951. }
  952. return ret, nil
  953. // {
  954. // "description": "Assign License. This method supports patch semantics.",
  955. // "httpMethod": "PATCH",
  956. // "id": "licensing.licenseAssignments.patch",
  957. // "parameterOrder": [
  958. // "productId",
  959. // "skuId",
  960. // "userId"
  961. // ],
  962. // "parameters": {
  963. // "productId": {
  964. // "description": "Name for product",
  965. // "location": "path",
  966. // "required": true,
  967. // "type": "string"
  968. // },
  969. // "skuId": {
  970. // "description": "Name for sku for which license would be revoked",
  971. // "location": "path",
  972. // "required": true,
  973. // "type": "string"
  974. // },
  975. // "userId": {
  976. // "description": "email id or unique Id of the user",
  977. // "location": "path",
  978. // "required": true,
  979. // "type": "string"
  980. // }
  981. // },
  982. // "path": "{productId}/sku/{skuId}/user/{userId}",
  983. // "request": {
  984. // "$ref": "LicenseAssignment"
  985. // },
  986. // "response": {
  987. // "$ref": "LicenseAssignment"
  988. // },
  989. // "scopes": [
  990. // "https://www.googleapis.com/auth/apps.licensing"
  991. // ]
  992. // }
  993. }
  994. // method id "licensing.licenseAssignments.update":
  995. type LicenseAssignmentsUpdateCall struct {
  996. s *Service
  997. productId string
  998. skuId string
  999. userId string
  1000. licenseassignment *LicenseAssignment
  1001. urlParams_ gensupport.URLParams
  1002. ctx_ context.Context
  1003. }
  1004. // Update: Assign License.
  1005. func (r *LicenseAssignmentsService) Update(productId string, skuId string, userId string, licenseassignment *LicenseAssignment) *LicenseAssignmentsUpdateCall {
  1006. c := &LicenseAssignmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1007. c.productId = productId
  1008. c.skuId = skuId
  1009. c.userId = userId
  1010. c.licenseassignment = licenseassignment
  1011. return c
  1012. }
  1013. // Fields allows partial responses to be retrieved. See
  1014. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1015. // for more information.
  1016. func (c *LicenseAssignmentsUpdateCall) Fields(s ...googleapi.Field) *LicenseAssignmentsUpdateCall {
  1017. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1018. return c
  1019. }
  1020. // Context sets the context to be used in this call's Do method. Any
  1021. // pending HTTP request will be aborted if the provided context is
  1022. // canceled.
  1023. func (c *LicenseAssignmentsUpdateCall) Context(ctx context.Context) *LicenseAssignmentsUpdateCall {
  1024. c.ctx_ = ctx
  1025. return c
  1026. }
  1027. func (c *LicenseAssignmentsUpdateCall) doRequest(alt string) (*http.Response, error) {
  1028. var body io.Reader = nil
  1029. body, err := googleapi.WithoutDataWrapper.JSONReader(c.licenseassignment)
  1030. if err != nil {
  1031. return nil, err
  1032. }
  1033. ctype := "application/json"
  1034. c.urlParams_.Set("alt", alt)
  1035. urls := googleapi.ResolveRelative(c.s.BasePath, "{productId}/sku/{skuId}/user/{userId}")
  1036. urls += "?" + c.urlParams_.Encode()
  1037. req, _ := http.NewRequest("PUT", urls, body)
  1038. googleapi.Expand(req.URL, map[string]string{
  1039. "productId": c.productId,
  1040. "skuId": c.skuId,
  1041. "userId": c.userId,
  1042. })
  1043. req.Header.Set("Content-Type", ctype)
  1044. req.Header.Set("User-Agent", c.s.userAgent())
  1045. if c.ctx_ != nil {
  1046. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1047. }
  1048. return c.s.client.Do(req)
  1049. }
  1050. // Do executes the "licensing.licenseAssignments.update" call.
  1051. // Exactly one of *LicenseAssignment or error will be non-nil. Any
  1052. // non-2xx status code is an error. Response headers are in either
  1053. // *LicenseAssignment.ServerResponse.Header or (if a response was
  1054. // returned at all) in error.(*googleapi.Error).Header. Use
  1055. // googleapi.IsNotModified to check whether the returned error was
  1056. // because http.StatusNotModified was returned.
  1057. func (c *LicenseAssignmentsUpdateCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error) {
  1058. gensupport.SetOptions(c.urlParams_, opts...)
  1059. res, err := c.doRequest("json")
  1060. if res != nil && res.StatusCode == http.StatusNotModified {
  1061. if res.Body != nil {
  1062. res.Body.Close()
  1063. }
  1064. return nil, &googleapi.Error{
  1065. Code: res.StatusCode,
  1066. Header: res.Header,
  1067. }
  1068. }
  1069. if err != nil {
  1070. return nil, err
  1071. }
  1072. defer googleapi.CloseBody(res)
  1073. if err := googleapi.CheckResponse(res); err != nil {
  1074. return nil, err
  1075. }
  1076. ret := &LicenseAssignment{
  1077. ServerResponse: googleapi.ServerResponse{
  1078. Header: res.Header,
  1079. HTTPStatusCode: res.StatusCode,
  1080. },
  1081. }
  1082. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1083. return nil, err
  1084. }
  1085. return ret, nil
  1086. // {
  1087. // "description": "Assign License.",
  1088. // "httpMethod": "PUT",
  1089. // "id": "licensing.licenseAssignments.update",
  1090. // "parameterOrder": [
  1091. // "productId",
  1092. // "skuId",
  1093. // "userId"
  1094. // ],
  1095. // "parameters": {
  1096. // "productId": {
  1097. // "description": "Name for product",
  1098. // "location": "path",
  1099. // "required": true,
  1100. // "type": "string"
  1101. // },
  1102. // "skuId": {
  1103. // "description": "Name for sku for which license would be revoked",
  1104. // "location": "path",
  1105. // "required": true,
  1106. // "type": "string"
  1107. // },
  1108. // "userId": {
  1109. // "description": "email id or unique Id of the user",
  1110. // "location": "path",
  1111. // "required": true,
  1112. // "type": "string"
  1113. // }
  1114. // },
  1115. // "path": "{productId}/sku/{skuId}/user/{userId}",
  1116. // "request": {
  1117. // "$ref": "LicenseAssignment"
  1118. // },
  1119. // "response": {
  1120. // "$ref": "LicenseAssignment"
  1121. // },
  1122. // "scopes": [
  1123. // "https://www.googleapis.com/auth/apps.licensing"
  1124. // ]
  1125. // }
  1126. }