slides: make int values of Range optional

Depending on `Type` of `Range` speicified the api either expects
or does not expect values. In the case of type `ALL`, these indexes
should not be sent. In the case of type `FIXED_RANGE`, a user might
want to set either the start index or end index to 0. By making
these two pointer types both ways can work provided the correct
input.

Fixes: #433
Change-Id: I060d648dfd72ef51bd8ba202c45dc9a486efed4a
Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/55090
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chris Broadfoot <cbro@google.com>
1 file changed
tree: 3be90fbb8328e714cd80eaebf05595ab0d64f13a
  1. abusiveexperiencereport/
  2. acceleratedmobilepageurl/
  3. accessapproval/
  4. accesscontextmanager/
  5. adexchangebuyer/
  6. adexchangebuyer2/
  7. adexchangeseller/
  8. adexperiencereport/
  9. admin/
  10. admob/
  11. adsense/
  12. adsensehost/
  13. alertcenter/
  14. analytics/
  15. analyticsreporting/
  16. androiddeviceprovisioning/
  17. androidenterprise/
  18. androidmanagement/
  19. androidpublisher/
  20. apigee/
  21. appengine/
  22. appsactivity/
  23. appstate/
  24. bigquery/
  25. bigqueryconnection/
  26. bigquerydatatransfer/
  27. bigqueryreservation/
  28. bigtableadmin/
  29. billingbudgets/
  30. binaryauthorization/
  31. blogger/
  32. books/
  33. calendar/
  34. chat/
  35. civicinfo/
  36. classroom/
  37. cloudasset/
  38. cloudbilling/
  39. cloudbuild/
  40. cloudcommerceprocurement/
  41. clouddebugger/
  42. clouderrorreporting/
  43. cloudfunctions/
  44. cloudidentity/
  45. cloudiot/
  46. cloudkms/
  47. cloudprivatecatalog/
  48. cloudprivatecatalogproducer/
  49. cloudprofiler/
  50. cloudresourcemanager/
  51. cloudscheduler/
  52. cloudsearch/
  53. cloudshell/
  54. cloudtasks/
  55. cloudtrace/
  56. commentanalyzer/
  57. composer/
  58. compute/
  59. consumersurveys/
  60. container/
  61. containeranalysis/
  62. content/
  63. customsearch/
  64. datacatalog/
  65. dataflow/
  66. datafusion/
  67. dataproc/
  68. datastore/
  69. deploymentmanager/
  70. dfareporting/
  71. dialogflow/
  72. digitalassetlinks/
  73. discovery/
  74. displayvideo/
  75. dlp/
  76. dns/
  77. docs/
  78. domainsrdap/
  79. doubleclickbidmanager/
  80. doubleclicksearch/
  81. drive/
  82. driveactivity/
  83. examples/
  84. factchecktools/
  85. fcm/
  86. file/
  87. firebase/
  88. firebasedynamiclinks/
  89. firebasehosting/
  90. firebaseremoteconfig/
  91. firebaserules/
  92. firestore/
  93. fitness/
  94. fusiontables/
  95. games/
  96. gamesconfiguration/
  97. gameservices/
  98. gamesmanagement/
  99. genomics/
  100. gmail/
  101. google-api-go-generator/
  102. googleapi/
  103. groupsmigration/
  104. groupssettings/
  105. healthcare/
  106. homegraph/
  107. iam/
  108. iamcredentials/
  109. iap/
  110. identitytoolkit/
  111. indexing/
  112. integration-tests/
  113. internal/
  114. iterator/
  115. jobs/
  116. kgsearch/
  117. language/
  118. lib/
  119. libraryagent/
  120. licensing/
  121. lifesciences/
  122. logging/
  123. managedidentities/
  124. manufacturers/
  125. memcache/
  126. mirror/
  127. ml/
  128. monitoring/
  129. networkmanagement/
  130. oauth2/
  131. option/
  132. osconfig/
  133. oslogin/
  134. pagespeedonline/
  135. partners/
  136. people/
  137. playcustomapp/
  138. playmoviespartner/
  139. plus/
  140. plusdomains/
  141. policytroubleshooter/
  142. poly/
  143. prod_tt_sasportal/
  144. proximitybeacon/
  145. pubsub/
  146. qpxexpress/
  147. recommender/
  148. redis/
  149. remotebuildexecution/
  150. replicapool/
  151. replicapoolupdater/
  152. reseller/
  153. run/
  154. runtimeconfig/
  155. safebrowsing/
  156. sasportal/
  157. script/
  158. searchconsole/
  159. secretmanager/
  160. securitycenter/
  161. servicebroker/
  162. serviceconsumermanagement/
  163. servicecontrol/
  164. servicedirectory/
  165. servicemanagement/
  166. servicenetworking/
  167. serviceusage/
  168. serviceuser/
  169. sheets/
  170. siteverification/
  171. slides/
  172. sourcerepo/
  173. spanner/
  174. spectrum/
  175. speech/
  176. sql/
  177. sqladmin/
  178. storage/
  179. storagetransfer/
  180. streetviewpublish/
  181. support/
  182. surveys/
  183. tagmanager/
  184. tasks/
  185. testing/
  186. texttospeech/
  187. toolresults/
  188. tpu/
  189. tracing/
  190. translate/
  191. transport/
  192. urlshortener/
  193. vault/
  194. verifiedaccess/
  195. videointelligence/
  196. vision/
  197. webfonts/
  198. webmasters/
  199. websecurityscanner/
  200. youtube/
  201. youtubeanalytics/
  202. youtubereporting/
  203. .gitignore
  204. .hgtags
  205. api-list.json
  206. AUTHORS
  207. CHANGES.md
  208. CONTRIBUTING.md
  209. CONTRIBUTORS
  210. doc.go
  211. GettingStarted.md
  212. go.mod
  213. go.sum
  214. LICENSE
  215. license_test.go
  216. NOTES
  217. README.md
  218. RELEASING.md
  219. TODO
  220. tools.go
README.md

Google APIs Client Library for Go

Getting Started

$ go get google.golang.org/api/tasks/v1
$ go get google.golang.org/api/moderator/v1
$ go get google.golang.org/api/urlshortener/v1
... etc ...

and using:

package main

import (
	"net/http"

	"google.golang.org/api/urlshortener/v1"
)

func main() {
	svc, err := urlshortener.New(http.DefaultClient)
	// ...
}

Status

GoDoc

These are auto-generated Go libraries from the Google Discovery Service's JSON description files of the available “new style” Google APIs.

Due to the auto-generated nature of this collection of libraries, complete APIs or specific versions can appear or go away without notice. As a result, you should always locally vendor any API(s) that your code relies upon.

These client libraries are officially supported by Google. However, the libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

If you're working with Google Cloud Platform APIs such as Datastore or Pub/Sub, consider using the Cloud Client Libraries for Go instead. These are the new and idiomatic Go libraries targeted specifically at Google Cloud Platform Services.

The generator itself and the code it produces are beta. Some APIs are alpha/beta, and indicated as such in the import path (e.g., “google.golang.org/api/someapi/v1alpha”).

Application Default Credentials Example

Application Default Credentials provide a simplified way to obtain credentials for authenticating with Google APIs.

The Application Default Credentials authenticate as the application itself, which make them great for working with Google Cloud APIs like Storage or Datastore. They are the recommended form of authentication when building applications that run on Google Compute Engine or Google App Engine.

Default credentials are provided by the golang.org/x/oauth2/google package. To use them, add the following import:

import "golang.org/x/oauth2/google"

Some credentials types require you to specify scopes, and service entry points may not inject them. If you encounter this situation you may need to specify scopes as follows:

import (
        "context"
        "golang.org/x/oauth2/google"
        "google.golang.org/api/compute/v1"
)

func main() {
        // Use oauth2.NoContext if there isn't a good context to pass in.
        ctx := context.Background()

        client, err := google.DefaultClient(ctx, compute.ComputeScope)
        if err != nil {
                //...
        }
        computeService, err := compute.New(client)
        if err != nil {
                //...
        }
}

If you need a oauth2.TokenSource, use the DefaultTokenSource function:

ts, err := google.DefaultTokenSource(ctx, scope1, scope2, ...)
if err != nil {
        //...
}
client := oauth2.NewClient(ctx, ts)

See also: golang.org/x/oauth2/google package documentation.