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.
 
 
 

4859 lines
176 KiB

  1. // Copyright 2018 Google Inc. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // AUTO-GENERATED CODE. DO NOT EDIT.
  5. // Package serviceuser provides access to the Service User API.
  6. //
  7. // See https://cloud.google.com/service-management/
  8. //
  9. // Usage example:
  10. //
  11. // import "google.golang.org/api/serviceuser/v1"
  12. // ...
  13. // serviceuserService, err := serviceuser.New(oauthHttpClient)
  14. package serviceuser // import "google.golang.org/api/serviceuser/v1"
  15. import (
  16. "bytes"
  17. "context"
  18. "encoding/json"
  19. "errors"
  20. "fmt"
  21. "io"
  22. "net/http"
  23. "net/url"
  24. "strconv"
  25. "strings"
  26. gensupport "google.golang.org/api/gensupport"
  27. googleapi "google.golang.org/api/googleapi"
  28. )
  29. // Always reference these packages, just in case the auto-generated code
  30. // below doesn't.
  31. var _ = bytes.NewBuffer
  32. var _ = strconv.Itoa
  33. var _ = fmt.Sprintf
  34. var _ = json.NewDecoder
  35. var _ = io.Copy
  36. var _ = url.Parse
  37. var _ = gensupport.MarshalJSON
  38. var _ = googleapi.Version
  39. var _ = errors.New
  40. var _ = strings.Replace
  41. var _ = context.Canceled
  42. const apiId = "serviceuser:v1"
  43. const apiName = "serviceuser"
  44. const apiVersion = "v1"
  45. const basePath = "https://serviceuser.googleapis.com/"
  46. // OAuth2 scopes used by this API.
  47. const (
  48. // View and manage your data across Google Cloud Platform services
  49. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  50. // View your data across Google Cloud Platform services
  51. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  52. // Manage your Google API service configuration
  53. ServiceManagementScope = "https://www.googleapis.com/auth/service.management"
  54. )
  55. func New(client *http.Client) (*APIService, error) {
  56. if client == nil {
  57. return nil, errors.New("client is nil")
  58. }
  59. s := &APIService{client: client, BasePath: basePath}
  60. s.Projects = NewProjectsService(s)
  61. s.Services = NewServicesService(s)
  62. return s, nil
  63. }
  64. type APIService struct {
  65. client *http.Client
  66. BasePath string // API endpoint base URL
  67. UserAgent string // optional additional User-Agent fragment
  68. Projects *ProjectsService
  69. Services *ServicesService
  70. }
  71. func (s *APIService) userAgent() string {
  72. if s.UserAgent == "" {
  73. return googleapi.UserAgent
  74. }
  75. return googleapi.UserAgent + " " + s.UserAgent
  76. }
  77. func NewProjectsService(s *APIService) *ProjectsService {
  78. rs := &ProjectsService{s: s}
  79. rs.Services = NewProjectsServicesService(s)
  80. return rs
  81. }
  82. type ProjectsService struct {
  83. s *APIService
  84. Services *ProjectsServicesService
  85. }
  86. func NewProjectsServicesService(s *APIService) *ProjectsServicesService {
  87. rs := &ProjectsServicesService{s: s}
  88. return rs
  89. }
  90. type ProjectsServicesService struct {
  91. s *APIService
  92. }
  93. func NewServicesService(s *APIService) *ServicesService {
  94. rs := &ServicesService{s: s}
  95. return rs
  96. }
  97. type ServicesService struct {
  98. s *APIService
  99. }
  100. // Api: Api is a light-weight descriptor for an API
  101. // Interface.
  102. //
  103. // Interfaces are also described as "protocol buffer services" in some
  104. // contexts,
  105. // such as by the "service" keyword in a .proto file, but they are
  106. // different
  107. // from API Services, which represent a concrete implementation of an
  108. // interface
  109. // as opposed to simply a description of methods and bindings. They are
  110. // also
  111. // sometimes simply referred to as "APIs" in other contexts, such as the
  112. // name of
  113. // this message itself. See
  114. // https://cloud.google.com/apis/design/glossary for
  115. // detailed terminology.
  116. type Api struct {
  117. // Methods: The methods of this interface, in unspecified order.
  118. Methods []*Method `json:"methods,omitempty"`
  119. // Mixins: Included interfaces. See Mixin.
  120. Mixins []*Mixin `json:"mixins,omitempty"`
  121. // Name: The fully qualified name of this interface, including package
  122. // name
  123. // followed by the interface's simple name.
  124. Name string `json:"name,omitempty"`
  125. // Options: Any metadata attached to the interface.
  126. Options []*Option `json:"options,omitempty"`
  127. // SourceContext: Source context for the protocol buffer service
  128. // represented by this
  129. // message.
  130. SourceContext *SourceContext `json:"sourceContext,omitempty"`
  131. // Syntax: The source syntax of the service.
  132. //
  133. // Possible values:
  134. // "SYNTAX_PROTO2" - Syntax `proto2`.
  135. // "SYNTAX_PROTO3" - Syntax `proto3`.
  136. Syntax string `json:"syntax,omitempty"`
  137. // Version: A version string for this interface. If specified, must have
  138. // the form
  139. // `major-version.minor-version`, as in `1.10`. If the minor version
  140. // is
  141. // omitted, it defaults to zero. If the entire version field is empty,
  142. // the
  143. // major version is derived from the package name, as outlined below. If
  144. // the
  145. // field is not empty, the version in the package name will be verified
  146. // to be
  147. // consistent with what is provided here.
  148. //
  149. // The versioning schema uses [semantic
  150. // versioning](http://semver.org) where the major version
  151. // number
  152. // indicates a breaking change and the minor version an
  153. // additive,
  154. // non-breaking change. Both version numbers are signals to users
  155. // what to expect from different versions, and should be
  156. // carefully
  157. // chosen based on the product plan.
  158. //
  159. // The major version is also reflected in the package name of
  160. // the
  161. // interface, which must end in `v<major-version>`, as
  162. // in
  163. // `google.feature.v1`. For major versions 0 and 1, the suffix can
  164. // be omitted. Zero major versions must only be used for
  165. // experimental, non-GA interfaces.
  166. //
  167. Version string `json:"version,omitempty"`
  168. // ForceSendFields is a list of field names (e.g. "Methods") to
  169. // unconditionally include in API requests. By default, fields with
  170. // empty values are omitted from API requests. However, any non-pointer,
  171. // non-interface field appearing in ForceSendFields will be sent to the
  172. // server regardless of whether the field is empty or not. This may be
  173. // used to include empty fields in Patch requests.
  174. ForceSendFields []string `json:"-"`
  175. // NullFields is a list of field names (e.g. "Methods") to include in
  176. // API requests with the JSON null value. By default, fields with empty
  177. // values are omitted from API requests. However, any field with an
  178. // empty value appearing in NullFields will be sent to the server as
  179. // null. It is an error if a field in this list has a non-empty value.
  180. // This may be used to include null fields in Patch requests.
  181. NullFields []string `json:"-"`
  182. }
  183. func (s *Api) MarshalJSON() ([]byte, error) {
  184. type NoMethod Api
  185. raw := NoMethod(*s)
  186. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  187. }
  188. // AuthProvider: Configuration for an anthentication provider, including
  189. // support for
  190. // [JSON Web Token
  191. // (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32)
  192. // .
  193. type AuthProvider struct {
  194. // Audiences: The list of
  195. // JWT
  196. // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
  197. // token-32#section-4.1.3).
  198. // that are allowed to access. A JWT containing any of these audiences
  199. // will
  200. // be accepted. When this setting is absent, only JWTs with
  201. // audience
  202. // "https://Service_name/API_name"
  203. // will be accepted. For example, if no audiences are in the
  204. // setting,
  205. // LibraryService API will only accept JWTs with the following
  206. // audience
  207. // "https://library-example.googleapis.com/google.example.librar
  208. // y.v1.LibraryService".
  209. //
  210. // Example:
  211. //
  212. // audiences: bookstore_android.apps.googleusercontent.com,
  213. // bookstore_web.apps.googleusercontent.com
  214. Audiences string `json:"audiences,omitempty"`
  215. // AuthorizationUrl: Redirect URL if JWT token is required but no
  216. // present or is expired.
  217. // Implement authorizationUrl of securityDefinitions in OpenAPI spec.
  218. AuthorizationUrl string `json:"authorizationUrl,omitempty"`
  219. // Id: The unique identifier of the auth provider. It will be referred
  220. // to by
  221. // `AuthRequirement.provider_id`.
  222. //
  223. // Example: "bookstore_auth".
  224. Id string `json:"id,omitempty"`
  225. // Issuer: Identifies the principal that issued the JWT.
  226. // See
  227. // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#sec
  228. // tion-4.1.1
  229. // Usually a URL or an email address.
  230. //
  231. // Example: https://securetoken.google.com
  232. // Example: 1234567-compute@developer.gserviceaccount.com
  233. Issuer string `json:"issuer,omitempty"`
  234. // JwksUri: URL of the provider's public key set to validate signature
  235. // of the JWT. See
  236. // [OpenID
  237. // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#
  238. // ProviderMetadata).
  239. // Optional if the key set document:
  240. // - can be retrieved from
  241. // [OpenID
  242. // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
  243. //
  244. // of the issuer.
  245. // - can be inferred from the email domain of the issuer (e.g. a Google
  246. // service account).
  247. //
  248. // Example: https://www.googleapis.com/oauth2/v1/certs
  249. JwksUri string `json:"jwksUri,omitempty"`
  250. // ForceSendFields is a list of field names (e.g. "Audiences") to
  251. // unconditionally include in API requests. By default, fields with
  252. // empty values are omitted from API requests. However, any non-pointer,
  253. // non-interface field appearing in ForceSendFields will be sent to the
  254. // server regardless of whether the field is empty or not. This may be
  255. // used to include empty fields in Patch requests.
  256. ForceSendFields []string `json:"-"`
  257. // NullFields is a list of field names (e.g. "Audiences") to include in
  258. // API requests with the JSON null value. By default, fields with empty
  259. // values are omitted from API requests. However, any field with an
  260. // empty value appearing in NullFields will be sent to the server as
  261. // null. It is an error if a field in this list has a non-empty value.
  262. // This may be used to include null fields in Patch requests.
  263. NullFields []string `json:"-"`
  264. }
  265. func (s *AuthProvider) MarshalJSON() ([]byte, error) {
  266. type NoMethod AuthProvider
  267. raw := NoMethod(*s)
  268. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  269. }
  270. // AuthRequirement: User-defined authentication requirements, including
  271. // support for
  272. // [JSON Web Token
  273. // (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32)
  274. // .
  275. type AuthRequirement struct {
  276. // Audiences: NOTE: This will be deprecated soon, once
  277. // AuthProvider.audiences is
  278. // implemented and accepted in all the runtime components.
  279. //
  280. // The list of
  281. // JWT
  282. // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
  283. // token-32#section-4.1.3).
  284. // that are allowed to access. A JWT containing any of these audiences
  285. // will
  286. // be accepted. When this setting is absent, only JWTs with
  287. // audience
  288. // "https://Service_name/API_name"
  289. // will be accepted. For example, if no audiences are in the
  290. // setting,
  291. // LibraryService API will only accept JWTs with the following
  292. // audience
  293. // "https://library-example.googleapis.com/google.example.librar
  294. // y.v1.LibraryService".
  295. //
  296. // Example:
  297. //
  298. // audiences: bookstore_android.apps.googleusercontent.com,
  299. // bookstore_web.apps.googleusercontent.com
  300. Audiences string `json:"audiences,omitempty"`
  301. // ProviderId: id from authentication provider.
  302. //
  303. // Example:
  304. //
  305. // provider_id: bookstore_auth
  306. ProviderId string `json:"providerId,omitempty"`
  307. // ForceSendFields is a list of field names (e.g. "Audiences") to
  308. // unconditionally include in API requests. By default, fields with
  309. // empty values are omitted from API requests. However, any non-pointer,
  310. // non-interface field appearing in ForceSendFields will be sent to the
  311. // server regardless of whether the field is empty or not. This may be
  312. // used to include empty fields in Patch requests.
  313. ForceSendFields []string `json:"-"`
  314. // NullFields is a list of field names (e.g. "Audiences") to include in
  315. // API requests with the JSON null value. By default, fields with empty
  316. // values are omitted from API requests. However, any field with an
  317. // empty value appearing in NullFields will be sent to the server as
  318. // null. It is an error if a field in this list has a non-empty value.
  319. // This may be used to include null fields in Patch requests.
  320. NullFields []string `json:"-"`
  321. }
  322. func (s *AuthRequirement) MarshalJSON() ([]byte, error) {
  323. type NoMethod AuthRequirement
  324. raw := NoMethod(*s)
  325. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  326. }
  327. // Authentication: `Authentication` defines the authentication
  328. // configuration for an API.
  329. //
  330. // Example for an API targeted for external use:
  331. //
  332. // name: calendar.googleapis.com
  333. // authentication:
  334. // providers:
  335. // - id: google_calendar_auth
  336. // jwks_uri: https://www.googleapis.com/oauth2/v1/certs
  337. // issuer: https://securetoken.google.com
  338. // rules:
  339. // - selector: "*"
  340. // requirements:
  341. // provider_id: google_calendar_auth
  342. type Authentication struct {
  343. // Providers: Defines a set of authentication providers that a service
  344. // supports.
  345. Providers []*AuthProvider `json:"providers,omitempty"`
  346. // Rules: A list of authentication rules that apply to individual API
  347. // methods.
  348. //
  349. // **NOTE:** All service configuration rules follow "last one wins"
  350. // order.
  351. Rules []*AuthenticationRule `json:"rules,omitempty"`
  352. // ForceSendFields is a list of field names (e.g. "Providers") to
  353. // unconditionally include in API requests. By default, fields with
  354. // empty values are omitted from API requests. However, any non-pointer,
  355. // non-interface field appearing in ForceSendFields will be sent to the
  356. // server regardless of whether the field is empty or not. This may be
  357. // used to include empty fields in Patch requests.
  358. ForceSendFields []string `json:"-"`
  359. // NullFields is a list of field names (e.g. "Providers") to include in
  360. // API requests with the JSON null value. By default, fields with empty
  361. // values are omitted from API requests. However, any field with an
  362. // empty value appearing in NullFields will be sent to the server as
  363. // null. It is an error if a field in this list has a non-empty value.
  364. // This may be used to include null fields in Patch requests.
  365. NullFields []string `json:"-"`
  366. }
  367. func (s *Authentication) MarshalJSON() ([]byte, error) {
  368. type NoMethod Authentication
  369. raw := NoMethod(*s)
  370. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  371. }
  372. // AuthenticationRule: Authentication rules for the service.
  373. //
  374. // By default, if a method has any authentication requirements, every
  375. // request
  376. // must include a valid credential matching one of the
  377. // requirements.
  378. // It's an error to include more than one kind of credential in a
  379. // single
  380. // request.
  381. //
  382. // If a method doesn't have any auth requirements, request credentials
  383. // will be
  384. // ignored.
  385. type AuthenticationRule struct {
  386. // AllowWithoutCredential: If true, the service accepts API keys without
  387. // any other credential.
  388. AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"`
  389. // Oauth: The requirements for OAuth credentials.
  390. Oauth *OAuthRequirements `json:"oauth,omitempty"`
  391. // Requirements: Requirements for additional authentication providers.
  392. Requirements []*AuthRequirement `json:"requirements,omitempty"`
  393. // Selector: Selects the methods to which this rule applies.
  394. //
  395. // Refer to selector for syntax details.
  396. Selector string `json:"selector,omitempty"`
  397. // ForceSendFields is a list of field names (e.g.
  398. // "AllowWithoutCredential") to unconditionally include in API requests.
  399. // By default, fields with empty values are omitted from API requests.
  400. // However, any non-pointer, non-interface field appearing in
  401. // ForceSendFields will be sent to the server regardless of whether the
  402. // field is empty or not. This may be used to include empty fields in
  403. // Patch requests.
  404. ForceSendFields []string `json:"-"`
  405. // NullFields is a list of field names (e.g. "AllowWithoutCredential")
  406. // to include in API requests with the JSON null value. By default,
  407. // fields with empty values are omitted from API requests. However, any
  408. // field with an empty value appearing in NullFields will be sent to the
  409. // server as null. It is an error if a field in this list has a
  410. // non-empty value. This may be used to include null fields in Patch
  411. // requests.
  412. NullFields []string `json:"-"`
  413. }
  414. func (s *AuthenticationRule) MarshalJSON() ([]byte, error) {
  415. type NoMethod AuthenticationRule
  416. raw := NoMethod(*s)
  417. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  418. }
  419. // AuthorizationConfig: Configuration of authorization.
  420. //
  421. // This section determines the authorization provider, if unspecified,
  422. // then no
  423. // authorization check will be done.
  424. //
  425. // Example:
  426. //
  427. // experimental:
  428. // authorization:
  429. // provider: firebaserules.googleapis.com
  430. type AuthorizationConfig struct {
  431. // Provider: The name of the authorization provider, such
  432. // as
  433. // firebaserules.googleapis.com.
  434. Provider string `json:"provider,omitempty"`
  435. // ForceSendFields is a list of field names (e.g. "Provider") to
  436. // unconditionally include in API requests. By default, fields with
  437. // empty values are omitted from API requests. However, any non-pointer,
  438. // non-interface field appearing in ForceSendFields will be sent to the
  439. // server regardless of whether the field is empty or not. This may be
  440. // used to include empty fields in Patch requests.
  441. ForceSendFields []string `json:"-"`
  442. // NullFields is a list of field names (e.g. "Provider") to include in
  443. // API requests with the JSON null value. By default, fields with empty
  444. // values are omitted from API requests. However, any field with an
  445. // empty value appearing in NullFields will be sent to the server as
  446. // null. It is an error if a field in this list has a non-empty value.
  447. // This may be used to include null fields in Patch requests.
  448. NullFields []string `json:"-"`
  449. }
  450. func (s *AuthorizationConfig) MarshalJSON() ([]byte, error) {
  451. type NoMethod AuthorizationConfig
  452. raw := NoMethod(*s)
  453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  454. }
  455. // Backend: `Backend` defines the backend configuration for a service.
  456. type Backend struct {
  457. // Rules: A list of API backend rules that apply to individual API
  458. // methods.
  459. //
  460. // **NOTE:** All service configuration rules follow "last one wins"
  461. // order.
  462. Rules []*BackendRule `json:"rules,omitempty"`
  463. // ForceSendFields is a list of field names (e.g. "Rules") to
  464. // unconditionally include in API requests. By default, fields with
  465. // empty values are omitted from API requests. However, any non-pointer,
  466. // non-interface field appearing in ForceSendFields will be sent to the
  467. // server regardless of whether the field is empty or not. This may be
  468. // used to include empty fields in Patch requests.
  469. ForceSendFields []string `json:"-"`
  470. // NullFields is a list of field names (e.g. "Rules") to include in API
  471. // requests with the JSON null value. By default, fields with empty
  472. // values are omitted from API requests. However, any field with an
  473. // empty value appearing in NullFields will be sent to the server as
  474. // null. It is an error if a field in this list has a non-empty value.
  475. // This may be used to include null fields in Patch requests.
  476. NullFields []string `json:"-"`
  477. }
  478. func (s *Backend) MarshalJSON() ([]byte, error) {
  479. type NoMethod Backend
  480. raw := NoMethod(*s)
  481. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  482. }
  483. // BackendRule: A backend rule provides configuration for an individual
  484. // API element.
  485. type BackendRule struct {
  486. // Address: The address of the API backend.
  487. Address string `json:"address,omitempty"`
  488. // Deadline: The number of seconds to wait for a response from a
  489. // request. The default
  490. // deadline for gRPC is infinite (no deadline) and HTTP requests is 5
  491. // seconds.
  492. Deadline float64 `json:"deadline,omitempty"`
  493. // MinDeadline: Minimum deadline in seconds needed for this method.
  494. // Calls having deadline
  495. // value lower than this will be rejected.
  496. MinDeadline float64 `json:"minDeadline,omitempty"`
  497. // Selector: Selects the methods to which this rule applies.
  498. //
  499. // Refer to selector for syntax details.
  500. Selector string `json:"selector,omitempty"`
  501. // ForceSendFields is a list of field names (e.g. "Address") to
  502. // unconditionally include in API requests. By default, fields with
  503. // empty values are omitted from API requests. However, any non-pointer,
  504. // non-interface field appearing in ForceSendFields will be sent to the
  505. // server regardless of whether the field is empty or not. This may be
  506. // used to include empty fields in Patch requests.
  507. ForceSendFields []string `json:"-"`
  508. // NullFields is a list of field names (e.g. "Address") to include in
  509. // API requests with the JSON null value. By default, fields with empty
  510. // values are omitted from API requests. However, any field with an
  511. // empty value appearing in NullFields will be sent to the server as
  512. // null. It is an error if a field in this list has a non-empty value.
  513. // This may be used to include null fields in Patch requests.
  514. NullFields []string `json:"-"`
  515. }
  516. func (s *BackendRule) MarshalJSON() ([]byte, error) {
  517. type NoMethod BackendRule
  518. raw := NoMethod(*s)
  519. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  520. }
  521. func (s *BackendRule) UnmarshalJSON(data []byte) error {
  522. type NoMethod BackendRule
  523. var s1 struct {
  524. Deadline gensupport.JSONFloat64 `json:"deadline"`
  525. MinDeadline gensupport.JSONFloat64 `json:"minDeadline"`
  526. *NoMethod
  527. }
  528. s1.NoMethod = (*NoMethod)(s)
  529. if err := json.Unmarshal(data, &s1); err != nil {
  530. return err
  531. }
  532. s.Deadline = float64(s1.Deadline)
  533. s.MinDeadline = float64(s1.MinDeadline)
  534. return nil
  535. }
  536. // Billing: Billing related configuration of the service.
  537. //
  538. // The following example shows how to configure monitored resources and
  539. // metrics
  540. // for billing:
  541. //
  542. // monitored_resources:
  543. // - type: library.googleapis.com/branch
  544. // labels:
  545. // - key: /city
  546. // description: The city where the library branch is located
  547. // in.
  548. // - key: /name
  549. // description: The name of the branch.
  550. // metrics:
  551. // - name: library.googleapis.com/book/borrowed_count
  552. // metric_kind: DELTA
  553. // value_type: INT64
  554. // billing:
  555. // consumer_destinations:
  556. // - monitored_resource: library.googleapis.com/branch
  557. // metrics:
  558. // - library.googleapis.com/book/borrowed_count
  559. type Billing struct {
  560. // ConsumerDestinations: Billing configurations for sending metrics to
  561. // the consumer project.
  562. // There can be multiple consumer destinations per service, each one
  563. // must have
  564. // a different monitored resource type. A metric can be used in at
  565. // most
  566. // one consumer destination.
  567. ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"`
  568. // ForceSendFields is a list of field names (e.g.
  569. // "ConsumerDestinations") to unconditionally include in API requests.
  570. // By default, fields with empty values are omitted from API requests.
  571. // However, any non-pointer, non-interface field appearing in
  572. // ForceSendFields will be sent to the server regardless of whether the
  573. // field is empty or not. This may be used to include empty fields in
  574. // Patch requests.
  575. ForceSendFields []string `json:"-"`
  576. // NullFields is a list of field names (e.g. "ConsumerDestinations") to
  577. // include in API requests with the JSON null value. By default, fields
  578. // with empty values are omitted from API requests. However, any field
  579. // with an empty value appearing in NullFields will be sent to the
  580. // server as null. It is an error if a field in this list has a
  581. // non-empty value. This may be used to include null fields in Patch
  582. // requests.
  583. NullFields []string `json:"-"`
  584. }
  585. func (s *Billing) MarshalJSON() ([]byte, error) {
  586. type NoMethod Billing
  587. raw := NoMethod(*s)
  588. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  589. }
  590. // BillingDestination: Configuration of a specific billing destination
  591. // (Currently only support
  592. // bill against consumer project).
  593. type BillingDestination struct {
  594. // Metrics: Names of the metrics to report to this billing
  595. // destination.
  596. // Each name must be defined in Service.metrics section.
  597. Metrics []string `json:"metrics,omitempty"`
  598. // MonitoredResource: The monitored resource type. The type must be
  599. // defined in
  600. // Service.monitored_resources section.
  601. MonitoredResource string `json:"monitoredResource,omitempty"`
  602. // ForceSendFields is a list of field names (e.g. "Metrics") to
  603. // unconditionally include in API requests. By default, fields with
  604. // empty values are omitted from API requests. However, any non-pointer,
  605. // non-interface field appearing in ForceSendFields will be sent to the
  606. // server regardless of whether the field is empty or not. This may be
  607. // used to include empty fields in Patch requests.
  608. ForceSendFields []string `json:"-"`
  609. // NullFields is a list of field names (e.g. "Metrics") to include in
  610. // API requests with the JSON null value. By default, fields with empty
  611. // values are omitted from API requests. However, any field with an
  612. // empty value appearing in NullFields will be sent to the server as
  613. // null. It is an error if a field in this list has a non-empty value.
  614. // This may be used to include null fields in Patch requests.
  615. NullFields []string `json:"-"`
  616. }
  617. func (s *BillingDestination) MarshalJSON() ([]byte, error) {
  618. type NoMethod BillingDestination
  619. raw := NoMethod(*s)
  620. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  621. }
  622. // Context: `Context` defines which contexts an API
  623. // requests.
  624. //
  625. // Example:
  626. //
  627. // context:
  628. // rules:
  629. // - selector: "*"
  630. // requested:
  631. // - google.rpc.context.ProjectContext
  632. // - google.rpc.context.OriginContext
  633. //
  634. // The above specifies that all methods in the API
  635. // request
  636. // `google.rpc.context.ProjectContext`
  637. // and
  638. // `google.rpc.context.OriginContext`.
  639. //
  640. // Available context types are defined in
  641. // package
  642. // `google.rpc.context`.
  643. //
  644. // This also provides mechanism to whitelist any protobuf message
  645. // extension that
  646. // can be sent in grpc metadata using
  647. // “x-goog-ext-<extension_id>-bin”
  648. // and
  649. // “x-goog-ext-<extension_id>-jspb” format. For example, list any
  650. // service
  651. // specific protobuf types that can appear in grpc metadata as follows
  652. // in your
  653. // yaml file:
  654. //
  655. // Example:
  656. //
  657. // context:
  658. // rules:
  659. // - selector:
  660. // "google.example.library.v1.LibraryService.CreateBook"
  661. // allowed_request_extensions:
  662. // - google.foo.v1.NewExtension
  663. // allowed_response_extensions:
  664. // - google.foo.v1.NewExtension
  665. //
  666. // You can also specify extension ID instead of fully qualified
  667. // extension name
  668. // here.
  669. type Context struct {
  670. // Rules: A list of RPC context rules that apply to individual API
  671. // methods.
  672. //
  673. // **NOTE:** All service configuration rules follow "last one wins"
  674. // order.
  675. Rules []*ContextRule `json:"rules,omitempty"`
  676. // ForceSendFields is a list of field names (e.g. "Rules") to
  677. // unconditionally include in API requests. By default, fields with
  678. // empty values are omitted from API requests. However, any non-pointer,
  679. // non-interface field appearing in ForceSendFields will be sent to the
  680. // server regardless of whether the field is empty or not. This may be
  681. // used to include empty fields in Patch requests.
  682. ForceSendFields []string `json:"-"`
  683. // NullFields is a list of field names (e.g. "Rules") to include in API
  684. // requests with the JSON null value. By default, fields with empty
  685. // values are omitted from API requests. However, any field with an
  686. // empty value appearing in NullFields will be sent to the server as
  687. // null. It is an error if a field in this list has a non-empty value.
  688. // This may be used to include null fields in Patch requests.
  689. NullFields []string `json:"-"`
  690. }
  691. func (s *Context) MarshalJSON() ([]byte, error) {
  692. type NoMethod Context
  693. raw := NoMethod(*s)
  694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  695. }
  696. // ContextRule: A context rule provides information about the context
  697. // for an individual API
  698. // element.
  699. type ContextRule struct {
  700. // AllowedRequestExtensions: A list of full type names or extension IDs
  701. // of extensions allowed in grpc
  702. // side channel from client to backend.
  703. AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"`
  704. // AllowedResponseExtensions: A list of full type names or extension IDs
  705. // of extensions allowed in grpc
  706. // side channel from backend to client.
  707. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"`
  708. // Provided: A list of full type names of provided contexts.
  709. Provided []string `json:"provided,omitempty"`
  710. // Requested: A list of full type names of requested contexts.
  711. Requested []string `json:"requested,omitempty"`
  712. // Selector: Selects the methods to which this rule applies.
  713. //
  714. // Refer to selector for syntax details.
  715. Selector string `json:"selector,omitempty"`
  716. // ForceSendFields is a list of field names (e.g.
  717. // "AllowedRequestExtensions") to unconditionally include in API
  718. // requests. By default, fields with empty values are omitted from API
  719. // requests. However, any non-pointer, non-interface field appearing in
  720. // ForceSendFields will be sent to the server regardless of whether the
  721. // field is empty or not. This may be used to include empty fields in
  722. // Patch requests.
  723. ForceSendFields []string `json:"-"`
  724. // NullFields is a list of field names (e.g. "AllowedRequestExtensions")
  725. // to include in API requests with the JSON null value. By default,
  726. // fields with empty values are omitted from API requests. However, any
  727. // field with an empty value appearing in NullFields will be sent to the
  728. // server as null. It is an error if a field in this list has a
  729. // non-empty value. This may be used to include null fields in Patch
  730. // requests.
  731. NullFields []string `json:"-"`
  732. }
  733. func (s *ContextRule) MarshalJSON() ([]byte, error) {
  734. type NoMethod ContextRule
  735. raw := NoMethod(*s)
  736. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  737. }
  738. // Control: Selects and configures the service controller used by the
  739. // service. The
  740. // service controller handles features like abuse, quota, billing,
  741. // logging,
  742. // monitoring, etc.
  743. type Control struct {
  744. // Environment: The service control environment to use. If empty, no
  745. // control plane
  746. // feature (like quota and billing) will be enabled.
  747. Environment string `json:"environment,omitempty"`
  748. // ForceSendFields is a list of field names (e.g. "Environment") to
  749. // unconditionally include in API requests. By default, fields with
  750. // empty values are omitted from API requests. However, any non-pointer,
  751. // non-interface field appearing in ForceSendFields will be sent to the
  752. // server regardless of whether the field is empty or not. This may be
  753. // used to include empty fields in Patch requests.
  754. ForceSendFields []string `json:"-"`
  755. // NullFields is a list of field names (e.g. "Environment") to include
  756. // in API requests with the JSON null value. By default, fields with
  757. // empty values are omitted from API requests. However, any field with
  758. // an empty value appearing in NullFields will be sent to the server as
  759. // null. It is an error if a field in this list has a non-empty value.
  760. // This may be used to include null fields in Patch requests.
  761. NullFields []string `json:"-"`
  762. }
  763. func (s *Control) MarshalJSON() ([]byte, error) {
  764. type NoMethod Control
  765. raw := NoMethod(*s)
  766. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  767. }
  768. // CustomError: Customize service error responses. For example, list
  769. // any service
  770. // specific protobuf types that can appear in error detail lists
  771. // of
  772. // error responses.
  773. //
  774. // Example:
  775. //
  776. // custom_error:
  777. // types:
  778. // - google.foo.v1.CustomError
  779. // - google.foo.v1.AnotherError
  780. type CustomError struct {
  781. // Rules: The list of custom error rules that apply to individual API
  782. // messages.
  783. //
  784. // **NOTE:** All service configuration rules follow "last one wins"
  785. // order.
  786. Rules []*CustomErrorRule `json:"rules,omitempty"`
  787. // Types: The list of custom error detail types, e.g.
  788. // 'google.foo.v1.CustomError'.
  789. Types []string `json:"types,omitempty"`
  790. // ForceSendFields is a list of field names (e.g. "Rules") to
  791. // unconditionally include in API requests. By default, fields with
  792. // empty values are omitted from API requests. However, any non-pointer,
  793. // non-interface field appearing in ForceSendFields will be sent to the
  794. // server regardless of whether the field is empty or not. This may be
  795. // used to include empty fields in Patch requests.
  796. ForceSendFields []string `json:"-"`
  797. // NullFields is a list of field names (e.g. "Rules") to include in API
  798. // requests with the JSON null value. By default, fields with empty
  799. // values are omitted from API requests. However, any field with an
  800. // empty value appearing in NullFields will be sent to the server as
  801. // null. It is an error if a field in this list has a non-empty value.
  802. // This may be used to include null fields in Patch requests.
  803. NullFields []string `json:"-"`
  804. }
  805. func (s *CustomError) MarshalJSON() ([]byte, error) {
  806. type NoMethod CustomError
  807. raw := NoMethod(*s)
  808. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  809. }
  810. // CustomErrorRule: A custom error rule.
  811. type CustomErrorRule struct {
  812. // IsErrorType: Mark this message as possible payload in error response.
  813. // Otherwise,
  814. // objects of this type will be filtered when they appear in error
  815. // payload.
  816. IsErrorType bool `json:"isErrorType,omitempty"`
  817. // Selector: Selects messages to which this rule applies.
  818. //
  819. // Refer to selector for syntax details.
  820. Selector string `json:"selector,omitempty"`
  821. // ForceSendFields is a list of field names (e.g. "IsErrorType") to
  822. // unconditionally include in API requests. By default, fields with
  823. // empty values are omitted from API requests. However, any non-pointer,
  824. // non-interface field appearing in ForceSendFields will be sent to the
  825. // server regardless of whether the field is empty or not. This may be
  826. // used to include empty fields in Patch requests.
  827. ForceSendFields []string `json:"-"`
  828. // NullFields is a list of field names (e.g. "IsErrorType") to include
  829. // in API requests with the JSON null value. By default, fields with
  830. // empty values are omitted from API requests. However, any field with
  831. // an empty value appearing in NullFields will be sent to the server as
  832. // null. It is an error if a field in this list has a non-empty value.
  833. // This may be used to include null fields in Patch requests.
  834. NullFields []string `json:"-"`
  835. }
  836. func (s *CustomErrorRule) MarshalJSON() ([]byte, error) {
  837. type NoMethod CustomErrorRule
  838. raw := NoMethod(*s)
  839. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  840. }
  841. // CustomHttpPattern: A custom pattern is used for defining custom HTTP
  842. // verb.
  843. type CustomHttpPattern struct {
  844. // Kind: The name of this custom HTTP verb.
  845. Kind string `json:"kind,omitempty"`
  846. // Path: The path matched by this custom verb.
  847. Path string `json:"path,omitempty"`
  848. // ForceSendFields is a list of field names (e.g. "Kind") to
  849. // unconditionally include in API requests. By default, fields with
  850. // empty values are omitted from API requests. However, any non-pointer,
  851. // non-interface field appearing in ForceSendFields will be sent to the
  852. // server regardless of whether the field is empty or not. This may be
  853. // used to include empty fields in Patch requests.
  854. ForceSendFields []string `json:"-"`
  855. // NullFields is a list of field names (e.g. "Kind") to include in API
  856. // requests with the JSON null value. By default, fields with empty
  857. // values are omitted from API requests. However, any field with an
  858. // empty value appearing in NullFields will be sent to the server as
  859. // null. It is an error if a field in this list has a non-empty value.
  860. // This may be used to include null fields in Patch requests.
  861. NullFields []string `json:"-"`
  862. }
  863. func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) {
  864. type NoMethod CustomHttpPattern
  865. raw := NoMethod(*s)
  866. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  867. }
  868. // DisableServiceRequest: Request message for DisableService method.
  869. type DisableServiceRequest struct {
  870. }
  871. // Documentation: `Documentation` provides the information for
  872. // describing a service.
  873. //
  874. // Example:
  875. // <pre><code>documentation:
  876. // summary: >
  877. // The Google Calendar API gives access
  878. // to most calendar features.
  879. // pages:
  880. // - name: Overview
  881. // content: &#40;== include google/foo/overview.md ==&#41;
  882. // - name: Tutorial
  883. // content: &#40;== include google/foo/tutorial.md ==&#41;
  884. // subpages;
  885. // - name: Java
  886. // content: &#40;== include google/foo/tutorial_java.md ==&#41;
  887. // rules:
  888. // - selector: google.calendar.Calendar.Get
  889. // description: >
  890. // ...
  891. // - selector: google.calendar.Calendar.Put
  892. // description: >
  893. // ...
  894. // </code></pre>
  895. // Documentation is provided in markdown syntax. In addition to
  896. // standard markdown features, definition lists, tables and fenced
  897. // code blocks are supported. Section headers can be provided and
  898. // are
  899. // interpreted relative to the section nesting of the context where
  900. // a documentation fragment is embedded.
  901. //
  902. // Documentation from the IDL is merged with documentation defined
  903. // via the config at normalization time, where documentation provided
  904. // by config rules overrides IDL provided.
  905. //
  906. // A number of constructs specific to the API platform are supported
  907. // in documentation text.
  908. //
  909. // In order to reference a proto element, the following
  910. // notation can be
  911. // used:
  912. // <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
  913. // T
  914. // o override the display text used for the link, this can be
  915. // used:
  916. // <pre><code>&#91;display
  917. // text]&#91;fully.qualified.proto.name]</code></pre>
  918. // Text can be excluded from doc using the following
  919. // notation:
  920. // <pre><code>&#40;-- internal comment --&#41;</code></pre>
  921. //
  922. // A few directives are available in documentation. Note that
  923. // directives must appear on a single line to be properly
  924. // identified. The `include` directive includes a markdown file from
  925. // an external source:
  926. // <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
  927. // The `resource_for` directive marks a message to be the resource of
  928. // a collection in REST view. If it is not specified, tools attempt
  929. // to infer the resource from the operations in a
  930. // collection:
  931. // <pre><code>&#40;== resource_for v1.shelves.books
  932. // ==&#41;</code></pre>
  933. // The directive `suppress_warning` does not directly affect
  934. // documentation
  935. // and is documented together with service config validation.
  936. type Documentation struct {
  937. // DocumentationRootUrl: The URL to the root of documentation.
  938. DocumentationRootUrl string `json:"documentationRootUrl,omitempty"`
  939. // Overview: Declares a single overview page. For
  940. // example:
  941. // <pre><code>documentation:
  942. // summary: ...
  943. // overview: &#40;== include overview.md ==&#41;
  944. // </code></pre>
  945. // This is a shortcut for the following declaration (using pages
  946. // style):
  947. // <pre><code>documentation:
  948. // summary: ...
  949. // pages:
  950. // - name: Overview
  951. // content: &#40;== include overview.md ==&#41;
  952. // </code></pre>
  953. // Note: you cannot specify both `overview` field and `pages` field.
  954. Overview string `json:"overview,omitempty"`
  955. // Pages: The top level pages for the documentation set.
  956. Pages []*Page `json:"pages,omitempty"`
  957. // Rules: A list of documentation rules that apply to individual API
  958. // elements.
  959. //
  960. // **NOTE:** All service configuration rules follow "last one wins"
  961. // order.
  962. Rules []*DocumentationRule `json:"rules,omitempty"`
  963. // Summary: A short summary of what the service does. Can only be
  964. // provided by
  965. // plain text.
  966. Summary string `json:"summary,omitempty"`
  967. // ForceSendFields is a list of field names (e.g.
  968. // "DocumentationRootUrl") to unconditionally include in API requests.
  969. // By default, fields with empty values are omitted from API requests.
  970. // However, any non-pointer, non-interface field appearing in
  971. // ForceSendFields will be sent to the server regardless of whether the
  972. // field is empty or not. This may be used to include empty fields in
  973. // Patch requests.
  974. ForceSendFields []string `json:"-"`
  975. // NullFields is a list of field names (e.g. "DocumentationRootUrl") to
  976. // include in API requests with the JSON null value. By default, fields
  977. // with empty values are omitted from API requests. However, any field
  978. // with an empty value appearing in NullFields will be sent to the
  979. // server as null. It is an error if a field in this list has a
  980. // non-empty value. This may be used to include null fields in Patch
  981. // requests.
  982. NullFields []string `json:"-"`
  983. }
  984. func (s *Documentation) MarshalJSON() ([]byte, error) {
  985. type NoMethod Documentation
  986. raw := NoMethod(*s)
  987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  988. }
  989. // DocumentationRule: A documentation rule provides information about
  990. // individual API elements.
  991. type DocumentationRule struct {
  992. // DeprecationDescription: Deprecation description of the selected
  993. // element(s). It can be provided if an
  994. // element is marked as `deprecated`.
  995. DeprecationDescription string `json:"deprecationDescription,omitempty"`
  996. // Description: Description of the selected API(s).
  997. Description string `json:"description,omitempty"`
  998. // Selector: The selector is a comma-separated list of patterns. Each
  999. // pattern is a
  1000. // qualified name of the element which may end in "*", indicating a
  1001. // wildcard.
  1002. // Wildcards are only allowed at the end and for a whole component of
  1003. // the
  1004. // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar".
  1005. // To
  1006. // specify a default for all applicable elements, the whole pattern
  1007. // "*"
  1008. // is used.
  1009. Selector string `json:"selector,omitempty"`
  1010. // ForceSendFields is a list of field names (e.g.
  1011. // "DeprecationDescription") to unconditionally include in API requests.
  1012. // By default, fields with empty values are omitted from API requests.
  1013. // However, any non-pointer, non-interface field appearing in
  1014. // ForceSendFields will be sent to the server regardless of whether the
  1015. // field is empty or not. This may be used to include empty fields in
  1016. // Patch requests.
  1017. ForceSendFields []string `json:"-"`
  1018. // NullFields is a list of field names (e.g. "DeprecationDescription")
  1019. // to include in API requests with the JSON null value. By default,
  1020. // fields with empty values are omitted from API requests. However, any
  1021. // field with an empty value appearing in NullFields will be sent to the
  1022. // server as null. It is an error if a field in this list has a
  1023. // non-empty value. This may be used to include null fields in Patch
  1024. // requests.
  1025. NullFields []string `json:"-"`
  1026. }
  1027. func (s *DocumentationRule) MarshalJSON() ([]byte, error) {
  1028. type NoMethod DocumentationRule
  1029. raw := NoMethod(*s)
  1030. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1031. }
  1032. // EnableServiceRequest: Request message for EnableService method.
  1033. type EnableServiceRequest struct {
  1034. }
  1035. // Endpoint: `Endpoint` describes a network endpoint that serves a set
  1036. // of APIs.
  1037. // A service may expose any number of endpoints, and all endpoints share
  1038. // the
  1039. // same service configuration, such as quota configuration and
  1040. // monitoring
  1041. // configuration.
  1042. //
  1043. // Example service configuration:
  1044. //
  1045. // name: library-example.googleapis.com
  1046. // endpoints:
  1047. // # Below entry makes 'google.example.library.v1.Library'
  1048. // # API be served from endpoint address
  1049. // library-example.googleapis.com.
  1050. // # It also allows HTTP OPTIONS calls to be passed to the
  1051. // backend, for
  1052. // # it to decide whether the subsequent cross-origin request is
  1053. // # allowed to proceed.
  1054. // - name: library-example.googleapis.com
  1055. // allow_cors: true
  1056. type Endpoint struct {
  1057. // Aliases: DEPRECATED: This field is no longer supported. Instead of
  1058. // using aliases,
  1059. // please specify multiple google.api.Endpoint for each of the
  1060. // intended
  1061. // aliases.
  1062. //
  1063. // Additional names that this endpoint will be hosted on.
  1064. Aliases []string `json:"aliases,omitempty"`
  1065. // AllowCors:
  1066. // Allowing
  1067. // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sh
  1068. // aring), aka
  1069. // cross-domain traffic, would allow the backends served from this
  1070. // endpoint to
  1071. // receive and respond to HTTP OPTIONS requests. The response will be
  1072. // used by
  1073. // the browser to determine whether the subsequent cross-origin request
  1074. // is
  1075. // allowed to proceed.
  1076. AllowCors bool `json:"allowCors,omitempty"`
  1077. // Features: The list of features enabled on this endpoint.
  1078. Features []string `json:"features,omitempty"`
  1079. // Name: The canonical name of this endpoint.
  1080. Name string `json:"name,omitempty"`
  1081. // Target: The specification of an Internet routable address of API
  1082. // frontend that will
  1083. // handle requests to this [API
  1084. // Endpoint](https://cloud.google.com/apis/design/glossary).
  1085. // It should be either a valid IPv4 address or a fully-qualified domain
  1086. // name.
  1087. // For example, "8.8.8.8" or "myservice.appspot.com".
  1088. Target string `json:"target,omitempty"`
  1089. // ForceSendFields is a list of field names (e.g. "Aliases") to
  1090. // unconditionally include in API requests. By default, fields with
  1091. // empty values are omitted from API requests. However, any non-pointer,
  1092. // non-interface field appearing in ForceSendFields will be sent to the
  1093. // server regardless of whether the field is empty or not. This may be
  1094. // used to include empty fields in Patch requests.
  1095. ForceSendFields []string `json:"-"`
  1096. // NullFields is a list of field names (e.g. "Aliases") to include in
  1097. // API requests with the JSON null value. By default, fields with empty
  1098. // values are omitted from API requests. However, any field with an
  1099. // empty value appearing in NullFields will be sent to the server as
  1100. // null. It is an error if a field in this list has a non-empty value.
  1101. // This may be used to include null fields in Patch requests.
  1102. NullFields []string `json:"-"`
  1103. }
  1104. func (s *Endpoint) MarshalJSON() ([]byte, error) {
  1105. type NoMethod Endpoint
  1106. raw := NoMethod(*s)
  1107. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1108. }
  1109. // Enum: Enum type definition.
  1110. type Enum struct {
  1111. // Enumvalue: Enum value definitions.
  1112. Enumvalue []*EnumValue `json:"enumvalue,omitempty"`
  1113. // Name: Enum type name.
  1114. Name string `json:"name,omitempty"`
  1115. // Options: Protocol buffer options.
  1116. Options []*Option `json:"options,omitempty"`
  1117. // SourceContext: The source context.
  1118. SourceContext *SourceContext `json:"sourceContext,omitempty"`
  1119. // Syntax: The source syntax.
  1120. //
  1121. // Possible values:
  1122. // "SYNTAX_PROTO2" - Syntax `proto2`.
  1123. // "SYNTAX_PROTO3" - Syntax `proto3`.
  1124. Syntax string `json:"syntax,omitempty"`
  1125. // ForceSendFields is a list of field names (e.g. "Enumvalue") to
  1126. // unconditionally include in API requests. By default, fields with
  1127. // empty values are omitted from API requests. However, any non-pointer,
  1128. // non-interface field appearing in ForceSendFields will be sent to the
  1129. // server regardless of whether the field is empty or not. This may be
  1130. // used to include empty fields in Patch requests.
  1131. ForceSendFields []string `json:"-"`
  1132. // NullFields is a list of field names (e.g. "Enumvalue") to include in
  1133. // API requests with the JSON null value. By default, fields with empty
  1134. // values are omitted from API requests. However, any field with an
  1135. // empty value appearing in NullFields will be sent to the server as
  1136. // null. It is an error if a field in this list has a non-empty value.
  1137. // This may be used to include null fields in Patch requests.
  1138. NullFields []string `json:"-"`
  1139. }
  1140. func (s *Enum) MarshalJSON() ([]byte, error) {
  1141. type NoMethod Enum
  1142. raw := NoMethod(*s)
  1143. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1144. }
  1145. // EnumValue: Enum value definition.
  1146. type EnumValue struct {
  1147. // Name: Enum value name.
  1148. Name string `json:"name,omitempty"`
  1149. // Number: Enum value number.
  1150. Number int64 `json:"number,omitempty"`
  1151. // Options: Protocol buffer options.
  1152. Options []*Option `json:"options,omitempty"`
  1153. // ForceSendFields is a list of field names (e.g. "Name") to
  1154. // unconditionally include in API requests. By default, fields with
  1155. // empty values are omitted from API requests. However, any non-pointer,
  1156. // non-interface field appearing in ForceSendFields will be sent to the
  1157. // server regardless of whether the field is empty or not. This may be
  1158. // used to include empty fields in Patch requests.
  1159. ForceSendFields []string `json:"-"`
  1160. // NullFields is a list of field names (e.g. "Name") to include in API
  1161. // requests with the JSON null value. By default, fields with empty
  1162. // values are omitted from API requests. However, any field with an
  1163. // empty value appearing in NullFields will be sent to the server as
  1164. // null. It is an error if a field in this list has a non-empty value.
  1165. // This may be used to include null fields in Patch requests.
  1166. NullFields []string `json:"-"`
  1167. }
  1168. func (s *EnumValue) MarshalJSON() ([]byte, error) {
  1169. type NoMethod EnumValue
  1170. raw := NoMethod(*s)
  1171. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1172. }
  1173. // Experimental: Experimental service configuration. These configuration
  1174. // options can
  1175. // only be used by whitelisted users.
  1176. type Experimental struct {
  1177. // Authorization: Authorization configuration.
  1178. Authorization *AuthorizationConfig `json:"authorization,omitempty"`
  1179. // ForceSendFields is a list of field names (e.g. "Authorization") to
  1180. // unconditionally include in API requests. By default, fields with
  1181. // empty values are omitted from API requests. However, any non-pointer,
  1182. // non-interface field appearing in ForceSendFields will be sent to the
  1183. // server regardless of whether the field is empty or not. This may be
  1184. // used to include empty fields in Patch requests.
  1185. ForceSendFields []string `json:"-"`
  1186. // NullFields is a list of field names (e.g. "Authorization") to include
  1187. // in API requests with the JSON null value. By default, fields with
  1188. // empty values are omitted from API requests. However, any field with
  1189. // an empty value appearing in NullFields will be sent to the server as
  1190. // null. It is an error if a field in this list has a non-empty value.
  1191. // This may be used to include null fields in Patch requests.
  1192. NullFields []string `json:"-"`
  1193. }
  1194. func (s *Experimental) MarshalJSON() ([]byte, error) {
  1195. type NoMethod Experimental
  1196. raw := NoMethod(*s)
  1197. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1198. }
  1199. // Field: A single field of a message type.
  1200. type Field struct {
  1201. // Cardinality: The field cardinality.
  1202. //
  1203. // Possible values:
  1204. // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality.
  1205. // "CARDINALITY_OPTIONAL" - For optional fields.
  1206. // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only.
  1207. // "CARDINALITY_REPEATED" - For repeated fields.
  1208. Cardinality string `json:"cardinality,omitempty"`
  1209. // DefaultValue: The string value of the default value of this field.
  1210. // Proto2 syntax only.
  1211. DefaultValue string `json:"defaultValue,omitempty"`
  1212. // JsonName: The field JSON name.
  1213. JsonName string `json:"jsonName,omitempty"`
  1214. // Kind: The field type.
  1215. //
  1216. // Possible values:
  1217. // "TYPE_UNKNOWN" - Field type unknown.
  1218. // "TYPE_DOUBLE" - Field type double.
  1219. // "TYPE_FLOAT" - Field type float.
  1220. // "TYPE_INT64" - Field type int64.
  1221. // "TYPE_UINT64" - Field type uint64.
  1222. // "TYPE_INT32" - Field type int32.
  1223. // "TYPE_FIXED64" - Field type fixed64.
  1224. // "TYPE_FIXED32" - Field type fixed32.
  1225. // "TYPE_BOOL" - Field type bool.
  1226. // "TYPE_STRING" - Field type string.
  1227. // "TYPE_GROUP" - Field type group. Proto2 syntax only, and
  1228. // deprecated.
  1229. // "TYPE_MESSAGE" - Field type message.
  1230. // "TYPE_BYTES" - Field type bytes.
  1231. // "TYPE_UINT32" - Field type uint32.
  1232. // "TYPE_ENUM" - Field type enum.
  1233. // "TYPE_SFIXED32" - Field type sfixed32.
  1234. // "TYPE_SFIXED64" - Field type sfixed64.
  1235. // "TYPE_SINT32" - Field type sint32.
  1236. // "TYPE_SINT64" - Field type sint64.
  1237. Kind string `json:"kind,omitempty"`
  1238. // Name: The field name.
  1239. Name string `json:"name,omitempty"`
  1240. // Number: The field number.
  1241. Number int64 `json:"number,omitempty"`
  1242. // OneofIndex: The index of the field type in `Type.oneofs`, for message
  1243. // or enumeration
  1244. // types. The first type has index 1; zero means the type is not in the
  1245. // list.
  1246. OneofIndex int64 `json:"oneofIndex,omitempty"`
  1247. // Options: The protocol buffer options.
  1248. Options []*Option `json:"options,omitempty"`
  1249. // Packed: Whether to use alternative packed wire representation.
  1250. Packed bool `json:"packed,omitempty"`
  1251. // TypeUrl: The field type URL, without the scheme, for message or
  1252. // enumeration
  1253. // types. Example: "type.googleapis.com/google.protobuf.Timestamp".
  1254. TypeUrl string `json:"typeUrl,omitempty"`
  1255. // ForceSendFields is a list of field names (e.g. "Cardinality") to
  1256. // unconditionally include in API requests. By default, fields with
  1257. // empty values are omitted from API requests. However, any non-pointer,
  1258. // non-interface field appearing in ForceSendFields will be sent to the
  1259. // server regardless of whether the field is empty or not. This may be
  1260. // used to include empty fields in Patch requests.
  1261. ForceSendFields []string `json:"-"`
  1262. // NullFields is a list of field names (e.g. "Cardinality") to include
  1263. // in API requests with the JSON null value. By default, fields with
  1264. // empty values are omitted from API requests. However, any field with
  1265. // an empty value appearing in NullFields will be sent to the server as
  1266. // null. It is an error if a field in this list has a non-empty value.
  1267. // This may be used to include null fields in Patch requests.
  1268. NullFields []string `json:"-"`
  1269. }
  1270. func (s *Field) MarshalJSON() ([]byte, error) {
  1271. type NoMethod Field
  1272. raw := NoMethod(*s)
  1273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1274. }
  1275. // Http: Defines the HTTP configuration for an API service. It contains
  1276. // a list of
  1277. // HttpRule, each specifying the mapping of an RPC method
  1278. // to one or more HTTP REST API methods.
  1279. type Http struct {
  1280. // FullyDecodeReservedExpansion: When set to true, URL path parmeters
  1281. // will be fully URI-decoded except in
  1282. // cases of single segment matches in reserved expansion, where "%2F"
  1283. // will be
  1284. // left encoded.
  1285. //
  1286. // The default behavior is to not decode RFC 6570 reserved characters in
  1287. // multi
  1288. // segment matches.
  1289. FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"`
  1290. // Rules: A list of HTTP configuration rules that apply to individual
  1291. // API methods.
  1292. //
  1293. // **NOTE:** All service configuration rules follow "last one wins"
  1294. // order.
  1295. Rules []*HttpRule `json:"rules,omitempty"`
  1296. // ForceSendFields is a list of field names (e.g.
  1297. // "FullyDecodeReservedExpansion") to unconditionally include in API
  1298. // requests. By default, fields with empty values are omitted from API
  1299. // requests. However, any non-pointer, non-interface field appearing in
  1300. // ForceSendFields will be sent to the server regardless of whether the
  1301. // field is empty or not. This may be used to include empty fields in
  1302. // Patch requests.
  1303. ForceSendFields []string `json:"-"`
  1304. // NullFields is a list of field names (e.g.
  1305. // "FullyDecodeReservedExpansion") to include in API requests with the
  1306. // JSON null value. By default, fields with empty values are omitted
  1307. // from API requests. However, any field with an empty value appearing
  1308. // in NullFields will be sent to the server as null. It is an error if a
  1309. // field in this list has a non-empty value. This may be used to include
  1310. // null fields in Patch requests.
  1311. NullFields []string `json:"-"`
  1312. }
  1313. func (s *Http) MarshalJSON() ([]byte, error) {
  1314. type NoMethod Http
  1315. raw := NoMethod(*s)
  1316. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1317. }
  1318. // HttpRule: # gRPC Transcoding
  1319. //
  1320. // gRPC Transcoding is a feature for mapping between a gRPC method and
  1321. // one or
  1322. // more HTTP REST endpoints. It allows developers to build a single API
  1323. // service
  1324. // that supports both gRPC APIs and REST APIs. Many systems, including
  1325. // [Google
  1326. // APIs](https://github.com/googleapis/googleapis),
  1327. // [Cloud Endpoints](https://cloud.google.com/endpoints),
  1328. // [gRPC
  1329. // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
  1330. // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this
  1331. // feature
  1332. // and use it for large scale production services.
  1333. //
  1334. // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping
  1335. // specifies
  1336. // how different portions of the gRPC request message are mapped to the
  1337. // URL
  1338. // path, URL query parameters, and HTTP request body. It also controls
  1339. // how the
  1340. // gRPC response message is mapped to the HTTP response body. `HttpRule`
  1341. // is
  1342. // typically specified as an `google.api.http` annotation on the gRPC
  1343. // method.
  1344. //
  1345. // Each mapping specifies a URL path template and an HTTP method. The
  1346. // path
  1347. // template may refer to one or more fields in the gRPC request message,
  1348. // as long
  1349. // as each field is a non-repeated field with a primitive (non-message)
  1350. // type.
  1351. // The path template controls how fields of the request message are
  1352. // mapped to
  1353. // the URL path.
  1354. //
  1355. // Example:
  1356. //
  1357. // service Messaging {
  1358. // rpc GetMessage(GetMessageRequest) returns (Message) {
  1359. // option (google.api.http) = {
  1360. // get: "/v1/{name=messages/*}"
  1361. // };
  1362. // }
  1363. // }
  1364. // message GetMessageRequest {
  1365. // string name = 1; // Mapped to URL path.
  1366. // }
  1367. // message Message {
  1368. // string text = 1; // The resource content.
  1369. // }
  1370. //
  1371. // This enables an HTTP REST to gRPC mapping as below:
  1372. //
  1373. // HTTP | gRPC
  1374. // -----|-----
  1375. // `GET /v1/messages/123456` | `GetMessage(name:
  1376. // "messages/123456")`
  1377. //
  1378. // Any fields in the request message which are not bound by the path
  1379. // template
  1380. // automatically become HTTP query parameters if there is no HTTP
  1381. // request body.
  1382. // For example:
  1383. //
  1384. // service Messaging {
  1385. // rpc GetMessage(GetMessageRequest) returns (Message) {
  1386. // option (google.api.http) = {
  1387. // get:"/v1/messages/{message_id}"
  1388. // };
  1389. // }
  1390. // }
  1391. // message GetMessageRequest {
  1392. // message SubMessage {
  1393. // string subfield = 1;
  1394. // }
  1395. // string message_id = 1; // Mapped to URL path.
  1396. // int64 revision = 2; // Mapped to URL query parameter
  1397. // `revision`.
  1398. // SubMessage sub = 3; // Mapped to URL query parameter
  1399. // `sub.subfield`.
  1400. // }
  1401. //
  1402. // This enables a HTTP JSON to RPC mapping as below:
  1403. //
  1404. // HTTP | gRPC
  1405. // -----|-----
  1406. // `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
  1407. // `GetMessage(message_id: "123456" revision: 2 sub:
  1408. // SubMessage(subfield: "foo"))`
  1409. //
  1410. // Note that fields which are mapped to URL query parameters must have
  1411. // a
  1412. // primitive type or a repeated primitive type or a non-repeated message
  1413. // type.
  1414. // In the case of a repeated type, the parameter can be repeated in the
  1415. // URL
  1416. // as `...?param=A&param=B`. In the case of a message type, each field
  1417. // of the
  1418. // message is mapped to a separate parameter, such
  1419. // as
  1420. // `...?foo.a=A&foo.b=B&foo.c=C`.
  1421. //
  1422. // For HTTP methods that allow a request body, the `body`
  1423. // field
  1424. // specifies the mapping. Consider a REST update method on the
  1425. // message resource collection:
  1426. //
  1427. // service Messaging {
  1428. // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
  1429. // option (google.api.http) = {
  1430. // patch: "/v1/messages/{message_id}"
  1431. // body: "message"
  1432. // };
  1433. // }
  1434. // }
  1435. // message UpdateMessageRequest {
  1436. // string message_id = 1; // mapped to the URL
  1437. // Message message = 2; // mapped to the body
  1438. // }
  1439. //
  1440. // The following HTTP JSON to RPC mapping is enabled, where
  1441. // the
  1442. // representation of the JSON in the request body is determined
  1443. // by
  1444. // protos JSON encoding:
  1445. //
  1446. // HTTP | gRPC
  1447. // -----|-----
  1448. // `PATCH /v1/messages/123456 { "text": "Hi!" }` |
  1449. // `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
  1450. //
  1451. // The special name `*` can be used in the body mapping to define
  1452. // that
  1453. // every field not bound by the path template should be mapped to
  1454. // the
  1455. // request body. This enables the following alternative definition
  1456. // of
  1457. // the update method:
  1458. //
  1459. // service Messaging {
  1460. // rpc UpdateMessage(Message) returns (Message) {
  1461. // option (google.api.http) = {
  1462. // patch: "/v1/messages/{message_id}"
  1463. // body: "*"
  1464. // };
  1465. // }
  1466. // }
  1467. // message Message {
  1468. // string message_id = 1;
  1469. // string text = 2;
  1470. // }
  1471. //
  1472. //
  1473. // The following HTTP JSON to RPC mapping is enabled:
  1474. //
  1475. // HTTP | gRPC
  1476. // -----|-----
  1477. // `PATCH /v1/messages/123456 { "text": "Hi!" }` |
  1478. // `UpdateMessage(message_id: "123456" text: "Hi!")`
  1479. //
  1480. // Note that when using `*` in the body mapping, it is not possible
  1481. // to
  1482. // have HTTP parameters, as all fields not bound by the path end in
  1483. // the body. This makes this option more rarely used in practice
  1484. // when
  1485. // defining REST APIs. The common usage of `*` is in custom
  1486. // methods
  1487. // which don't use the URL at all for transferring data.
  1488. //
  1489. // It is possible to define multiple HTTP methods for one RPC by
  1490. // using
  1491. // the `additional_bindings` option. Example:
  1492. //
  1493. // service Messaging {
  1494. // rpc GetMessage(GetMessageRequest) returns (Message) {
  1495. // option (google.api.http) = {
  1496. // get: "/v1/messages/{message_id}"
  1497. // additional_bindings {
  1498. // get: "/v1/users/{user_id}/messages/{message_id}"
  1499. // }
  1500. // };
  1501. // }
  1502. // }
  1503. // message GetMessageRequest {
  1504. // string message_id = 1;
  1505. // string user_id = 2;
  1506. // }
  1507. //
  1508. // This enables the following two alternative HTTP JSON to RPC
  1509. // mappings:
  1510. //
  1511. // HTTP | gRPC
  1512. // -----|-----
  1513. // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
  1514. // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me"
  1515. // message_id: "123456")`
  1516. //
  1517. // ## Rules for HTTP mapping
  1518. //
  1519. // 1. Leaf request fields (recursive expansion nested messages in the
  1520. // request
  1521. // message) are classified into three categories:
  1522. // - Fields referred by the path template. They are passed via the
  1523. // URL path.
  1524. // - Fields referred by the HttpRule.body. They are passed via the
  1525. // HTTP
  1526. // request body.
  1527. // - All other fields are passed via the URL query parameters, and
  1528. // the
  1529. // parameter name is the field path in the request message. A
  1530. // repeated
  1531. // field can be represented as multiple query parameters under the
  1532. // same
  1533. // name.
  1534. // 2. If HttpRule.body is "*", there is no URL query parameter, all
  1535. // fields
  1536. // are passed via URL path and HTTP request body.
  1537. // 3. If HttpRule.body is omitted, there is no HTTP request body, all
  1538. // fields are passed via URL path and URL query parameters.
  1539. //
  1540. // ### Path template syntax
  1541. //
  1542. // Template = "/" Segments [ Verb ] ;
  1543. // Segments = Segment { "/" Segment } ;
  1544. // Segment = "*" | "**" | LITERAL | Variable ;
  1545. // Variable = "{" FieldPath [ "=" Segments ] "}" ;
  1546. // FieldPath = IDENT { "." IDENT } ;
  1547. // Verb = ":" LITERAL ;
  1548. //
  1549. // The syntax `*` matches a single URL path segment. The syntax `**`
  1550. // matches
  1551. // zero or more URL path segments, which must be the last part of the
  1552. // URL path
  1553. // except the `Verb`.
  1554. //
  1555. // The syntax `Variable` matches part of the URL path as specified by
  1556. // its
  1557. // template. A variable template must not contain other variables. If a
  1558. // variable
  1559. // matches a single path segment, its template may be omitted, e.g.
  1560. // `{var}`
  1561. // is equivalent to `{var=*}`.
  1562. //
  1563. // The syntax `LITERAL` matches literal text in the URL path. If the
  1564. // `LITERAL`
  1565. // contains any reserved character, such characters should be
  1566. // percent-encoded
  1567. // before the matching.
  1568. //
  1569. // If a variable contains exactly one path segment, such as "{var}"
  1570. // or
  1571. // "{var=*}", when such a variable is expanded into a URL path on the
  1572. // client
  1573. // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded.
  1574. // The
  1575. // server side does the reverse decoding. Such variables show up in
  1576. // the
  1577. // [Discovery
  1578. // Document](https://developers.google.com/discovery/v1/reference/apis)
  1579. // a
  1580. // s `{var}`.
  1581. //
  1582. // If a variable contains multiple path segments, such as
  1583. // "{var=foo/*}"
  1584. // or "{var=**}", when such a variable is expanded into a URL path on
  1585. // the
  1586. // client side, all characters except `[-_.~/0-9a-zA-Z]` are
  1587. // percent-encoded.
  1588. // The server side does the reverse decoding, except "%2F" and "%2f" are
  1589. // left
  1590. // unchanged. Such variables show up in the
  1591. // [Discovery
  1592. // Document](https://developers.google.com/discovery/v1/reference/apis)
  1593. // a
  1594. // s `{+var}`.
  1595. //
  1596. // ## Using gRPC API Service Configuration
  1597. //
  1598. // gRPC API Service Configuration (service config) is a configuration
  1599. // language
  1600. // for configuring a gRPC service to become a user-facing product.
  1601. // The
  1602. // service config is simply the YAML representation of the
  1603. // `google.api.Service`
  1604. // proto message.
  1605. //
  1606. // As an alternative to annotating your proto file, you can configure
  1607. // gRPC
  1608. // transcoding in your service config YAML files. You do this by
  1609. // specifying a
  1610. // `HttpRule` that maps the gRPC method to a REST endpoint, achieving
  1611. // the same
  1612. // effect as the proto annotation. This can be particularly useful if
  1613. // you
  1614. // have a proto that is reused in multiple services. Note that any
  1615. // transcoding
  1616. // specified in the service config will override any matching
  1617. // transcoding
  1618. // configuration in the proto.
  1619. //
  1620. // Example:
  1621. //
  1622. // http:
  1623. // rules:
  1624. // # Selects a gRPC method and applies HttpRule to it.
  1625. // - selector: example.v1.Messaging.GetMessage
  1626. // get: /v1/messages/{message_id}/{sub.subfield}
  1627. //
  1628. // ## Special notes
  1629. //
  1630. // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints,
  1631. // the
  1632. // proto to JSON conversion must follow the
  1633. // [proto3
  1634. // specification](https://developers.google.com/protocol-buffers/
  1635. // docs/proto3#json).
  1636. //
  1637. // While the single segment variable follows the semantics of
  1638. // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple
  1639. // String
  1640. // Expansion, the multi segment variable **does not** follow RFC 6570
  1641. // Section
  1642. // 3.2.3 Reserved Expansion. The reason is that the Reserved
  1643. // Expansion
  1644. // does not expand special characters like `?` and `#`, which would
  1645. // lead
  1646. // to invalid URLs. As the result, gRPC Transcoding uses a custom
  1647. // encoding
  1648. // for multi segment variables.
  1649. //
  1650. // The path variables **must not** refer to any repeated or mapped
  1651. // field,
  1652. // because client libraries are not capable of handling such variable
  1653. // expansion.
  1654. //
  1655. // The path variables **must not** capture the leading "/" character.
  1656. // The reason
  1657. // is that the most common use case "{var}" does not capture the leading
  1658. // "/"
  1659. // character. For consistency, all path variables must share the same
  1660. // behavior.
  1661. //
  1662. // Repeated message fields must not be mapped to URL query parameters,
  1663. // because
  1664. // no client library can support such complicated mapping.
  1665. //
  1666. // If an API needs to use a JSON array for request or response body, it
  1667. // can map
  1668. // the request or response body to a repeated field. However, some
  1669. // gRPC
  1670. // Transcoding implementations may not support this feature.
  1671. type HttpRule struct {
  1672. // AdditionalBindings: Additional HTTP bindings for the selector. Nested
  1673. // bindings must
  1674. // not contain an `additional_bindings` field themselves (that is,
  1675. // the nesting may only be one level deep).
  1676. AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"`
  1677. // Body: The name of the request field whose value is mapped to the HTTP
  1678. // request
  1679. // body, or `*` for mapping all request fields not captured by the
  1680. // path
  1681. // pattern to the HTTP body, or omitted for not having any HTTP request
  1682. // body.
  1683. //
  1684. // NOTE: the referred field must be present at the top-level of the
  1685. // request
  1686. // message type.
  1687. Body string `json:"body,omitempty"`
  1688. // Custom: The custom pattern is used for specifying an HTTP method that
  1689. // is not
  1690. // included in the `pattern` field, such as HEAD, or "*" to leave
  1691. // the
  1692. // HTTP method unspecified for this rule. The wild-card rule is
  1693. // useful
  1694. // for services that provide content to Web (HTML) clients.
  1695. Custom *CustomHttpPattern `json:"custom,omitempty"`
  1696. // Delete: Maps to HTTP DELETE. Used for deleting a resource.
  1697. Delete string `json:"delete,omitempty"`
  1698. // Get: Maps to HTTP GET. Used for listing and getting information
  1699. // about
  1700. // resources.
  1701. Get string `json:"get,omitempty"`
  1702. // Patch: Maps to HTTP PATCH. Used for updating a resource.
  1703. Patch string `json:"patch,omitempty"`
  1704. // Post: Maps to HTTP POST. Used for creating a resource or performing
  1705. // an action.
  1706. Post string `json:"post,omitempty"`
  1707. // Put: Maps to HTTP PUT. Used for replacing a resource.
  1708. Put string `json:"put,omitempty"`
  1709. // ResponseBody: Optional. The name of the response field whose value is
  1710. // mapped to the HTTP
  1711. // response body. When omitted, the entire response message will be
  1712. // used
  1713. // as the HTTP response body.
  1714. //
  1715. // NOTE: The referred field must be present at the top-level of the
  1716. // response
  1717. // message type.
  1718. ResponseBody string `json:"responseBody,omitempty"`
  1719. // Selector: Selects a method to which this rule applies.
  1720. //
  1721. // Refer to selector for syntax details.
  1722. Selector string `json:"selector,omitempty"`
  1723. // ForceSendFields is a list of field names (e.g. "AdditionalBindings")
  1724. // to unconditionally include in API requests. By default, fields with
  1725. // empty values are omitted from API requests. However, any non-pointer,
  1726. // non-interface field appearing in ForceSendFields will be sent to the
  1727. // server regardless of whether the field is empty or not. This may be
  1728. // used to include empty fields in Patch requests.
  1729. ForceSendFields []string `json:"-"`
  1730. // NullFields is a list of field names (e.g. "AdditionalBindings") to
  1731. // include in API requests with the JSON null value. By default, fields
  1732. // with empty values are omitted from API requests. However, any field
  1733. // with an empty value appearing in NullFields will be sent to the
  1734. // server as null. It is an error if a field in this list has a
  1735. // non-empty value. This may be used to include null fields in Patch
  1736. // requests.
  1737. NullFields []string `json:"-"`
  1738. }
  1739. func (s *HttpRule) MarshalJSON() ([]byte, error) {
  1740. type NoMethod HttpRule
  1741. raw := NoMethod(*s)
  1742. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1743. }
  1744. // LabelDescriptor: A description of a label.
  1745. type LabelDescriptor struct {
  1746. // Description: A human-readable description for the label.
  1747. Description string `json:"description,omitempty"`
  1748. // Key: The label key.
  1749. Key string `json:"key,omitempty"`
  1750. // ValueType: The type of data that can be assigned to the label.
  1751. //
  1752. // Possible values:
  1753. // "STRING" - A variable-length string. This is the default.
  1754. // "BOOL" - Boolean; true or false.
  1755. // "INT64" - A 64-bit signed integer.
  1756. ValueType string `json:"valueType,omitempty"`
  1757. // ForceSendFields is a list of field names (e.g. "Description") to
  1758. // unconditionally include in API requests. By default, fields with
  1759. // empty values are omitted from API requests. However, any non-pointer,
  1760. // non-interface field appearing in ForceSendFields will be sent to the
  1761. // server regardless of whether the field is empty or not. This may be
  1762. // used to include empty fields in Patch requests.
  1763. ForceSendFields []string `json:"-"`
  1764. // NullFields is a list of field names (e.g. "Description") to include
  1765. // in API requests with the JSON null value. By default, fields with
  1766. // empty values are omitted from API requests. However, any field with
  1767. // an empty value appearing in NullFields will be sent to the server as
  1768. // null. It is an error if a field in this list has a non-empty value.
  1769. // This may be used to include null fields in Patch requests.
  1770. NullFields []string `json:"-"`
  1771. }
  1772. func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
  1773. type NoMethod LabelDescriptor
  1774. raw := NoMethod(*s)
  1775. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1776. }
  1777. // ListEnabledServicesResponse: Response message for
  1778. // `ListEnabledServices` method.
  1779. type ListEnabledServicesResponse struct {
  1780. // NextPageToken: Token that can be passed to `ListEnabledServices` to
  1781. // resume a paginated
  1782. // query.
  1783. NextPageToken string `json:"nextPageToken,omitempty"`
  1784. // Services: Services enabled for the specified parent.
  1785. Services []*PublishedService `json:"services,omitempty"`
  1786. // ServerResponse contains the HTTP response code and headers from the
  1787. // server.
  1788. googleapi.ServerResponse `json:"-"`
  1789. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1790. // unconditionally include in API requests. By default, fields with
  1791. // empty values are omitted from API requests. However, any non-pointer,
  1792. // non-interface field appearing in ForceSendFields will be sent to the
  1793. // server regardless of whether the field is empty or not. This may be
  1794. // used to include empty fields in Patch requests.
  1795. ForceSendFields []string `json:"-"`
  1796. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1797. // in API requests with the JSON null value. By default, fields with
  1798. // empty values are omitted from API requests. However, any field with
  1799. // an empty value appearing in NullFields will be sent to the server as
  1800. // null. It is an error if a field in this list has a non-empty value.
  1801. // This may be used to include null fields in Patch requests.
  1802. NullFields []string `json:"-"`
  1803. }
  1804. func (s *ListEnabledServicesResponse) MarshalJSON() ([]byte, error) {
  1805. type NoMethod ListEnabledServicesResponse
  1806. raw := NoMethod(*s)
  1807. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1808. }
  1809. // LogDescriptor: A description of a log type. Example in YAML format:
  1810. //
  1811. // - name: library.googleapis.com/activity_history
  1812. // description: The history of borrowing and returning library
  1813. // items.
  1814. // display_name: Activity
  1815. // labels:
  1816. // - key: /customer_id
  1817. // description: Identifier of a library customer
  1818. type LogDescriptor struct {
  1819. // Description: A human-readable description of this log. This
  1820. // information appears in
  1821. // the documentation and can contain details.
  1822. Description string `json:"description,omitempty"`
  1823. // DisplayName: The human-readable name for this log. This information
  1824. // appears on
  1825. // the user interface and should be concise.
  1826. DisplayName string `json:"displayName,omitempty"`
  1827. // Labels: The set of labels that are available to describe a specific
  1828. // log entry.
  1829. // Runtime requests that contain labels not specified here
  1830. // are
  1831. // considered invalid.
  1832. Labels []*LabelDescriptor `json:"labels,omitempty"`
  1833. // Name: The name of the log. It must be less than 512 characters long
  1834. // and can
  1835. // include the following characters: upper- and lower-case
  1836. // alphanumeric
  1837. // characters [A-Za-z0-9], and punctuation characters including
  1838. // slash, underscore, hyphen, period [/_-.].
  1839. Name string `json:"name,omitempty"`
  1840. // ForceSendFields is a list of field names (e.g. "Description") to
  1841. // unconditionally include in API requests. By default, fields with
  1842. // empty values are omitted from API requests. However, any non-pointer,
  1843. // non-interface field appearing in ForceSendFields will be sent to the
  1844. // server regardless of whether the field is empty or not. This may be
  1845. // used to include empty fields in Patch requests.
  1846. ForceSendFields []string `json:"-"`
  1847. // NullFields is a list of field names (e.g. "Description") to include
  1848. // in API requests with the JSON null value. By default, fields with
  1849. // empty values are omitted from API requests. However, any field with
  1850. // an empty value appearing in NullFields will be sent to the server as
  1851. // null. It is an error if a field in this list has a non-empty value.
  1852. // This may be used to include null fields in Patch requests.
  1853. NullFields []string `json:"-"`
  1854. }
  1855. func (s *LogDescriptor) MarshalJSON() ([]byte, error) {
  1856. type NoMethod LogDescriptor
  1857. raw := NoMethod(*s)
  1858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1859. }
  1860. // Logging: Logging configuration of the service.
  1861. //
  1862. // The following example shows how to configure logs to be sent to
  1863. // the
  1864. // producer and consumer projects. In the example, the
  1865. // `activity_history`
  1866. // log is sent to both the producer and consumer projects, whereas
  1867. // the
  1868. // `purchase_history` log is only sent to the producer project.
  1869. //
  1870. // monitored_resources:
  1871. // - type: library.googleapis.com/branch
  1872. // labels:
  1873. // - key: /city
  1874. // description: The city where the library branch is located
  1875. // in.
  1876. // - key: /name
  1877. // description: The name of the branch.
  1878. // logs:
  1879. // - name: activity_history
  1880. // labels:
  1881. // - key: /customer_id
  1882. // - name: purchase_history
  1883. // logging:
  1884. // producer_destinations:
  1885. // - monitored_resource: library.googleapis.com/branch
  1886. // logs:
  1887. // - activity_history
  1888. // - purchase_history
  1889. // consumer_destinations:
  1890. // - monitored_resource: library.googleapis.com/branch
  1891. // logs:
  1892. // - activity_history
  1893. type Logging struct {
  1894. // ConsumerDestinations: Logging configurations for sending logs to the
  1895. // consumer project.
  1896. // There can be multiple consumer destinations, each one must have
  1897. // a
  1898. // different monitored resource type. A log can be used in at most
  1899. // one consumer destination.
  1900. ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"`
  1901. // ProducerDestinations: Logging configurations for sending logs to the
  1902. // producer project.
  1903. // There can be multiple producer destinations, each one must have
  1904. // a
  1905. // different monitored resource type. A log can be used in at most
  1906. // one producer destination.
  1907. ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"`
  1908. // ForceSendFields is a list of field names (e.g.
  1909. // "ConsumerDestinations") to unconditionally include in API requests.
  1910. // By default, fields with empty values are omitted from API requests.
  1911. // However, any non-pointer, non-interface field appearing in
  1912. // ForceSendFields will be sent to the server regardless of whether the
  1913. // field is empty or not. This may be used to include empty fields in
  1914. // Patch requests.
  1915. ForceSendFields []string `json:"-"`
  1916. // NullFields is a list of field names (e.g. "ConsumerDestinations") to
  1917. // include in API requests with the JSON null value. By default, fields
  1918. // with empty values are omitted from API requests. However, any field
  1919. // with an empty value appearing in NullFields will be sent to the
  1920. // server as null. It is an error if a field in this list has a
  1921. // non-empty value. This may be used to include null fields in Patch
  1922. // requests.
  1923. NullFields []string `json:"-"`
  1924. }
  1925. func (s *Logging) MarshalJSON() ([]byte, error) {
  1926. type NoMethod Logging
  1927. raw := NoMethod(*s)
  1928. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1929. }
  1930. // LoggingDestination: Configuration of a specific logging destination
  1931. // (the producer project
  1932. // or the consumer project).
  1933. type LoggingDestination struct {
  1934. // Logs: Names of the logs to be sent to this destination. Each name
  1935. // must
  1936. // be defined in the Service.logs section. If the log name is
  1937. // not a domain scoped name, it will be automatically prefixed with
  1938. // the service name followed by "/".
  1939. Logs []string `json:"logs,omitempty"`
  1940. // MonitoredResource: The monitored resource type. The type must be
  1941. // defined in the
  1942. // Service.monitored_resources section.
  1943. MonitoredResource string `json:"monitoredResource,omitempty"`
  1944. // ForceSendFields is a list of field names (e.g. "Logs") to
  1945. // unconditionally include in API requests. By default, fields with
  1946. // empty values are omitted from API requests. However, any non-pointer,
  1947. // non-interface field appearing in ForceSendFields will be sent to the
  1948. // server regardless of whether the field is empty or not. This may be
  1949. // used to include empty fields in Patch requests.
  1950. ForceSendFields []string `json:"-"`
  1951. // NullFields is a list of field names (e.g. "Logs") to include in API
  1952. // requests with the JSON null value. By default, fields with empty
  1953. // values are omitted from API requests. However, any field with an
  1954. // empty value appearing in NullFields will be sent to the server as
  1955. // null. It is an error if a field in this list has a non-empty value.
  1956. // This may be used to include null fields in Patch requests.
  1957. NullFields []string `json:"-"`
  1958. }
  1959. func (s *LoggingDestination) MarshalJSON() ([]byte, error) {
  1960. type NoMethod LoggingDestination
  1961. raw := NoMethod(*s)
  1962. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1963. }
  1964. // Method: Method represents a method of an API interface.
  1965. type Method struct {
  1966. // Name: The simple name of this method.
  1967. Name string `json:"name,omitempty"`
  1968. // Options: Any metadata attached to the method.
  1969. Options []*Option `json:"options,omitempty"`
  1970. // RequestStreaming: If true, the request is streamed.
  1971. RequestStreaming bool `json:"requestStreaming,omitempty"`
  1972. // RequestTypeUrl: A URL of the input message type.
  1973. RequestTypeUrl string `json:"requestTypeUrl,omitempty"`
  1974. // ResponseStreaming: If true, the response is streamed.
  1975. ResponseStreaming bool `json:"responseStreaming,omitempty"`
  1976. // ResponseTypeUrl: The URL of the output message type.
  1977. ResponseTypeUrl string `json:"responseTypeUrl,omitempty"`
  1978. // Syntax: The source syntax of this method.
  1979. //
  1980. // Possible values:
  1981. // "SYNTAX_PROTO2" - Syntax `proto2`.
  1982. // "SYNTAX_PROTO3" - Syntax `proto3`.
  1983. Syntax string `json:"syntax,omitempty"`
  1984. // ForceSendFields is a list of field names (e.g. "Name") to
  1985. // unconditionally include in API requests. By default, fields with
  1986. // empty values are omitted from API requests. However, any non-pointer,
  1987. // non-interface field appearing in ForceSendFields will be sent to the
  1988. // server regardless of whether the field is empty or not. This may be
  1989. // used to include empty fields in Patch requests.
  1990. ForceSendFields []string `json:"-"`
  1991. // NullFields is a list of field names (e.g. "Name") to include in API
  1992. // requests with the JSON null value. By default, fields with empty
  1993. // values are omitted from API requests. However, any field with an
  1994. // empty value appearing in NullFields will be sent to the server as
  1995. // null. It is an error if a field in this list has a non-empty value.
  1996. // This may be used to include null fields in Patch requests.
  1997. NullFields []string `json:"-"`
  1998. }
  1999. func (s *Method) MarshalJSON() ([]byte, error) {
  2000. type NoMethod Method
  2001. raw := NoMethod(*s)
  2002. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2003. }
  2004. // MetricDescriptor: Defines a metric type and its schema. Once a metric
  2005. // descriptor is created,
  2006. // deleting or altering it stops data collection and makes the metric
  2007. // type's
  2008. // existing data unusable.
  2009. type MetricDescriptor struct {
  2010. // Description: A detailed description of the metric, which can be used
  2011. // in documentation.
  2012. Description string `json:"description,omitempty"`
  2013. // DisplayName: A concise name for the metric, which can be displayed in
  2014. // user interfaces.
  2015. // Use sentence case without an ending period, for example "Request
  2016. // count".
  2017. // This field is optional but it is recommended to be set for any
  2018. // metrics
  2019. // associated with user-visible concepts, such as Quota.
  2020. DisplayName string `json:"displayName,omitempty"`
  2021. // Labels: The set of labels that can be used to describe a
  2022. // specific
  2023. // instance of this metric type. For example,
  2024. // the
  2025. // `appengine.googleapis.com/http/server/response_latencies` metric
  2026. // type has a label for the HTTP response code, `response_code`, so
  2027. // you can look at latencies for successful responses or just
  2028. // for responses that failed.
  2029. Labels []*LabelDescriptor `json:"labels,omitempty"`
  2030. // Metadata: Optional. Metadata which can be used to guide usage of the
  2031. // metric.
  2032. Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
  2033. // MetricKind: Whether the metric records instantaneous values, changes
  2034. // to a value, etc.
  2035. // Some combinations of `metric_kind` and `value_type` might not be
  2036. // supported.
  2037. //
  2038. // Possible values:
  2039. // "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
  2040. // "GAUGE" - An instantaneous measurement of a value.
  2041. // "DELTA" - The change in a value during a time interval.
  2042. // "CUMULATIVE" - A value accumulated over a time interval.
  2043. // Cumulative
  2044. // measurements in a time series should have the same start time
  2045. // and increasing end times, until an event resets the cumulative
  2046. // value to zero and sets a new start time for the following
  2047. // points.
  2048. MetricKind string `json:"metricKind,omitempty"`
  2049. // Name: The resource name of the metric descriptor.
  2050. Name string `json:"name,omitempty"`
  2051. // Type: The metric type, including its DNS name prefix. The type is
  2052. // not
  2053. // URL-encoded. All user-defined metric types have the DNS
  2054. // name
  2055. // `custom.googleapis.com` or `external.googleapis.com`. Metric types
  2056. // should
  2057. // use a natural hierarchical grouping. For example:
  2058. //
  2059. // "custom.googleapis.com/invoice/paid/amount"
  2060. // "external.googleapis.com/prometheus/up"
  2061. // "appengine.googleapis.com/http/server/response_latencies"
  2062. Type string `json:"type,omitempty"`
  2063. // Unit: The unit in which the metric value is reported. It is only
  2064. // applicable
  2065. // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`.
  2066. // The
  2067. // supported units are a subset of [The Unified Code for Units
  2068. // of
  2069. // Measure](http://unitsofmeasure.org/ucum.html) standard:
  2070. //
  2071. // **Basic units (UNIT)**
  2072. //
  2073. // * `bit` bit
  2074. // * `By` byte
  2075. // * `s` second
  2076. // * `min` minute
  2077. // * `h` hour
  2078. // * `d` day
  2079. //
  2080. // **Prefixes (PREFIX)**
  2081. //
  2082. // * `k` kilo (10**3)
  2083. // * `M` mega (10**6)
  2084. // * `G` giga (10**9)
  2085. // * `T` tera (10**12)
  2086. // * `P` peta (10**15)
  2087. // * `E` exa (10**18)
  2088. // * `Z` zetta (10**21)
  2089. // * `Y` yotta (10**24)
  2090. // * `m` milli (10**-3)
  2091. // * `u` micro (10**-6)
  2092. // * `n` nano (10**-9)
  2093. // * `p` pico (10**-12)
  2094. // * `f` femto (10**-15)
  2095. // * `a` atto (10**-18)
  2096. // * `z` zepto (10**-21)
  2097. // * `y` yocto (10**-24)
  2098. // * `Ki` kibi (2**10)
  2099. // * `Mi` mebi (2**20)
  2100. // * `Gi` gibi (2**30)
  2101. // * `Ti` tebi (2**40)
  2102. //
  2103. // **Grammar**
  2104. //
  2105. // The grammar also includes these connectors:
  2106. //
  2107. // * `/` division (as an infix operator, e.g. `1/s`).
  2108. // * `.` multiplication (as an infix operator, e.g. `GBy.d`)
  2109. //
  2110. // The grammar for a unit is as follows:
  2111. //
  2112. // Expression = Component { "." Component } { "/" Component } ;
  2113. //
  2114. // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
  2115. // | Annotation
  2116. // | "1"
  2117. // ;
  2118. //
  2119. // Annotation = "{" NAME "}" ;
  2120. //
  2121. // Notes:
  2122. //
  2123. // * `Annotation` is just a comment if it follows a `UNIT` and is
  2124. // equivalent to `1` if it is used alone. For examples,
  2125. // `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
  2126. // * `NAME` is a sequence of non-blank printable ASCII characters not
  2127. // containing '{' or '}'.
  2128. // * `1` represents dimensionless value 1, such as in `1/s`.
  2129. // * `%` represents dimensionless value 1/100, and annotates values
  2130. // giving
  2131. // a percentage.
  2132. Unit string `json:"unit,omitempty"`
  2133. // ValueType: Whether the measurement is an integer, a floating-point
  2134. // number, etc.
  2135. // Some combinations of `metric_kind` and `value_type` might not be
  2136. // supported.
  2137. //
  2138. // Possible values:
  2139. // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
  2140. // "BOOL" - The value is a boolean.
  2141. // This value type can be used only if the metric kind is `GAUGE`.
  2142. // "INT64" - The value is a signed 64-bit integer.
  2143. // "DOUBLE" - The value is a double precision floating point number.
  2144. // "STRING" - The value is a text string.
  2145. // This value type can be used only if the metric kind is `GAUGE`.
  2146. // "DISTRIBUTION" - The value is a `Distribution`.
  2147. // "MONEY" - The value is money.
  2148. ValueType string `json:"valueType,omitempty"`
  2149. // ForceSendFields is a list of field names (e.g. "Description") to
  2150. // unconditionally include in API requests. By default, fields with
  2151. // empty values are omitted from API requests. However, any non-pointer,
  2152. // non-interface field appearing in ForceSendFields will be sent to the
  2153. // server regardless of whether the field is empty or not. This may be
  2154. // used to include empty fields in Patch requests.
  2155. ForceSendFields []string `json:"-"`
  2156. // NullFields is a list of field names (e.g. "Description") to include
  2157. // in API requests with the JSON null value. By default, fields with
  2158. // empty values are omitted from API requests. However, any field with
  2159. // an empty value appearing in NullFields will be sent to the server as
  2160. // null. It is an error if a field in this list has a non-empty value.
  2161. // This may be used to include null fields in Patch requests.
  2162. NullFields []string `json:"-"`
  2163. }
  2164. func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
  2165. type NoMethod MetricDescriptor
  2166. raw := NoMethod(*s)
  2167. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2168. }
  2169. // MetricDescriptorMetadata: Additional annotations that can be used to
  2170. // guide the usage of a metric.
  2171. type MetricDescriptorMetadata struct {
  2172. // IngestDelay: The delay of data points caused by ingestion. Data
  2173. // points older than this
  2174. // age are guaranteed to be ingested and available to be read,
  2175. // excluding
  2176. // data loss due to errors.
  2177. IngestDelay string `json:"ingestDelay,omitempty"`
  2178. // LaunchStage: The launch stage of the metric definition.
  2179. //
  2180. // Possible values:
  2181. // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
  2182. // "EARLY_ACCESS" - Early Access features are limited to a closed
  2183. // group of testers. To use
  2184. // these features, you must sign up in advance and sign a Trusted
  2185. // Tester
  2186. // agreement (which includes confidentiality provisions). These features
  2187. // may
  2188. // be unstable, changed in backward-incompatible ways, and are
  2189. // not
  2190. // guaranteed to be released.
  2191. // "ALPHA" - Alpha is a limited availability test for releases before
  2192. // they are cleared
  2193. // for widespread use. By Alpha, all significant design issues are
  2194. // resolved
  2195. // and we are in the process of verifying functionality. Alpha
  2196. // customers
  2197. // need to apply for access, agree to applicable terms, and have
  2198. // their
  2199. // projects whitelisted. Alpha releases don’t have to be feature
  2200. // complete,
  2201. // no SLAs are provided, and there are no technical support obligations,
  2202. // but
  2203. // they will be far enough along that customers can actually use them
  2204. // in
  2205. // test environments or for limited-use tests -- just like they would
  2206. // in
  2207. // normal production cases.
  2208. // "BETA" - Beta is the point at which we are ready to open a release
  2209. // for any
  2210. // customer to use. There are no SLA or technical support obligations in
  2211. // a
  2212. // Beta release. Products will be complete from a feature perspective,
  2213. // but
  2214. // may have some open outstanding issues. Beta releases are suitable
  2215. // for
  2216. // limited production use cases.
  2217. // "GA" - GA features are open to all developers and are considered
  2218. // stable and
  2219. // fully qualified for production use.
  2220. // "DEPRECATED" - Deprecated features are scheduled to be shut down
  2221. // and removed. For more
  2222. // information, see the “Deprecation Policy” section of our [Terms
  2223. // of
  2224. // Service](https://cloud.google.com/terms/)
  2225. // and the [Google Cloud Platform Subject to the
  2226. // Deprecation
  2227. // Policy](https://cloud.google.com/terms/deprecation) documentation.
  2228. LaunchStage string `json:"launchStage,omitempty"`
  2229. // SamplePeriod: The sampling period of metric data points. For metrics
  2230. // which are written
  2231. // periodically, consecutive data points are stored at this time
  2232. // interval,
  2233. // excluding data loss due to errors. Metrics with a higher granularity
  2234. // have
  2235. // a smaller sampling period.
  2236. SamplePeriod string `json:"samplePeriod,omitempty"`
  2237. // ForceSendFields is a list of field names (e.g. "IngestDelay") to
  2238. // unconditionally include in API requests. By default, fields with
  2239. // empty values are omitted from API requests. However, any non-pointer,
  2240. // non-interface field appearing in ForceSendFields will be sent to the
  2241. // server regardless of whether the field is empty or not. This may be
  2242. // used to include empty fields in Patch requests.
  2243. ForceSendFields []string `json:"-"`
  2244. // NullFields is a list of field names (e.g. "IngestDelay") to include
  2245. // in API requests with the JSON null value. By default, fields with
  2246. // empty values are omitted from API requests. However, any field with
  2247. // an empty value appearing in NullFields will be sent to the server as
  2248. // null. It is an error if a field in this list has a non-empty value.
  2249. // This may be used to include null fields in Patch requests.
  2250. NullFields []string `json:"-"`
  2251. }
  2252. func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
  2253. type NoMethod MetricDescriptorMetadata
  2254. raw := NoMethod(*s)
  2255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2256. }
  2257. // MetricRule: Bind API methods to metrics. Binding a method to a metric
  2258. // causes that
  2259. // metric's configured quota behaviors to apply to the method call.
  2260. type MetricRule struct {
  2261. // MetricCosts: Metrics to update when the selected methods are called,
  2262. // and the associated
  2263. // cost applied to each metric.
  2264. //
  2265. // The key of the map is the metric name, and the values are the
  2266. // amount
  2267. // increased for the metric against which the quota limits are
  2268. // defined.
  2269. // The value must not be negative.
  2270. MetricCosts map[string]string `json:"metricCosts,omitempty"`
  2271. // Selector: Selects the methods to which this rule applies.
  2272. //
  2273. // Refer to selector for syntax details.
  2274. Selector string `json:"selector,omitempty"`
  2275. // ForceSendFields is a list of field names (e.g. "MetricCosts") to
  2276. // unconditionally include in API requests. By default, fields with
  2277. // empty values are omitted from API requests. However, any non-pointer,
  2278. // non-interface field appearing in ForceSendFields will be sent to the
  2279. // server regardless of whether the field is empty or not. This may be
  2280. // used to include empty fields in Patch requests.
  2281. ForceSendFields []string `json:"-"`
  2282. // NullFields is a list of field names (e.g. "MetricCosts") to include
  2283. // in API requests with the JSON null value. By default, fields with
  2284. // empty values are omitted from API requests. However, any field with
  2285. // an empty value appearing in NullFields will be sent to the server as
  2286. // null. It is an error if a field in this list has a non-empty value.
  2287. // This may be used to include null fields in Patch requests.
  2288. NullFields []string `json:"-"`
  2289. }
  2290. func (s *MetricRule) MarshalJSON() ([]byte, error) {
  2291. type NoMethod MetricRule
  2292. raw := NoMethod(*s)
  2293. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2294. }
  2295. // Mixin: Declares an API Interface to be included in this interface.
  2296. // The including
  2297. // interface must redeclare all the methods from the included interface,
  2298. // but
  2299. // documentation and options are inherited as follows:
  2300. //
  2301. // - If after comment and whitespace stripping, the documentation
  2302. // string of the redeclared method is empty, it will be inherited
  2303. // from the original method.
  2304. //
  2305. // - Each annotation belonging to the service config (http,
  2306. // visibility) which is not set in the redeclared method will be
  2307. // inherited.
  2308. //
  2309. // - If an http annotation is inherited, the path pattern will be
  2310. // modified as follows. Any version prefix will be replaced by the
  2311. // version of the including interface plus the root path if
  2312. // specified.
  2313. //
  2314. // Example of a simple mixin:
  2315. //
  2316. // package google.acl.v1;
  2317. // service AccessControl {
  2318. // // Get the underlying ACL object.
  2319. // rpc GetAcl(GetAclRequest) returns (Acl) {
  2320. // option (google.api.http).get = "/v1/{resource=**}:getAcl";
  2321. // }
  2322. // }
  2323. //
  2324. // package google.storage.v2;
  2325. // service Storage {
  2326. // // rpc GetAcl(GetAclRequest) returns (Acl);
  2327. //
  2328. // // Get a data record.
  2329. // rpc GetData(GetDataRequest) returns (Data) {
  2330. // option (google.api.http).get = "/v2/{resource=**}";
  2331. // }
  2332. // }
  2333. //
  2334. // Example of a mixin configuration:
  2335. //
  2336. // apis:
  2337. // - name: google.storage.v2.Storage
  2338. // mixins:
  2339. // - name: google.acl.v1.AccessControl
  2340. //
  2341. // The mixin construct implies that all methods in `AccessControl`
  2342. // are
  2343. // also declared with same name and request/response types in
  2344. // `Storage`. A documentation generator or annotation processor will
  2345. // see the effective `Storage.GetAcl` method after
  2346. // inherting
  2347. // documentation and annotations as follows:
  2348. //
  2349. // service Storage {
  2350. // // Get the underlying ACL object.
  2351. // rpc GetAcl(GetAclRequest) returns (Acl) {
  2352. // option (google.api.http).get = "/v2/{resource=**}:getAcl";
  2353. // }
  2354. // ...
  2355. // }
  2356. //
  2357. // Note how the version in the path pattern changed from `v1` to
  2358. // `v2`.
  2359. //
  2360. // If the `root` field in the mixin is specified, it should be
  2361. // a
  2362. // relative path under which inherited HTTP paths are placed. Example:
  2363. //
  2364. // apis:
  2365. // - name: google.storage.v2.Storage
  2366. // mixins:
  2367. // - name: google.acl.v1.AccessControl
  2368. // root: acls
  2369. //
  2370. // This implies the following inherited HTTP annotation:
  2371. //
  2372. // service Storage {
  2373. // // Get the underlying ACL object.
  2374. // rpc GetAcl(GetAclRequest) returns (Acl) {
  2375. // option (google.api.http).get =
  2376. // "/v2/acls/{resource=**}:getAcl";
  2377. // }
  2378. // ...
  2379. // }
  2380. type Mixin struct {
  2381. // Name: The fully qualified name of the interface which is included.
  2382. Name string `json:"name,omitempty"`
  2383. // Root: If non-empty specifies a path under which inherited HTTP
  2384. // paths
  2385. // are rooted.
  2386. Root string `json:"root,omitempty"`
  2387. // ForceSendFields is a list of field names (e.g. "Name") to
  2388. // unconditionally include in API requests. By default, fields with
  2389. // empty values are omitted from API requests. However, any non-pointer,
  2390. // non-interface field appearing in ForceSendFields will be sent to the
  2391. // server regardless of whether the field is empty or not. This may be
  2392. // used to include empty fields in Patch requests.
  2393. ForceSendFields []string `json:"-"`
  2394. // NullFields is a list of field names (e.g. "Name") to include in API
  2395. // requests with the JSON null value. By default, fields with empty
  2396. // values are omitted from API requests. However, any field with an
  2397. // empty value appearing in NullFields will be sent to the server as
  2398. // null. It is an error if a field in this list has a non-empty value.
  2399. // This may be used to include null fields in Patch requests.
  2400. NullFields []string `json:"-"`
  2401. }
  2402. func (s *Mixin) MarshalJSON() ([]byte, error) {
  2403. type NoMethod Mixin
  2404. raw := NoMethod(*s)
  2405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2406. }
  2407. // MonitoredResourceDescriptor: An object that describes the schema of a
  2408. // MonitoredResource object using a
  2409. // type name and a set of labels. For example, the monitored
  2410. // resource
  2411. // descriptor for Google Compute Engine VM instances has a type
  2412. // of
  2413. // "gce_instance" and specifies the use of the labels "instance_id"
  2414. // and
  2415. // "zone" to identify particular VM instances.
  2416. //
  2417. // Different APIs can support different monitored resource types. APIs
  2418. // generally
  2419. // provide a `list` method that returns the monitored resource
  2420. // descriptors used
  2421. // by the API.
  2422. type MonitoredResourceDescriptor struct {
  2423. // Description: Optional. A detailed description of the monitored
  2424. // resource type that might
  2425. // be used in documentation.
  2426. Description string `json:"description,omitempty"`
  2427. // DisplayName: Optional. A concise name for the monitored resource type
  2428. // that might be
  2429. // displayed in user interfaces. It should be a Title Cased Noun
  2430. // Phrase,
  2431. // without any article or other determiners. For example,
  2432. // "Google Cloud SQL Database".
  2433. DisplayName string `json:"displayName,omitempty"`
  2434. // Labels: Required. A set of labels used to describe instances of this
  2435. // monitored
  2436. // resource type. For example, an individual Google Cloud SQL database
  2437. // is
  2438. // identified by values for the labels "database_id" and "zone".
  2439. Labels []*LabelDescriptor `json:"labels,omitempty"`
  2440. // Name: Optional. The resource name of the monitored resource
  2441. // descriptor:
  2442. // "projects/{project_id}/monitoredResourceDescriptors/{type
  2443. // }" where
  2444. // {type} is the value of the `type` field in this object
  2445. // and
  2446. // {project_id} is a project ID that provides API-specific context
  2447. // for
  2448. // accessing the type. APIs that do not use project information can use
  2449. // the
  2450. // resource name format "monitoredResourceDescriptors/{type}".
  2451. Name string `json:"name,omitempty"`
  2452. // Type: Required. The monitored resource type. For example, the
  2453. // type
  2454. // "cloudsql_database" represents databases in Google Cloud SQL.
  2455. // The maximum length of this value is 256 characters.
  2456. Type string `json:"type,omitempty"`
  2457. // ForceSendFields is a list of field names (e.g. "Description") to
  2458. // unconditionally include in API requests. By default, fields with
  2459. // empty values are omitted from API requests. However, any non-pointer,
  2460. // non-interface field appearing in ForceSendFields will be sent to the
  2461. // server regardless of whether the field is empty or not. This may be
  2462. // used to include empty fields in Patch requests.
  2463. ForceSendFields []string `json:"-"`
  2464. // NullFields is a list of field names (e.g. "Description") to include
  2465. // in API requests with the JSON null value. By default, fields with
  2466. // empty values are omitted from API requests. However, any field with
  2467. // an empty value appearing in NullFields will be sent to the server as
  2468. // null. It is an error if a field in this list has a non-empty value.
  2469. // This may be used to include null fields in Patch requests.
  2470. NullFields []string `json:"-"`
  2471. }
  2472. func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
  2473. type NoMethod MonitoredResourceDescriptor
  2474. raw := NoMethod(*s)
  2475. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2476. }
  2477. // Monitoring: Monitoring configuration of the service.
  2478. //
  2479. // The example below shows how to configure monitored resources and
  2480. // metrics
  2481. // for monitoring. In the example, a monitored resource and two metrics
  2482. // are
  2483. // defined. The `library.googleapis.com/book/returned_count` metric is
  2484. // sent
  2485. // to both producer and consumer projects, whereas
  2486. // the
  2487. // `library.googleapis.com/book/overdue_count` metric is only sent to
  2488. // the
  2489. // consumer project.
  2490. //
  2491. // monitored_resources:
  2492. // - type: library.googleapis.com/branch
  2493. // labels:
  2494. // - key: /city
  2495. // description: The city where the library branch is located
  2496. // in.
  2497. // - key: /name
  2498. // description: The name of the branch.
  2499. // metrics:
  2500. // - name: library.googleapis.com/book/returned_count
  2501. // metric_kind: DELTA
  2502. // value_type: INT64
  2503. // labels:
  2504. // - key: /customer_id
  2505. // - name: library.googleapis.com/book/overdue_count
  2506. // metric_kind: GAUGE
  2507. // value_type: INT64
  2508. // labels:
  2509. // - key: /customer_id
  2510. // monitoring:
  2511. // producer_destinations:
  2512. // - monitored_resource: library.googleapis.com/branch
  2513. // metrics:
  2514. // - library.googleapis.com/book/returned_count
  2515. // consumer_destinations:
  2516. // - monitored_resource: library.googleapis.com/branch
  2517. // metrics:
  2518. // - library.googleapis.com/book/returned_count
  2519. // - library.googleapis.com/book/overdue_count
  2520. type Monitoring struct {
  2521. // ConsumerDestinations: Monitoring configurations for sending metrics
  2522. // to the consumer project.
  2523. // There can be multiple consumer destinations, each one must have
  2524. // a
  2525. // different monitored resource type. A metric can be used in at
  2526. // most
  2527. // one consumer destination.
  2528. ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"`
  2529. // ProducerDestinations: Monitoring configurations for sending metrics
  2530. // to the producer project.
  2531. // There can be multiple producer destinations, each one must have
  2532. // a
  2533. // different monitored resource type. A metric can be used in at
  2534. // most
  2535. // one producer destination.
  2536. ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"`
  2537. // ForceSendFields is a list of field names (e.g.
  2538. // "ConsumerDestinations") to unconditionally include in API requests.
  2539. // By default, fields with empty values are omitted from API requests.
  2540. // However, any non-pointer, non-interface field appearing in
  2541. // ForceSendFields will be sent to the server regardless of whether the
  2542. // field is empty or not. This may be used to include empty fields in
  2543. // Patch requests.
  2544. ForceSendFields []string `json:"-"`
  2545. // NullFields is a list of field names (e.g. "ConsumerDestinations") to
  2546. // include in API requests with the JSON null value. By default, fields
  2547. // with empty values are omitted from API requests. However, any field
  2548. // with an empty value appearing in NullFields will be sent to the
  2549. // server as null. It is an error if a field in this list has a
  2550. // non-empty value. This may be used to include null fields in Patch
  2551. // requests.
  2552. NullFields []string `json:"-"`
  2553. }
  2554. func (s *Monitoring) MarshalJSON() ([]byte, error) {
  2555. type NoMethod Monitoring
  2556. raw := NoMethod(*s)
  2557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2558. }
  2559. // MonitoringDestination: Configuration of a specific monitoring
  2560. // destination (the producer project
  2561. // or the consumer project).
  2562. type MonitoringDestination struct {
  2563. // Metrics: Names of the metrics to report to this monitoring
  2564. // destination.
  2565. // Each name must be defined in Service.metrics section.
  2566. Metrics []string `json:"metrics,omitempty"`
  2567. // MonitoredResource: The monitored resource type. The type must be
  2568. // defined in
  2569. // Service.monitored_resources section.
  2570. MonitoredResource string `json:"monitoredResource,omitempty"`
  2571. // ForceSendFields is a list of field names (e.g. "Metrics") to
  2572. // unconditionally include in API requests. By default, fields with
  2573. // empty values are omitted from API requests. However, any non-pointer,
  2574. // non-interface field appearing in ForceSendFields will be sent to the
  2575. // server regardless of whether the field is empty or not. This may be
  2576. // used to include empty fields in Patch requests.
  2577. ForceSendFields []string `json:"-"`
  2578. // NullFields is a list of field names (e.g. "Metrics") to include in
  2579. // API requests with the JSON null value. By default, fields with empty
  2580. // values are omitted from API requests. However, any field with an
  2581. // empty value appearing in NullFields will be sent to the server as
  2582. // null. It is an error if a field in this list has a non-empty value.
  2583. // This may be used to include null fields in Patch requests.
  2584. NullFields []string `json:"-"`
  2585. }
  2586. func (s *MonitoringDestination) MarshalJSON() ([]byte, error) {
  2587. type NoMethod MonitoringDestination
  2588. raw := NoMethod(*s)
  2589. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2590. }
  2591. // OAuthRequirements: OAuth scopes are a way to define data and
  2592. // permissions on data. For example,
  2593. // there are scopes defined for "Read-only access to Google Calendar"
  2594. // and
  2595. // "Access to Cloud Platform". Users can consent to a scope for an
  2596. // application,
  2597. // giving it permission to access that data on their behalf.
  2598. //
  2599. // OAuth scope specifications should be fairly coarse grained; a user
  2600. // will need
  2601. // to see and understand the text description of what your scope
  2602. // means.
  2603. //
  2604. // In most cases: use one or at most two OAuth scopes for an entire
  2605. // family of
  2606. // products. If your product has multiple APIs, you should probably be
  2607. // sharing
  2608. // the OAuth scope across all of those APIs.
  2609. //
  2610. // When you need finer grained OAuth consent screens: talk with your
  2611. // product
  2612. // management about how developers will use them in practice.
  2613. //
  2614. // Please note that even though each of the canonical scopes is enough
  2615. // for a
  2616. // request to be accepted and passed to the backend, a request can still
  2617. // fail
  2618. // due to the backend requiring additional scopes or permissions.
  2619. type OAuthRequirements struct {
  2620. // CanonicalScopes: The list of publicly documented OAuth scopes that
  2621. // are allowed access. An
  2622. // OAuth token containing any of these scopes will be
  2623. // accepted.
  2624. //
  2625. // Example:
  2626. //
  2627. // canonical_scopes: https://www.googleapis.com/auth/calendar,
  2628. // https://www.googleapis.com/auth/calendar.read
  2629. CanonicalScopes string `json:"canonicalScopes,omitempty"`
  2630. // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to
  2631. // unconditionally include in API requests. By default, fields with
  2632. // empty values are omitted from API requests. However, any non-pointer,
  2633. // non-interface field appearing in ForceSendFields will be sent to the
  2634. // server regardless of whether the field is empty or not. This may be
  2635. // used to include empty fields in Patch requests.
  2636. ForceSendFields []string `json:"-"`
  2637. // NullFields is a list of field names (e.g. "CanonicalScopes") to
  2638. // include in API requests with the JSON null value. By default, fields
  2639. // with empty values are omitted from API requests. However, any field
  2640. // with an empty value appearing in NullFields will be sent to the
  2641. // server as null. It is an error if a field in this list has a
  2642. // non-empty value. This may be used to include null fields in Patch
  2643. // requests.
  2644. NullFields []string `json:"-"`
  2645. }
  2646. func (s *OAuthRequirements) MarshalJSON() ([]byte, error) {
  2647. type NoMethod OAuthRequirements
  2648. raw := NoMethod(*s)
  2649. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2650. }
  2651. // Operation: This resource represents a long-running operation that is
  2652. // the result of a
  2653. // network API call.
  2654. type Operation struct {
  2655. // Done: If the value is `false`, it means the operation is still in
  2656. // progress.
  2657. // If `true`, the operation is completed, and either `error` or
  2658. // `response` is
  2659. // available.
  2660. Done bool `json:"done,omitempty"`
  2661. // Error: The error result of the operation in case of failure or
  2662. // cancellation.
  2663. Error *Status `json:"error,omitempty"`
  2664. // Metadata: Service-specific metadata associated with the operation.
  2665. // It typically
  2666. // contains progress information and common metadata such as create
  2667. // time.
  2668. // Some services might not provide such metadata. Any method that
  2669. // returns a
  2670. // long-running operation should document the metadata type, if any.
  2671. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2672. // Name: The server-assigned name, which is only unique within the same
  2673. // service that
  2674. // originally returns it. If you use the default HTTP mapping,
  2675. // the
  2676. // `name` should have the format of `operations/some/unique/name`.
  2677. Name string `json:"name,omitempty"`
  2678. // Response: The normal response of the operation in case of success.
  2679. // If the original
  2680. // method returns no data on success, such as `Delete`, the response
  2681. // is
  2682. // `google.protobuf.Empty`. If the original method is
  2683. // standard
  2684. // `Get`/`Create`/`Update`, the response should be the resource. For
  2685. // other
  2686. // methods, the response should have the type `XxxResponse`, where
  2687. // `Xxx`
  2688. // is the original method name. For example, if the original method
  2689. // name
  2690. // is `TakeSnapshot()`, the inferred response type
  2691. // is
  2692. // `TakeSnapshotResponse`.
  2693. Response googleapi.RawMessage `json:"response,omitempty"`
  2694. // ServerResponse contains the HTTP response code and headers from the
  2695. // server.
  2696. googleapi.ServerResponse `json:"-"`
  2697. // ForceSendFields is a list of field names (e.g. "Done") to
  2698. // unconditionally include in API requests. By default, fields with
  2699. // empty values are omitted from API requests. However, any non-pointer,
  2700. // non-interface field appearing in ForceSendFields will be sent to the
  2701. // server regardless of whether the field is empty or not. This may be
  2702. // used to include empty fields in Patch requests.
  2703. ForceSendFields []string `json:"-"`
  2704. // NullFields is a list of field names (e.g. "Done") to include in API
  2705. // requests with the JSON null value. By default, fields with empty
  2706. // values are omitted from API requests. However, any field with an
  2707. // empty value appearing in NullFields will be sent to the server as
  2708. // null. It is an error if a field in this list has a non-empty value.
  2709. // This may be used to include null fields in Patch requests.
  2710. NullFields []string `json:"-"`
  2711. }
  2712. func (s *Operation) MarshalJSON() ([]byte, error) {
  2713. type NoMethod Operation
  2714. raw := NoMethod(*s)
  2715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2716. }
  2717. // OperationMetadata: The metadata associated with a long running
  2718. // operation resource.
  2719. type OperationMetadata struct {
  2720. // ProgressPercentage: Percentage of completion of this operation,
  2721. // ranging from 0 to 100.
  2722. ProgressPercentage int64 `json:"progressPercentage,omitempty"`
  2723. // ResourceNames: The full name of the resources that this operation is
  2724. // directly
  2725. // associated with.
  2726. ResourceNames []string `json:"resourceNames,omitempty"`
  2727. // StartTime: The start time of the operation.
  2728. StartTime string `json:"startTime,omitempty"`
  2729. // Steps: Detailed status information for each step. The order is
  2730. // undetermined.
  2731. Steps []*Step `json:"steps,omitempty"`
  2732. // ForceSendFields is a list of field names (e.g. "ProgressPercentage")
  2733. // to unconditionally include in API requests. By default, fields with
  2734. // empty values are omitted from API requests. However, any non-pointer,
  2735. // non-interface field appearing in ForceSendFields will be sent to the
  2736. // server regardless of whether the field is empty or not. This may be
  2737. // used to include empty fields in Patch requests.
  2738. ForceSendFields []string `json:"-"`
  2739. // NullFields is a list of field names (e.g. "ProgressPercentage") to
  2740. // include in API requests with the JSON null value. By default, fields
  2741. // with empty values are omitted from API requests. However, any field
  2742. // with an empty value appearing in NullFields will be sent to the
  2743. // server as null. It is an error if a field in this list has a
  2744. // non-empty value. This may be used to include null fields in Patch
  2745. // requests.
  2746. NullFields []string `json:"-"`
  2747. }
  2748. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2749. type NoMethod OperationMetadata
  2750. raw := NoMethod(*s)
  2751. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2752. }
  2753. // Option: A protocol buffer option, which can be attached to a message,
  2754. // field,
  2755. // enumeration, etc.
  2756. type Option struct {
  2757. // Name: The option's name. For protobuf built-in options (options
  2758. // defined in
  2759. // descriptor.proto), this is the short name. For example,
  2760. // "map_entry".
  2761. // For custom options, it should be the fully-qualified name. For
  2762. // example,
  2763. // "google.api.http".
  2764. Name string `json:"name,omitempty"`
  2765. // Value: The option's value packed in an Any message. If the value is a
  2766. // primitive,
  2767. // the corresponding wrapper type defined in
  2768. // google/protobuf/wrappers.proto
  2769. // should be used. If the value is an enum, it should be stored as an
  2770. // int32
  2771. // value using the google.protobuf.Int32Value type.
  2772. Value googleapi.RawMessage `json:"value,omitempty"`
  2773. // ForceSendFields is a list of field names (e.g. "Name") to
  2774. // unconditionally include in API requests. By default, fields with
  2775. // empty values are omitted from API requests. However, any non-pointer,
  2776. // non-interface field appearing in ForceSendFields will be sent to the
  2777. // server regardless of whether the field is empty or not. This may be
  2778. // used to include empty fields in Patch requests.
  2779. ForceSendFields []string `json:"-"`
  2780. // NullFields is a list of field names (e.g. "Name") to include in API
  2781. // requests with the JSON null value. By default, fields with empty
  2782. // values are omitted from API requests. However, any field with an
  2783. // empty value appearing in NullFields will be sent to the server as
  2784. // null. It is an error if a field in this list has a non-empty value.
  2785. // This may be used to include null fields in Patch requests.
  2786. NullFields []string `json:"-"`
  2787. }
  2788. func (s *Option) MarshalJSON() ([]byte, error) {
  2789. type NoMethod Option
  2790. raw := NoMethod(*s)
  2791. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2792. }
  2793. // Page: Represents a documentation page. A page can contain subpages to
  2794. // represent
  2795. // nested documentation set structure.
  2796. type Page struct {
  2797. // Content: The Markdown content of the page. You can use <code>&#40;==
  2798. // include {path} ==&#41;</code>
  2799. // to include content from a Markdown file.
  2800. Content string `json:"content,omitempty"`
  2801. // Name: The name of the page. It will be used as an identity of the
  2802. // page to
  2803. // generate URI of the page, text of the link to this page in
  2804. // navigation,
  2805. // etc. The full page name (start from the root page name to this
  2806. // page
  2807. // concatenated with `.`) can be used as reference to the page in
  2808. // your
  2809. // documentation. For example:
  2810. // <pre><code>pages:
  2811. // - name: Tutorial
  2812. // content: &#40;== include tutorial.md ==&#41;
  2813. // subpages:
  2814. // - name: Java
  2815. // content: &#40;== include tutorial_java.md
  2816. // ==&#41;
  2817. // </code></pre>
  2818. // You can reference `Java` page using Markdown reference link
  2819. // syntax:
  2820. // `Java`.
  2821. Name string `json:"name,omitempty"`
  2822. // Subpages: Subpages of this page. The order of subpages specified here
  2823. // will be
  2824. // honored in the generated docset.
  2825. Subpages []*Page `json:"subpages,omitempty"`
  2826. // ForceSendFields is a list of field names (e.g. "Content") to
  2827. // unconditionally include in API requests. By default, fields with
  2828. // empty values are omitted from API requests. However, any non-pointer,
  2829. // non-interface field appearing in ForceSendFields will be sent to the
  2830. // server regardless of whether the field is empty or not. This may be
  2831. // used to include empty fields in Patch requests.
  2832. ForceSendFields []string `json:"-"`
  2833. // NullFields is a list of field names (e.g. "Content") to include in
  2834. // API requests with the JSON null value. By default, fields with empty
  2835. // values are omitted from API requests. However, any field with an
  2836. // empty value appearing in NullFields will be sent to the server as
  2837. // null. It is an error if a field in this list has a non-empty value.
  2838. // This may be used to include null fields in Patch requests.
  2839. NullFields []string `json:"-"`
  2840. }
  2841. func (s *Page) MarshalJSON() ([]byte, error) {
  2842. type NoMethod Page
  2843. raw := NoMethod(*s)
  2844. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2845. }
  2846. // PublishedService: The published version of a Service that is managed
  2847. // by
  2848. // Google Service Management.
  2849. type PublishedService struct {
  2850. // Name: The resource name of the service.
  2851. //
  2852. // A valid name would be:
  2853. // - services/serviceuser.googleapis.com
  2854. Name string `json:"name,omitempty"`
  2855. // Service: The service's published configuration.
  2856. Service *Service `json:"service,omitempty"`
  2857. // ForceSendFields is a list of field names (e.g. "Name") to
  2858. // unconditionally include in API requests. By default, fields with
  2859. // empty values are omitted from API requests. However, any non-pointer,
  2860. // non-interface field appearing in ForceSendFields will be sent to the
  2861. // server regardless of whether the field is empty or not. This may be
  2862. // used to include empty fields in Patch requests.
  2863. ForceSendFields []string `json:"-"`
  2864. // NullFields is a list of field names (e.g. "Name") to include in API
  2865. // requests with the JSON null value. By default, fields with empty
  2866. // values are omitted from API requests. However, any field with an
  2867. // empty value appearing in NullFields will be sent to the server as
  2868. // null. It is an error if a field in this list has a non-empty value.
  2869. // This may be used to include null fields in Patch requests.
  2870. NullFields []string `json:"-"`
  2871. }
  2872. func (s *PublishedService) MarshalJSON() ([]byte, error) {
  2873. type NoMethod PublishedService
  2874. raw := NoMethod(*s)
  2875. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2876. }
  2877. // Quota: Quota configuration helps to achieve fairness and budgeting in
  2878. // service
  2879. // usage.
  2880. //
  2881. // The quota configuration works this way:
  2882. // - The service configuration defines a set of metrics.
  2883. // - For API calls, the quota.metric_rules maps methods to metrics with
  2884. // corresponding costs.
  2885. // - The quota.limits defines limits on the metrics, which will be used
  2886. // for
  2887. // quota checks at runtime.
  2888. //
  2889. // An example quota configuration in yaml format:
  2890. //
  2891. // quota:
  2892. // limits:
  2893. //
  2894. // - name: apiWriteQpsPerProject
  2895. // metric: library.googleapis.com/write_calls
  2896. // unit: "1/min/{project}" # rate limit for consumer projects
  2897. // values:
  2898. // STANDARD: 10000
  2899. //
  2900. //
  2901. // # The metric rules bind all methods to the read_calls metric,
  2902. // # except for the UpdateBook and DeleteBook methods. These two
  2903. // methods
  2904. // # are mapped to the write_calls metric, with the UpdateBook
  2905. // method
  2906. // # consuming at twice rate as the DeleteBook method.
  2907. // metric_rules:
  2908. // - selector: "*"
  2909. // metric_costs:
  2910. // library.googleapis.com/read_calls: 1
  2911. // - selector: google.example.library.v1.LibraryService.UpdateBook
  2912. // metric_costs:
  2913. // library.googleapis.com/write_calls: 2
  2914. // - selector: google.example.library.v1.LibraryService.DeleteBook
  2915. // metric_costs:
  2916. // library.googleapis.com/write_calls: 1
  2917. //
  2918. // Corresponding Metric definition:
  2919. //
  2920. // metrics:
  2921. // - name: library.googleapis.com/read_calls
  2922. // display_name: Read requests
  2923. // metric_kind: DELTA
  2924. // value_type: INT64
  2925. //
  2926. // - name: library.googleapis.com/write_calls
  2927. // display_name: Write requests
  2928. // metric_kind: DELTA
  2929. // value_type: INT64
  2930. type Quota struct {
  2931. // Limits: List of `QuotaLimit` definitions for the service.
  2932. Limits []*QuotaLimit `json:"limits,omitempty"`
  2933. // MetricRules: List of `MetricRule` definitions, each one mapping a
  2934. // selected method to one
  2935. // or more metrics.
  2936. MetricRules []*MetricRule `json:"metricRules,omitempty"`
  2937. // ForceSendFields is a list of field names (e.g. "Limits") to
  2938. // unconditionally include in API requests. By default, fields with
  2939. // empty values are omitted from API requests. However, any non-pointer,
  2940. // non-interface field appearing in ForceSendFields will be sent to the
  2941. // server regardless of whether the field is empty or not. This may be
  2942. // used to include empty fields in Patch requests.
  2943. ForceSendFields []string `json:"-"`
  2944. // NullFields is a list of field names (e.g. "Limits") to include in API
  2945. // requests with the JSON null value. By default, fields with empty
  2946. // values are omitted from API requests. However, any field with an
  2947. // empty value appearing in NullFields will be sent to the server as
  2948. // null. It is an error if a field in this list has a non-empty value.
  2949. // This may be used to include null fields in Patch requests.
  2950. NullFields []string `json:"-"`
  2951. }
  2952. func (s *Quota) MarshalJSON() ([]byte, error) {
  2953. type NoMethod Quota
  2954. raw := NoMethod(*s)
  2955. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2956. }
  2957. // QuotaLimit: `QuotaLimit` defines a specific limit that applies over a
  2958. // specified duration
  2959. // for a limit type. There can be at most one limit for a duration and
  2960. // limit
  2961. // type combination defined within a `QuotaGroup`.
  2962. type QuotaLimit struct {
  2963. // DefaultLimit: Default number of tokens that can be consumed during
  2964. // the specified
  2965. // duration. This is the number of tokens assigned when a
  2966. // client
  2967. // application developer activates the service for his/her
  2968. // project.
  2969. //
  2970. // Specifying a value of 0 will block all requests. This can be used if
  2971. // you
  2972. // are provisioning quota to selected consumers and blocking
  2973. // others.
  2974. // Similarly, a value of -1 will indicate an unlimited quota. No
  2975. // other
  2976. // negative values are allowed.
  2977. //
  2978. // Used by group-based quotas only.
  2979. DefaultLimit int64 `json:"defaultLimit,omitempty,string"`
  2980. // Description: Optional. User-visible, extended description for this
  2981. // quota limit.
  2982. // Should be used only when more context is needed to understand this
  2983. // limit
  2984. // than provided by the limit's display name (see: `display_name`).
  2985. Description string `json:"description,omitempty"`
  2986. // DisplayName: User-visible display name for this limit.
  2987. // Optional. If not set, the UI will provide a default display name
  2988. // based on
  2989. // the quota configuration. This field can be used to override the
  2990. // default
  2991. // display name generated from the configuration.
  2992. DisplayName string `json:"displayName,omitempty"`
  2993. // Duration: Duration of this limit in textual notation. Example:
  2994. // "100s", "24h", "1d".
  2995. // For duration longer than a day, only multiple of days is supported.
  2996. // We
  2997. // support only "100s" and "1d" for now. Additional support will be
  2998. // added in
  2999. // the future. "0" indicates indefinite duration.
  3000. //
  3001. // Used by group-based quotas only.
  3002. Duration string `json:"duration,omitempty"`
  3003. // FreeTier: Free tier value displayed in the Developers Console for
  3004. // this limit.
  3005. // The free tier is the number of tokens that will be subtracted from
  3006. // the
  3007. // billed amount when billing is enabled.
  3008. // This field can only be set on a limit with duration "1d", in a
  3009. // billable
  3010. // group; it is invalid on any other limit. If this field is not set,
  3011. // it
  3012. // defaults to 0, indicating that there is no free tier for this
  3013. // service.
  3014. //
  3015. // Used by group-based quotas only.
  3016. FreeTier int64 `json:"freeTier,omitempty,string"`
  3017. // MaxLimit: Maximum number of tokens that can be consumed during the
  3018. // specified
  3019. // duration. Client application developers can override the default
  3020. // limit up
  3021. // to this maximum. If specified, this value cannot be set to a value
  3022. // less
  3023. // than the default limit. If not specified, it is set to the default
  3024. // limit.
  3025. //
  3026. // To allow clients to apply overrides with no upper bound, set this to
  3027. // -1,
  3028. // indicating unlimited maximum quota.
  3029. //
  3030. // Used by group-based quotas only.
  3031. MaxLimit int64 `json:"maxLimit,omitempty,string"`
  3032. // Metric: The name of the metric this quota limit applies to. The quota
  3033. // limits with
  3034. // the same metric will be checked together during runtime. The metric
  3035. // must be
  3036. // defined within the service config.
  3037. Metric string `json:"metric,omitempty"`
  3038. // Name: Name of the quota limit.
  3039. //
  3040. // The name must be provided, and it must be unique within the service.
  3041. // The
  3042. // name can only include alphanumeric characters as well as '-'.
  3043. //
  3044. // The maximum length of the limit name is 64 characters.
  3045. Name string `json:"name,omitempty"`
  3046. // Unit: Specify the unit of the quota limit. It uses the same syntax
  3047. // as
  3048. // Metric.unit. The supported unit kinds are determined by the
  3049. // quota
  3050. // backend system.
  3051. //
  3052. // Here are some examples:
  3053. // * "1/min/{project}" for quota per minute per project.
  3054. //
  3055. // Note: the order of unit components is insignificant.
  3056. // The "1" at the beginning is required to follow the metric unit
  3057. // syntax.
  3058. Unit string `json:"unit,omitempty"`
  3059. // Values: Tiered limit values. You must specify this as a key:value
  3060. // pair, with an
  3061. // integer value that is the maximum number of requests allowed for
  3062. // the
  3063. // specified unit. Currently only STANDARD is supported.
  3064. Values map[string]string `json:"values,omitempty"`
  3065. // ForceSendFields is a list of field names (e.g. "DefaultLimit") to
  3066. // unconditionally include in API requests. By default, fields with
  3067. // empty values are omitted from API requests. However, any non-pointer,
  3068. // non-interface field appearing in ForceSendFields will be sent to the
  3069. // server regardless of whether the field is empty or not. This may be
  3070. // used to include empty fields in Patch requests.
  3071. ForceSendFields []string `json:"-"`
  3072. // NullFields is a list of field names (e.g. "DefaultLimit") to include
  3073. // in API requests with the JSON null value. By default, fields with
  3074. // empty values are omitted from API requests. However, any field with
  3075. // an empty value appearing in NullFields will be sent to the server as
  3076. // null. It is an error if a field in this list has a non-empty value.
  3077. // This may be used to include null fields in Patch requests.
  3078. NullFields []string `json:"-"`
  3079. }
  3080. func (s *QuotaLimit) MarshalJSON() ([]byte, error) {
  3081. type NoMethod QuotaLimit
  3082. raw := NoMethod(*s)
  3083. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3084. }
  3085. // SearchServicesResponse: Response message for SearchServices method.
  3086. type SearchServicesResponse struct {
  3087. // NextPageToken: Token that can be passed to `ListAvailableServices` to
  3088. // resume a paginated
  3089. // query.
  3090. NextPageToken string `json:"nextPageToken,omitempty"`
  3091. // Services: Services available publicly or available to the
  3092. // authenticated caller.
  3093. Services []*PublishedService `json:"services,omitempty"`
  3094. // ServerResponse contains the HTTP response code and headers from the
  3095. // server.
  3096. googleapi.ServerResponse `json:"-"`
  3097. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3098. // unconditionally include in API requests. By default, fields with
  3099. // empty values are omitted from API requests. However, any non-pointer,
  3100. // non-interface field appearing in ForceSendFields will be sent to the
  3101. // server regardless of whether the field is empty or not. This may be
  3102. // used to include empty fields in Patch requests.
  3103. ForceSendFields []string `json:"-"`
  3104. // NullFields is a list of field names (e.g. "NextPageToken") to include
  3105. // in API requests with the JSON null value. By default, fields with
  3106. // empty values are omitted from API requests. However, any field with
  3107. // an empty value appearing in NullFields will be sent to the server as
  3108. // null. It is an error if a field in this list has a non-empty value.
  3109. // This may be used to include null fields in Patch requests.
  3110. NullFields []string `json:"-"`
  3111. }
  3112. func (s *SearchServicesResponse) MarshalJSON() ([]byte, error) {
  3113. type NoMethod SearchServicesResponse
  3114. raw := NoMethod(*s)
  3115. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3116. }
  3117. // Service: `Service` is the root object of Google service configuration
  3118. // schema. It
  3119. // describes basic information about a service, such as the name and
  3120. // the
  3121. // title, and delegates other aspects to sub-sections. Each sub-section
  3122. // is
  3123. // either a proto message or a repeated proto message that configures
  3124. // a
  3125. // specific aspect, such as auth. See each proto message definition for
  3126. // details.
  3127. //
  3128. // Example:
  3129. //
  3130. // type: google.api.Service
  3131. // config_version: 3
  3132. // name: calendar.googleapis.com
  3133. // title: Google Calendar API
  3134. // apis:
  3135. // - name: google.calendar.v3.Calendar
  3136. // authentication:
  3137. // providers:
  3138. // - id: google_calendar_auth
  3139. // jwks_uri: https://www.googleapis.com/oauth2/v1/certs
  3140. // issuer: https://securetoken.google.com
  3141. // rules:
  3142. // - selector: "*"
  3143. // requirements:
  3144. // provider_id: google_calendar_auth
  3145. type Service struct {
  3146. // Apis: A list of API interfaces exported by this service. Only the
  3147. // `name` field
  3148. // of the google.protobuf.Api needs to be provided by the
  3149. // configuration
  3150. // author, as the remaining fields will be derived from the IDL during
  3151. // the
  3152. // normalization process. It is an error to specify an API interface
  3153. // here
  3154. // which cannot be resolved against the associated IDL files.
  3155. Apis []*Api `json:"apis,omitempty"`
  3156. // Authentication: Auth configuration.
  3157. Authentication *Authentication `json:"authentication,omitempty"`
  3158. // Backend: API backend configuration.
  3159. Backend *Backend `json:"backend,omitempty"`
  3160. // Billing: Billing configuration.
  3161. Billing *Billing `json:"billing,omitempty"`
  3162. // ConfigVersion: The semantic version of the service configuration. The
  3163. // config version
  3164. // affects the interpretation of the service configuration. For
  3165. // example,
  3166. // certain features are enabled by default for certain config
  3167. // versions.
  3168. // The latest config version is `3`.
  3169. ConfigVersion int64 `json:"configVersion,omitempty"`
  3170. // Context: Context configuration.
  3171. Context *Context `json:"context,omitempty"`
  3172. // Control: Configuration for the service control plane.
  3173. Control *Control `json:"control,omitempty"`
  3174. // CustomError: Custom error configuration.
  3175. CustomError *CustomError `json:"customError,omitempty"`
  3176. // Documentation: Additional API documentation.
  3177. Documentation *Documentation `json:"documentation,omitempty"`
  3178. // Endpoints: Configuration for network endpoints. If this is empty,
  3179. // then an endpoint
  3180. // with the same name as the service is automatically generated to
  3181. // service all
  3182. // defined APIs.
  3183. Endpoints []*Endpoint `json:"endpoints,omitempty"`
  3184. // Enums: A list of all enum types included in this API service.
  3185. // Enums
  3186. // referenced directly or indirectly by the `apis` are
  3187. // automatically
  3188. // included. Enums which are not referenced but shall be
  3189. // included
  3190. // should be listed here by name. Example:
  3191. //
  3192. // enums:
  3193. // - name: google.someapi.v1.SomeEnum
  3194. Enums []*Enum `json:"enums,omitempty"`
  3195. // Experimental: Experimental configuration.
  3196. Experimental *Experimental `json:"experimental,omitempty"`
  3197. // Http: HTTP configuration.
  3198. Http *Http `json:"http,omitempty"`
  3199. // Id: A unique ID for a specific instance of this message, typically
  3200. // assigned
  3201. // by the client for tracking purpose. If empty, the server may choose
  3202. // to
  3203. // generate one instead. Must be no longer than 60 characters.
  3204. Id string `json:"id,omitempty"`
  3205. // Logging: Logging configuration.
  3206. Logging *Logging `json:"logging,omitempty"`
  3207. // Logs: Defines the logs used by this service.
  3208. Logs []*LogDescriptor `json:"logs,omitempty"`
  3209. // Metrics: Defines the metrics used by this service.
  3210. Metrics []*MetricDescriptor `json:"metrics,omitempty"`
  3211. // MonitoredResources: Defines the monitored resources used by this
  3212. // service. This is required
  3213. // by the Service.monitoring and Service.logging configurations.
  3214. MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"`
  3215. // Monitoring: Monitoring configuration.
  3216. Monitoring *Monitoring `json:"monitoring,omitempty"`
  3217. // Name: The DNS address at which this service is available,
  3218. // e.g. `calendar.googleapis.com`.
  3219. Name string `json:"name,omitempty"`
  3220. // ProducerProjectId: The Google project that owns this service.
  3221. ProducerProjectId string `json:"producerProjectId,omitempty"`
  3222. // Quota: Quota configuration.
  3223. Quota *Quota `json:"quota,omitempty"`
  3224. // SourceInfo: Output only. The source information for this
  3225. // configuration if available.
  3226. SourceInfo *SourceInfo `json:"sourceInfo,omitempty"`
  3227. // SystemParameters: System parameter configuration.
  3228. SystemParameters *SystemParameters `json:"systemParameters,omitempty"`
  3229. // SystemTypes: A list of all proto message types included in this API
  3230. // service.
  3231. // It serves similar purpose as [google.api.Service.types], except
  3232. // that
  3233. // these types are not needed by user-defined APIs. Therefore, they will
  3234. // not
  3235. // show up in the generated discovery doc. This field should only be
  3236. // used
  3237. // to define system APIs in ESF.
  3238. SystemTypes []*Type `json:"systemTypes,omitempty"`
  3239. // Title: The product title for this service.
  3240. Title string `json:"title,omitempty"`
  3241. // Types: A list of all proto message types included in this API
  3242. // service.
  3243. // Types referenced directly or indirectly by the `apis`
  3244. // are
  3245. // automatically included. Messages which are not referenced but
  3246. // shall be included, such as types used by the `google.protobuf.Any`
  3247. // type,
  3248. // should be listed here by name. Example:
  3249. //
  3250. // types:
  3251. // - name: google.protobuf.Int32
  3252. Types []*Type `json:"types,omitempty"`
  3253. // Usage: Configuration controlling usage of this service.
  3254. Usage *Usage `json:"usage,omitempty"`
  3255. // ForceSendFields is a list of field names (e.g. "Apis") to
  3256. // unconditionally include in API requests. By default, fields with
  3257. // empty values are omitted from API requests. However, any non-pointer,
  3258. // non-interface field appearing in ForceSendFields will be sent to the
  3259. // server regardless of whether the field is empty or not. This may be
  3260. // used to include empty fields in Patch requests.
  3261. ForceSendFields []string `json:"-"`
  3262. // NullFields is a list of field names (e.g. "Apis") to include in API
  3263. // requests with the JSON null value. By default, fields with empty
  3264. // values are omitted from API requests. However, any field with an
  3265. // empty value appearing in NullFields will be sent to the server as
  3266. // null. It is an error if a field in this list has a non-empty value.
  3267. // This may be used to include null fields in Patch requests.
  3268. NullFields []string `json:"-"`
  3269. }
  3270. func (s *Service) MarshalJSON() ([]byte, error) {
  3271. type NoMethod Service
  3272. raw := NoMethod(*s)
  3273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3274. }
  3275. // SourceContext: `SourceContext` represents information about the
  3276. // source of a
  3277. // protobuf element, like the file in which it is defined.
  3278. type SourceContext struct {
  3279. // FileName: The path-qualified name of the .proto file that contained
  3280. // the associated
  3281. // protobuf element. For example:
  3282. // "google/protobuf/source_context.proto".
  3283. FileName string `json:"fileName,omitempty"`
  3284. // ForceSendFields is a list of field names (e.g. "FileName") to
  3285. // unconditionally include in API requests. By default, fields with
  3286. // empty values are omitted from API requests. However, any non-pointer,
  3287. // non-interface field appearing in ForceSendFields will be sent to the
  3288. // server regardless of whether the field is empty or not. This may be
  3289. // used to include empty fields in Patch requests.
  3290. ForceSendFields []string `json:"-"`
  3291. // NullFields is a list of field names (e.g. "FileName") to include in
  3292. // API requests with the JSON null value. By default, fields with empty
  3293. // values are omitted from API requests. However, any field with an
  3294. // empty value appearing in NullFields will be sent to the server as
  3295. // null. It is an error if a field in this list has a non-empty value.
  3296. // This may be used to include null fields in Patch requests.
  3297. NullFields []string `json:"-"`
  3298. }
  3299. func (s *SourceContext) MarshalJSON() ([]byte, error) {
  3300. type NoMethod SourceContext
  3301. raw := NoMethod(*s)
  3302. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3303. }
  3304. // SourceInfo: Source information used to create a Service Config
  3305. type SourceInfo struct {
  3306. // SourceFiles: All files used during config generation.
  3307. SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"`
  3308. // ForceSendFields is a list of field names (e.g. "SourceFiles") to
  3309. // unconditionally include in API requests. By default, fields with
  3310. // empty values are omitted from API requests. However, any non-pointer,
  3311. // non-interface field appearing in ForceSendFields will be sent to the
  3312. // server regardless of whether the field is empty or not. This may be
  3313. // used to include empty fields in Patch requests.
  3314. ForceSendFields []string `json:"-"`
  3315. // NullFields is a list of field names (e.g. "SourceFiles") to include
  3316. // in API requests with the JSON null value. By default, fields with
  3317. // empty values are omitted from API requests. However, any field with
  3318. // an empty value appearing in NullFields will be sent to the server as
  3319. // null. It is an error if a field in this list has a non-empty value.
  3320. // This may be used to include null fields in Patch requests.
  3321. NullFields []string `json:"-"`
  3322. }
  3323. func (s *SourceInfo) MarshalJSON() ([]byte, error) {
  3324. type NoMethod SourceInfo
  3325. raw := NoMethod(*s)
  3326. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3327. }
  3328. // Status: The `Status` type defines a logical error model that is
  3329. // suitable for different
  3330. // programming environments, including REST APIs and RPC APIs. It is
  3331. // used by
  3332. // [gRPC](https://github.com/grpc). The error model is designed to
  3333. // be:
  3334. //
  3335. // - Simple to use and understand for most users
  3336. // - Flexible enough to meet unexpected needs
  3337. //
  3338. // # Overview
  3339. //
  3340. // The `Status` message contains three pieces of data: error code, error
  3341. // message,
  3342. // and error details. The error code should be an enum value
  3343. // of
  3344. // google.rpc.Code, but it may accept additional error codes if needed.
  3345. // The
  3346. // error message should be a developer-facing English message that
  3347. // helps
  3348. // developers *understand* and *resolve* the error. If a localized
  3349. // user-facing
  3350. // error message is needed, put the localized message in the error
  3351. // details or
  3352. // localize it in the client. The optional error details may contain
  3353. // arbitrary
  3354. // information about the error. There is a predefined set of error
  3355. // detail types
  3356. // in the package `google.rpc` that can be used for common error
  3357. // conditions.
  3358. //
  3359. // # Language mapping
  3360. //
  3361. // The `Status` message is the logical representation of the error
  3362. // model, but it
  3363. // is not necessarily the actual wire format. When the `Status` message
  3364. // is
  3365. // exposed in different client libraries and different wire protocols,
  3366. // it can be
  3367. // mapped differently. For example, it will likely be mapped to some
  3368. // exceptions
  3369. // in Java, but more likely mapped to some error codes in C.
  3370. //
  3371. // # Other uses
  3372. //
  3373. // The error model and the `Status` message can be used in a variety
  3374. // of
  3375. // environments, either with or without APIs, to provide a
  3376. // consistent developer experience across different
  3377. // environments.
  3378. //
  3379. // Example uses of this error model include:
  3380. //
  3381. // - Partial errors. If a service needs to return partial errors to the
  3382. // client,
  3383. // it may embed the `Status` in the normal response to indicate the
  3384. // partial
  3385. // errors.
  3386. //
  3387. // - Workflow errors. A typical workflow has multiple steps. Each step
  3388. // may
  3389. // have a `Status` message for error reporting.
  3390. //
  3391. // - Batch operations. If a client uses batch request and batch
  3392. // response, the
  3393. // `Status` message should be used directly inside batch response,
  3394. // one for
  3395. // each error sub-response.
  3396. //
  3397. // - Asynchronous operations. If an API call embeds asynchronous
  3398. // operation
  3399. // results in its response, the status of those operations should
  3400. // be
  3401. // represented directly using the `Status` message.
  3402. //
  3403. // - Logging. If some API errors are stored in logs, the message
  3404. // `Status` could
  3405. // be used directly after any stripping needed for security/privacy
  3406. // reasons.
  3407. type Status struct {
  3408. // Code: The status code, which should be an enum value of
  3409. // google.rpc.Code.
  3410. Code int64 `json:"code,omitempty"`
  3411. // Details: A list of messages that carry the error details. There is a
  3412. // common set of
  3413. // message types for APIs to use.
  3414. Details []googleapi.RawMessage `json:"details,omitempty"`
  3415. // Message: A developer-facing error message, which should be in
  3416. // English. Any
  3417. // user-facing error message should be localized and sent in
  3418. // the
  3419. // google.rpc.Status.details field, or localized by the client.
  3420. Message string `json:"message,omitempty"`
  3421. // ForceSendFields is a list of field names (e.g. "Code") to
  3422. // unconditionally include in API requests. By default, fields with
  3423. // empty values are omitted from API requests. However, any non-pointer,
  3424. // non-interface field appearing in ForceSendFields will be sent to the
  3425. // server regardless of whether the field is empty or not. This may be
  3426. // used to include empty fields in Patch requests.
  3427. ForceSendFields []string `json:"-"`
  3428. // NullFields is a list of field names (e.g. "Code") to include in API
  3429. // requests with the JSON null value. By default, fields with empty
  3430. // values are omitted from API requests. However, any field with an
  3431. // empty value appearing in NullFields will be sent to the server as
  3432. // null. It is an error if a field in this list has a non-empty value.
  3433. // This may be used to include null fields in Patch requests.
  3434. NullFields []string `json:"-"`
  3435. }
  3436. func (s *Status) MarshalJSON() ([]byte, error) {
  3437. type NoMethod Status
  3438. raw := NoMethod(*s)
  3439. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3440. }
  3441. // Step: Represents the status of one operation step.
  3442. type Step struct {
  3443. // Description: The short description of the step.
  3444. Description string `json:"description,omitempty"`
  3445. // Status: The status code.
  3446. //
  3447. // Possible values:
  3448. // "STATUS_UNSPECIFIED" - Unspecifed code.
  3449. // "DONE" - The operation or step has completed without errors.
  3450. // "NOT_STARTED" - The operation or step has not started yet.
  3451. // "IN_PROGRESS" - The operation or step is in progress.
  3452. // "FAILED" - The operation or step has completed with errors. If the
  3453. // operation is
  3454. // rollbackable, the rollback completed with errors too.
  3455. // "CANCELLED" - The operation or step has completed with
  3456. // cancellation.
  3457. Status string `json:"status,omitempty"`
  3458. // ForceSendFields is a list of field names (e.g. "Description") to
  3459. // unconditionally include in API requests. By default, fields with
  3460. // empty values are omitted from API requests. However, any non-pointer,
  3461. // non-interface field appearing in ForceSendFields will be sent to the
  3462. // server regardless of whether the field is empty or not. This may be
  3463. // used to include empty fields in Patch requests.
  3464. ForceSendFields []string `json:"-"`
  3465. // NullFields is a list of field names (e.g. "Description") to include
  3466. // in API requests with the JSON null value. By default, fields with
  3467. // empty values are omitted from API requests. However, any field with
  3468. // an empty value appearing in NullFields will be sent to the server as
  3469. // null. It is an error if a field in this list has a non-empty value.
  3470. // This may be used to include null fields in Patch requests.
  3471. NullFields []string `json:"-"`
  3472. }
  3473. func (s *Step) MarshalJSON() ([]byte, error) {
  3474. type NoMethod Step
  3475. raw := NoMethod(*s)
  3476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3477. }
  3478. // SystemParameter: Define a parameter's name and location. The
  3479. // parameter may be passed as either
  3480. // an HTTP header or a URL query parameter, and if both are passed the
  3481. // behavior
  3482. // is implementation-dependent.
  3483. type SystemParameter struct {
  3484. // HttpHeader: Define the HTTP header name to use for the parameter. It
  3485. // is case
  3486. // insensitive.
  3487. HttpHeader string `json:"httpHeader,omitempty"`
  3488. // Name: Define the name of the parameter, such as "api_key" . It is
  3489. // case sensitive.
  3490. Name string `json:"name,omitempty"`
  3491. // UrlQueryParameter: Define the URL query parameter name to use for the
  3492. // parameter. It is case
  3493. // sensitive.
  3494. UrlQueryParameter string `json:"urlQueryParameter,omitempty"`
  3495. // ForceSendFields is a list of field names (e.g. "HttpHeader") to
  3496. // unconditionally include in API requests. By default, fields with
  3497. // empty values are omitted from API requests. However, any non-pointer,
  3498. // non-interface field appearing in ForceSendFields will be sent to the
  3499. // server regardless of whether the field is empty or not. This may be
  3500. // used to include empty fields in Patch requests.
  3501. ForceSendFields []string `json:"-"`
  3502. // NullFields is a list of field names (e.g. "HttpHeader") to include in
  3503. // API requests with the JSON null value. By default, fields with empty
  3504. // values are omitted from API requests. However, any field with an
  3505. // empty value appearing in NullFields will be sent to the server as
  3506. // null. It is an error if a field in this list has a non-empty value.
  3507. // This may be used to include null fields in Patch requests.
  3508. NullFields []string `json:"-"`
  3509. }
  3510. func (s *SystemParameter) MarshalJSON() ([]byte, error) {
  3511. type NoMethod SystemParameter
  3512. raw := NoMethod(*s)
  3513. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3514. }
  3515. // SystemParameterRule: Define a system parameter rule mapping system
  3516. // parameter definitions to
  3517. // methods.
  3518. type SystemParameterRule struct {
  3519. // Parameters: Define parameters. Multiple names may be defined for a
  3520. // parameter.
  3521. // For a given method call, only one of them should be used. If
  3522. // multiple
  3523. // names are used the behavior is implementation-dependent.
  3524. // If none of the specified names are present the behavior
  3525. // is
  3526. // parameter-dependent.
  3527. Parameters []*SystemParameter `json:"parameters,omitempty"`
  3528. // Selector: Selects the methods to which this rule applies. Use '*' to
  3529. // indicate all
  3530. // methods in all APIs.
  3531. //
  3532. // Refer to selector for syntax details.
  3533. Selector string `json:"selector,omitempty"`
  3534. // ForceSendFields is a list of field names (e.g. "Parameters") to
  3535. // unconditionally include in API requests. By default, fields with
  3536. // empty values are omitted from API requests. However, any non-pointer,
  3537. // non-interface field appearing in ForceSendFields will be sent to the
  3538. // server regardless of whether the field is empty or not. This may be
  3539. // used to include empty fields in Patch requests.
  3540. ForceSendFields []string `json:"-"`
  3541. // NullFields is a list of field names (e.g. "Parameters") to include in
  3542. // API requests with the JSON null value. By default, fields with empty
  3543. // values are omitted from API requests. However, any field with an
  3544. // empty value appearing in NullFields will be sent to the server as
  3545. // null. It is an error if a field in this list has a non-empty value.
  3546. // This may be used to include null fields in Patch requests.
  3547. NullFields []string `json:"-"`
  3548. }
  3549. func (s *SystemParameterRule) MarshalJSON() ([]byte, error) {
  3550. type NoMethod SystemParameterRule
  3551. raw := NoMethod(*s)
  3552. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3553. }
  3554. // SystemParameters: ### System parameter configuration
  3555. //
  3556. // A system parameter is a special kind of parameter defined by the
  3557. // API
  3558. // system, not by an individual API. It is typically mapped to an HTTP
  3559. // header
  3560. // and/or a URL query parameter. This configuration specifies which
  3561. // methods
  3562. // change the names of the system parameters.
  3563. type SystemParameters struct {
  3564. // Rules: Define system parameters.
  3565. //
  3566. // The parameters defined here will override the default
  3567. // parameters
  3568. // implemented by the system. If this field is missing from the
  3569. // service
  3570. // config, default system parameters will be used. Default system
  3571. // parameters
  3572. // and names is implementation-dependent.
  3573. //
  3574. // Example: define api key for all methods
  3575. //
  3576. // system_parameters
  3577. // rules:
  3578. // - selector: "*"
  3579. // parameters:
  3580. // - name: api_key
  3581. // url_query_parameter: api_key
  3582. //
  3583. //
  3584. // Example: define 2 api key names for a specific method.
  3585. //
  3586. // system_parameters
  3587. // rules:
  3588. // - selector: "/ListShelves"
  3589. // parameters:
  3590. // - name: api_key
  3591. // http_header: Api-Key1
  3592. // - name: api_key
  3593. // http_header: Api-Key2
  3594. //
  3595. // **NOTE:** All service configuration rules follow "last one wins"
  3596. // order.
  3597. Rules []*SystemParameterRule `json:"rules,omitempty"`
  3598. // ForceSendFields is a list of field names (e.g. "Rules") to
  3599. // unconditionally include in API requests. By default, fields with
  3600. // empty values are omitted from API requests. However, any non-pointer,
  3601. // non-interface field appearing in ForceSendFields will be sent to the
  3602. // server regardless of whether the field is empty or not. This may be
  3603. // used to include empty fields in Patch requests.
  3604. ForceSendFields []string `json:"-"`
  3605. // NullFields is a list of field names (e.g. "Rules") to include in API
  3606. // requests with the JSON null value. By default, fields with empty
  3607. // values are omitted from API requests. However, any field with an
  3608. // empty value appearing in NullFields will be sent to the server as
  3609. // null. It is an error if a field in this list has a non-empty value.
  3610. // This may be used to include null fields in Patch requests.
  3611. NullFields []string `json:"-"`
  3612. }
  3613. func (s *SystemParameters) MarshalJSON() ([]byte, error) {
  3614. type NoMethod SystemParameters
  3615. raw := NoMethod(*s)
  3616. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3617. }
  3618. // Type: A protocol buffer message type.
  3619. type Type struct {
  3620. // Fields: The list of fields.
  3621. Fields []*Field `json:"fields,omitempty"`
  3622. // Name: The fully qualified message name.
  3623. Name string `json:"name,omitempty"`
  3624. // Oneofs: The list of types appearing in `oneof` definitions in this
  3625. // type.
  3626. Oneofs []string `json:"oneofs,omitempty"`
  3627. // Options: The protocol buffer options.
  3628. Options []*Option `json:"options,omitempty"`
  3629. // SourceContext: The source context.
  3630. SourceContext *SourceContext `json:"sourceContext,omitempty"`
  3631. // Syntax: The source syntax.
  3632. //
  3633. // Possible values:
  3634. // "SYNTAX_PROTO2" - Syntax `proto2`.
  3635. // "SYNTAX_PROTO3" - Syntax `proto3`.
  3636. Syntax string `json:"syntax,omitempty"`
  3637. // ForceSendFields is a list of field names (e.g. "Fields") to
  3638. // unconditionally include in API requests. By default, fields with
  3639. // empty values are omitted from API requests. However, any non-pointer,
  3640. // non-interface field appearing in ForceSendFields will be sent to the
  3641. // server regardless of whether the field is empty or not. This may be
  3642. // used to include empty fields in Patch requests.
  3643. ForceSendFields []string `json:"-"`
  3644. // NullFields is a list of field names (e.g. "Fields") to include in API
  3645. // requests with the JSON null value. By default, fields with empty
  3646. // values are omitted from API requests. However, any field with an
  3647. // empty value appearing in NullFields will be sent to the server as
  3648. // null. It is an error if a field in this list has a non-empty value.
  3649. // This may be used to include null fields in Patch requests.
  3650. NullFields []string `json:"-"`
  3651. }
  3652. func (s *Type) MarshalJSON() ([]byte, error) {
  3653. type NoMethod Type
  3654. raw := NoMethod(*s)
  3655. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3656. }
  3657. // Usage: Configuration controlling usage of a service.
  3658. type Usage struct {
  3659. // ProducerNotificationChannel: The full resource name of a channel used
  3660. // for sending notifications to the
  3661. // service producer.
  3662. //
  3663. // Google Service Management currently only supports
  3664. // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a
  3665. // notification
  3666. // channel. To use Google Cloud Pub/Sub as the channel, this must be the
  3667. // name
  3668. // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name
  3669. // format
  3670. // documented in https://cloud.google.com/pubsub/docs/overview.
  3671. ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"`
  3672. // Requirements: Requirements that must be satisfied before a consumer
  3673. // project can use the
  3674. // service. Each requirement is of the form
  3675. // <service.name>/<requirement-id>;
  3676. // for example 'serviceusage.googleapis.com/billing-enabled'.
  3677. Requirements []string `json:"requirements,omitempty"`
  3678. // Rules: A list of usage rules that apply to individual API
  3679. // methods.
  3680. //
  3681. // **NOTE:** All service configuration rules follow "last one wins"
  3682. // order.
  3683. Rules []*UsageRule `json:"rules,omitempty"`
  3684. // ForceSendFields is a list of field names (e.g.
  3685. // "ProducerNotificationChannel") to unconditionally include in API
  3686. // requests. By default, fields with empty values are omitted from API
  3687. // requests. However, any non-pointer, non-interface field appearing in
  3688. // ForceSendFields will be sent to the server regardless of whether the
  3689. // field is empty or not. This may be used to include empty fields in
  3690. // Patch requests.
  3691. ForceSendFields []string `json:"-"`
  3692. // NullFields is a list of field names (e.g.
  3693. // "ProducerNotificationChannel") to include in API requests with the
  3694. // JSON null value. By default, fields with empty values are omitted
  3695. // from API requests. However, any field with an empty value appearing
  3696. // in NullFields will be sent to the server as null. It is an error if a
  3697. // field in this list has a non-empty value. This may be used to include
  3698. // null fields in Patch requests.
  3699. NullFields []string `json:"-"`
  3700. }
  3701. func (s *Usage) MarshalJSON() ([]byte, error) {
  3702. type NoMethod Usage
  3703. raw := NoMethod(*s)
  3704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3705. }
  3706. // UsageRule: Usage configuration rules for the service.
  3707. //
  3708. // NOTE: Under development.
  3709. //
  3710. //
  3711. // Use this rule to configure unregistered calls for the service.
  3712. // Unregistered
  3713. // calls are calls that do not contain consumer project
  3714. // identity.
  3715. // (Example: calls that do not contain an API key).
  3716. // By default, API methods do not allow unregistered calls, and each
  3717. // method call
  3718. // must be identified by a consumer project identity. Use this rule
  3719. // to
  3720. // allow/disallow unregistered calls.
  3721. //
  3722. // Example of an API that wants to allow unregistered calls for entire
  3723. // service.
  3724. //
  3725. // usage:
  3726. // rules:
  3727. // - selector: "*"
  3728. // allow_unregistered_calls: true
  3729. //
  3730. // Example of a method that wants to allow unregistered calls.
  3731. //
  3732. // usage:
  3733. // rules:
  3734. // - selector:
  3735. // "google.example.library.v1.LibraryService.CreateBook"
  3736. // allow_unregistered_calls: true
  3737. type UsageRule struct {
  3738. // AllowUnregisteredCalls: If true, the selected method allows
  3739. // unregistered calls, e.g. calls
  3740. // that don't identify any user or application.
  3741. AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"`
  3742. // Selector: Selects the methods to which this rule applies. Use '*' to
  3743. // indicate all
  3744. // methods in all APIs.
  3745. //
  3746. // Refer to selector for syntax details.
  3747. Selector string `json:"selector,omitempty"`
  3748. // SkipServiceControl: If true, the selected method should skip service
  3749. // control and the control
  3750. // plane features, such as quota and billing, will not be
  3751. // available.
  3752. // This flag is used by Google Cloud Endpoints to bypass checks for
  3753. // internal
  3754. // methods, such as service health check methods.
  3755. SkipServiceControl bool `json:"skipServiceControl,omitempty"`
  3756. // ForceSendFields is a list of field names (e.g.
  3757. // "AllowUnregisteredCalls") to unconditionally include in API requests.
  3758. // By default, fields with empty values are omitted from API requests.
  3759. // However, any non-pointer, non-interface field appearing in
  3760. // ForceSendFields will be sent to the server regardless of whether the
  3761. // field is empty or not. This may be used to include empty fields in
  3762. // Patch requests.
  3763. ForceSendFields []string `json:"-"`
  3764. // NullFields is a list of field names (e.g. "AllowUnregisteredCalls")
  3765. // to include in API requests with the JSON null value. By default,
  3766. // fields with empty values are omitted from API requests. However, any
  3767. // field with an empty value appearing in NullFields will be sent to the
  3768. // server as null. It is an error if a field in this list has a
  3769. // non-empty value. This may be used to include null fields in Patch
  3770. // requests.
  3771. NullFields []string `json:"-"`
  3772. }
  3773. func (s *UsageRule) MarshalJSON() ([]byte, error) {
  3774. type NoMethod UsageRule
  3775. raw := NoMethod(*s)
  3776. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3777. }
  3778. // method id "serviceuser.projects.services.disable":
  3779. type ProjectsServicesDisableCall struct {
  3780. s *APIService
  3781. name string
  3782. disableservicerequest *DisableServiceRequest
  3783. urlParams_ gensupport.URLParams
  3784. ctx_ context.Context
  3785. header_ http.Header
  3786. }
  3787. // Disable: Disable a service so it can no longer be used with
  3788. // a
  3789. // project. This prevents unintended usage that may cause unexpected
  3790. // billing
  3791. // charges or security leaks.
  3792. //
  3793. // Operation<response: google.protobuf.Empty>
  3794. func (r *ProjectsServicesService) Disable(name string, disableservicerequest *DisableServiceRequest) *ProjectsServicesDisableCall {
  3795. c := &ProjectsServicesDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3796. c.name = name
  3797. c.disableservicerequest = disableservicerequest
  3798. return c
  3799. }
  3800. // Fields allows partial responses to be retrieved. See
  3801. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3802. // for more information.
  3803. func (c *ProjectsServicesDisableCall) Fields(s ...googleapi.Field) *ProjectsServicesDisableCall {
  3804. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3805. return c
  3806. }
  3807. // Context sets the context to be used in this call's Do method. Any
  3808. // pending HTTP request will be aborted if the provided context is
  3809. // canceled.
  3810. func (c *ProjectsServicesDisableCall) Context(ctx context.Context) *ProjectsServicesDisableCall {
  3811. c.ctx_ = ctx
  3812. return c
  3813. }
  3814. // Header returns an http.Header that can be modified by the caller to
  3815. // add HTTP headers to the request.
  3816. func (c *ProjectsServicesDisableCall) Header() http.Header {
  3817. if c.header_ == nil {
  3818. c.header_ = make(http.Header)
  3819. }
  3820. return c.header_
  3821. }
  3822. func (c *ProjectsServicesDisableCall) doRequest(alt string) (*http.Response, error) {
  3823. reqHeaders := make(http.Header)
  3824. for k, v := range c.header_ {
  3825. reqHeaders[k] = v
  3826. }
  3827. reqHeaders.Set("User-Agent", c.s.userAgent())
  3828. var body io.Reader = nil
  3829. body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableservicerequest)
  3830. if err != nil {
  3831. return nil, err
  3832. }
  3833. reqHeaders.Set("Content-Type", "application/json")
  3834. c.urlParams_.Set("alt", alt)
  3835. c.urlParams_.Set("prettyPrint", "false")
  3836. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable")
  3837. urls += "?" + c.urlParams_.Encode()
  3838. req, err := http.NewRequest("POST", urls, body)
  3839. if err != nil {
  3840. return nil, err
  3841. }
  3842. req.Header = reqHeaders
  3843. googleapi.Expand(req.URL, map[string]string{
  3844. "name": c.name,
  3845. })
  3846. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3847. }
  3848. // Do executes the "serviceuser.projects.services.disable" call.
  3849. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3850. // status code is an error. Response headers are in either
  3851. // *Operation.ServerResponse.Header or (if a response was returned at
  3852. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3853. // to check whether the returned error was because
  3854. // http.StatusNotModified was returned.
  3855. func (c *ProjectsServicesDisableCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3856. gensupport.SetOptions(c.urlParams_, opts...)
  3857. res, err := c.doRequest("json")
  3858. if res != nil && res.StatusCode == http.StatusNotModified {
  3859. if res.Body != nil {
  3860. res.Body.Close()
  3861. }
  3862. return nil, &googleapi.Error{
  3863. Code: res.StatusCode,
  3864. Header: res.Header,
  3865. }
  3866. }
  3867. if err != nil {
  3868. return nil, err
  3869. }
  3870. defer googleapi.CloseBody(res)
  3871. if err := googleapi.CheckResponse(res); err != nil {
  3872. return nil, err
  3873. }
  3874. ret := &Operation{
  3875. ServerResponse: googleapi.ServerResponse{
  3876. Header: res.Header,
  3877. HTTPStatusCode: res.StatusCode,
  3878. },
  3879. }
  3880. target := &ret
  3881. if err := gensupport.DecodeResponse(target, res); err != nil {
  3882. return nil, err
  3883. }
  3884. return ret, nil
  3885. // {
  3886. // "description": "Disable a service so it can no longer be used with a\nproject. This prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e",
  3887. // "flatPath": "v1/projects/{projectsId}/services/{servicesId}:disable",
  3888. // "httpMethod": "POST",
  3889. // "id": "serviceuser.projects.services.disable",
  3890. // "parameterOrder": [
  3891. // "name"
  3892. // ],
  3893. // "parameters": {
  3894. // "name": {
  3895. // "description": "Name of the consumer and the service to disable for that consumer.\n\nThe Service User implementation accepts the following forms for consumer:\n- \"project:\u003cproject_id\u003e\"\n\nA valid path would be:\n- projects/my-project/services/servicemanagement.googleapis.com",
  3896. // "location": "path",
  3897. // "pattern": "^projects/[^/]+/services/[^/]+$",
  3898. // "required": true,
  3899. // "type": "string"
  3900. // }
  3901. // },
  3902. // "path": "v1/{+name}:disable",
  3903. // "request": {
  3904. // "$ref": "DisableServiceRequest"
  3905. // },
  3906. // "response": {
  3907. // "$ref": "Operation"
  3908. // },
  3909. // "scopes": [
  3910. // "https://www.googleapis.com/auth/cloud-platform",
  3911. // "https://www.googleapis.com/auth/service.management"
  3912. // ]
  3913. // }
  3914. }
  3915. // method id "serviceuser.projects.services.enable":
  3916. type ProjectsServicesEnableCall struct {
  3917. s *APIService
  3918. name string
  3919. enableservicerequest *EnableServiceRequest
  3920. urlParams_ gensupport.URLParams
  3921. ctx_ context.Context
  3922. header_ http.Header
  3923. }
  3924. // Enable: Enable a service so it can be used with a project.
  3925. // See [Cloud Auth Guide](https://cloud.google.com/docs/authentication)
  3926. // for
  3927. // more information.
  3928. //
  3929. // Operation<response: google.protobuf.Empty>
  3930. func (r *ProjectsServicesService) Enable(name string, enableservicerequest *EnableServiceRequest) *ProjectsServicesEnableCall {
  3931. c := &ProjectsServicesEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3932. c.name = name
  3933. c.enableservicerequest = enableservicerequest
  3934. return c
  3935. }
  3936. // Fields allows partial responses to be retrieved. See
  3937. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3938. // for more information.
  3939. func (c *ProjectsServicesEnableCall) Fields(s ...googleapi.Field) *ProjectsServicesEnableCall {
  3940. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3941. return c
  3942. }
  3943. // Context sets the context to be used in this call's Do method. Any
  3944. // pending HTTP request will be aborted if the provided context is
  3945. // canceled.
  3946. func (c *ProjectsServicesEnableCall) Context(ctx context.Context) *ProjectsServicesEnableCall {
  3947. c.ctx_ = ctx
  3948. return c
  3949. }
  3950. // Header returns an http.Header that can be modified by the caller to
  3951. // add HTTP headers to the request.
  3952. func (c *ProjectsServicesEnableCall) Header() http.Header {
  3953. if c.header_ == nil {
  3954. c.header_ = make(http.Header)
  3955. }
  3956. return c.header_
  3957. }
  3958. func (c *ProjectsServicesEnableCall) doRequest(alt string) (*http.Response, error) {
  3959. reqHeaders := make(http.Header)
  3960. for k, v := range c.header_ {
  3961. reqHeaders[k] = v
  3962. }
  3963. reqHeaders.Set("User-Agent", c.s.userAgent())
  3964. var body io.Reader = nil
  3965. body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableservicerequest)
  3966. if err != nil {
  3967. return nil, err
  3968. }
  3969. reqHeaders.Set("Content-Type", "application/json")
  3970. c.urlParams_.Set("alt", alt)
  3971. c.urlParams_.Set("prettyPrint", "false")
  3972. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable")
  3973. urls += "?" + c.urlParams_.Encode()
  3974. req, err := http.NewRequest("POST", urls, body)
  3975. if err != nil {
  3976. return nil, err
  3977. }
  3978. req.Header = reqHeaders
  3979. googleapi.Expand(req.URL, map[string]string{
  3980. "name": c.name,
  3981. })
  3982. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3983. }
  3984. // Do executes the "serviceuser.projects.services.enable" call.
  3985. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3986. // status code is an error. Response headers are in either
  3987. // *Operation.ServerResponse.Header or (if a response was returned at
  3988. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3989. // to check whether the returned error was because
  3990. // http.StatusNotModified was returned.
  3991. func (c *ProjectsServicesEnableCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3992. gensupport.SetOptions(c.urlParams_, opts...)
  3993. res, err := c.doRequest("json")
  3994. if res != nil && res.StatusCode == http.StatusNotModified {
  3995. if res.Body != nil {
  3996. res.Body.Close()
  3997. }
  3998. return nil, &googleapi.Error{
  3999. Code: res.StatusCode,
  4000. Header: res.Header,
  4001. }
  4002. }
  4003. if err != nil {
  4004. return nil, err
  4005. }
  4006. defer googleapi.CloseBody(res)
  4007. if err := googleapi.CheckResponse(res); err != nil {
  4008. return nil, err
  4009. }
  4010. ret := &Operation{
  4011. ServerResponse: googleapi.ServerResponse{
  4012. Header: res.Header,
  4013. HTTPStatusCode: res.StatusCode,
  4014. },
  4015. }
  4016. target := &ret
  4017. if err := gensupport.DecodeResponse(target, res); err != nil {
  4018. return nil, err
  4019. }
  4020. return ret, nil
  4021. // {
  4022. // "description": "Enable a service so it can be used with a project.\nSee [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e",
  4023. // "flatPath": "v1/projects/{projectsId}/services/{servicesId}:enable",
  4024. // "httpMethod": "POST",
  4025. // "id": "serviceuser.projects.services.enable",
  4026. // "parameterOrder": [
  4027. // "name"
  4028. // ],
  4029. // "parameters": {
  4030. // "name": {
  4031. // "description": "Name of the consumer and the service to enable for that consumer.\n\nA valid path would be:\n- projects/my-project/services/servicemanagement.googleapis.com",
  4032. // "location": "path",
  4033. // "pattern": "^projects/[^/]+/services/[^/]+$",
  4034. // "required": true,
  4035. // "type": "string"
  4036. // }
  4037. // },
  4038. // "path": "v1/{+name}:enable",
  4039. // "request": {
  4040. // "$ref": "EnableServiceRequest"
  4041. // },
  4042. // "response": {
  4043. // "$ref": "Operation"
  4044. // },
  4045. // "scopes": [
  4046. // "https://www.googleapis.com/auth/cloud-platform",
  4047. // "https://www.googleapis.com/auth/service.management"
  4048. // ]
  4049. // }
  4050. }
  4051. // method id "serviceuser.projects.services.list":
  4052. type ProjectsServicesListCall struct {
  4053. s *APIService
  4054. parent string
  4055. urlParams_ gensupport.URLParams
  4056. ifNoneMatch_ string
  4057. ctx_ context.Context
  4058. header_ http.Header
  4059. }
  4060. // List: List enabled services for the specified consumer.
  4061. func (r *ProjectsServicesService) List(parent string) *ProjectsServicesListCall {
  4062. c := &ProjectsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4063. c.parent = parent
  4064. return c
  4065. }
  4066. // PageSize sets the optional parameter "pageSize": Requested size of
  4067. // the next page of data.
  4068. func (c *ProjectsServicesListCall) PageSize(pageSize int64) *ProjectsServicesListCall {
  4069. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4070. return c
  4071. }
  4072. // PageToken sets the optional parameter "pageToken": Token identifying
  4073. // which result to start with; returned by a previous list
  4074. // call.
  4075. func (c *ProjectsServicesListCall) PageToken(pageToken string) *ProjectsServicesListCall {
  4076. c.urlParams_.Set("pageToken", pageToken)
  4077. return c
  4078. }
  4079. // Fields allows partial responses to be retrieved. See
  4080. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4081. // for more information.
  4082. func (c *ProjectsServicesListCall) Fields(s ...googleapi.Field) *ProjectsServicesListCall {
  4083. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4084. return c
  4085. }
  4086. // IfNoneMatch sets the optional parameter which makes the operation
  4087. // fail if the object's ETag matches the given value. This is useful for
  4088. // getting updates only after the object has changed since the last
  4089. // request. Use googleapi.IsNotModified to check whether the response
  4090. // error from Do is the result of In-None-Match.
  4091. func (c *ProjectsServicesListCall) IfNoneMatch(entityTag string) *ProjectsServicesListCall {
  4092. c.ifNoneMatch_ = entityTag
  4093. return c
  4094. }
  4095. // Context sets the context to be used in this call's Do method. Any
  4096. // pending HTTP request will be aborted if the provided context is
  4097. // canceled.
  4098. func (c *ProjectsServicesListCall) Context(ctx context.Context) *ProjectsServicesListCall {
  4099. c.ctx_ = ctx
  4100. return c
  4101. }
  4102. // Header returns an http.Header that can be modified by the caller to
  4103. // add HTTP headers to the request.
  4104. func (c *ProjectsServicesListCall) Header() http.Header {
  4105. if c.header_ == nil {
  4106. c.header_ = make(http.Header)
  4107. }
  4108. return c.header_
  4109. }
  4110. func (c *ProjectsServicesListCall) doRequest(alt string) (*http.Response, error) {
  4111. reqHeaders := make(http.Header)
  4112. for k, v := range c.header_ {
  4113. reqHeaders[k] = v
  4114. }
  4115. reqHeaders.Set("User-Agent", c.s.userAgent())
  4116. if c.ifNoneMatch_ != "" {
  4117. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4118. }
  4119. var body io.Reader = nil
  4120. c.urlParams_.Set("alt", alt)
  4121. c.urlParams_.Set("prettyPrint", "false")
  4122. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services")
  4123. urls += "?" + c.urlParams_.Encode()
  4124. req, err := http.NewRequest("GET", urls, body)
  4125. if err != nil {
  4126. return nil, err
  4127. }
  4128. req.Header = reqHeaders
  4129. googleapi.Expand(req.URL, map[string]string{
  4130. "parent": c.parent,
  4131. })
  4132. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4133. }
  4134. // Do executes the "serviceuser.projects.services.list" call.
  4135. // Exactly one of *ListEnabledServicesResponse or error will be non-nil.
  4136. // Any non-2xx status code is an error. Response headers are in either
  4137. // *ListEnabledServicesResponse.ServerResponse.Header or (if a response
  4138. // was returned at all) in error.(*googleapi.Error).Header. Use
  4139. // googleapi.IsNotModified to check whether the returned error was
  4140. // because http.StatusNotModified was returned.
  4141. func (c *ProjectsServicesListCall) Do(opts ...googleapi.CallOption) (*ListEnabledServicesResponse, error) {
  4142. gensupport.SetOptions(c.urlParams_, opts...)
  4143. res, err := c.doRequest("json")
  4144. if res != nil && res.StatusCode == http.StatusNotModified {
  4145. if res.Body != nil {
  4146. res.Body.Close()
  4147. }
  4148. return nil, &googleapi.Error{
  4149. Code: res.StatusCode,
  4150. Header: res.Header,
  4151. }
  4152. }
  4153. if err != nil {
  4154. return nil, err
  4155. }
  4156. defer googleapi.CloseBody(res)
  4157. if err := googleapi.CheckResponse(res); err != nil {
  4158. return nil, err
  4159. }
  4160. ret := &ListEnabledServicesResponse{
  4161. ServerResponse: googleapi.ServerResponse{
  4162. Header: res.Header,
  4163. HTTPStatusCode: res.StatusCode,
  4164. },
  4165. }
  4166. target := &ret
  4167. if err := gensupport.DecodeResponse(target, res); err != nil {
  4168. return nil, err
  4169. }
  4170. return ret, nil
  4171. // {
  4172. // "description": "List enabled services for the specified consumer.",
  4173. // "flatPath": "v1/projects/{projectsId}/services",
  4174. // "httpMethod": "GET",
  4175. // "id": "serviceuser.projects.services.list",
  4176. // "parameterOrder": [
  4177. // "parent"
  4178. // ],
  4179. // "parameters": {
  4180. // "pageSize": {
  4181. // "description": "Requested size of the next page of data.",
  4182. // "format": "int32",
  4183. // "location": "query",
  4184. // "type": "integer"
  4185. // },
  4186. // "pageToken": {
  4187. // "description": "Token identifying which result to start with; returned by a previous list\ncall.",
  4188. // "location": "query",
  4189. // "type": "string"
  4190. // },
  4191. // "parent": {
  4192. // "description": "List enabled services for the specified parent.\n\nAn example valid parent would be:\n- projects/my-project",
  4193. // "location": "path",
  4194. // "pattern": "^projects/[^/]+$",
  4195. // "required": true,
  4196. // "type": "string"
  4197. // }
  4198. // },
  4199. // "path": "v1/{+parent}/services",
  4200. // "response": {
  4201. // "$ref": "ListEnabledServicesResponse"
  4202. // },
  4203. // "scopes": [
  4204. // "https://www.googleapis.com/auth/cloud-platform",
  4205. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4206. // ]
  4207. // }
  4208. }
  4209. // Pages invokes f for each page of results.
  4210. // A non-nil error returned from f will halt the iteration.
  4211. // The provided context supersedes any context provided to the Context method.
  4212. func (c *ProjectsServicesListCall) Pages(ctx context.Context, f func(*ListEnabledServicesResponse) error) error {
  4213. c.ctx_ = ctx
  4214. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4215. for {
  4216. x, err := c.Do()
  4217. if err != nil {
  4218. return err
  4219. }
  4220. if err := f(x); err != nil {
  4221. return err
  4222. }
  4223. if x.NextPageToken == "" {
  4224. return nil
  4225. }
  4226. c.PageToken(x.NextPageToken)
  4227. }
  4228. }
  4229. // method id "serviceuser.services.search":
  4230. type ServicesSearchCall struct {
  4231. s *APIService
  4232. urlParams_ gensupport.URLParams
  4233. ifNoneMatch_ string
  4234. ctx_ context.Context
  4235. header_ http.Header
  4236. }
  4237. // Search: Search available services.
  4238. //
  4239. // When no filter is specified, returns all accessible services.
  4240. // For
  4241. // authenticated users, also returns all services the calling user
  4242. // has
  4243. // "servicemanagement.services.bind" permission for.
  4244. func (r *ServicesService) Search() *ServicesSearchCall {
  4245. c := &ServicesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4246. return c
  4247. }
  4248. // PageSize sets the optional parameter "pageSize": Requested size of
  4249. // the next page of data.
  4250. func (c *ServicesSearchCall) PageSize(pageSize int64) *ServicesSearchCall {
  4251. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4252. return c
  4253. }
  4254. // PageToken sets the optional parameter "pageToken": Token identifying
  4255. // which result to start with; returned by a previous list
  4256. // call.
  4257. func (c *ServicesSearchCall) PageToken(pageToken string) *ServicesSearchCall {
  4258. c.urlParams_.Set("pageToken", pageToken)
  4259. return c
  4260. }
  4261. // Fields allows partial responses to be retrieved. See
  4262. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4263. // for more information.
  4264. func (c *ServicesSearchCall) Fields(s ...googleapi.Field) *ServicesSearchCall {
  4265. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4266. return c
  4267. }
  4268. // IfNoneMatch sets the optional parameter which makes the operation
  4269. // fail if the object's ETag matches the given value. This is useful for
  4270. // getting updates only after the object has changed since the last
  4271. // request. Use googleapi.IsNotModified to check whether the response
  4272. // error from Do is the result of In-None-Match.
  4273. func (c *ServicesSearchCall) IfNoneMatch(entityTag string) *ServicesSearchCall {
  4274. c.ifNoneMatch_ = entityTag
  4275. return c
  4276. }
  4277. // Context sets the context to be used in this call's Do method. Any
  4278. // pending HTTP request will be aborted if the provided context is
  4279. // canceled.
  4280. func (c *ServicesSearchCall) Context(ctx context.Context) *ServicesSearchCall {
  4281. c.ctx_ = ctx
  4282. return c
  4283. }
  4284. // Header returns an http.Header that can be modified by the caller to
  4285. // add HTTP headers to the request.
  4286. func (c *ServicesSearchCall) Header() http.Header {
  4287. if c.header_ == nil {
  4288. c.header_ = make(http.Header)
  4289. }
  4290. return c.header_
  4291. }
  4292. func (c *ServicesSearchCall) doRequest(alt string) (*http.Response, error) {
  4293. reqHeaders := make(http.Header)
  4294. for k, v := range c.header_ {
  4295. reqHeaders[k] = v
  4296. }
  4297. reqHeaders.Set("User-Agent", c.s.userAgent())
  4298. if c.ifNoneMatch_ != "" {
  4299. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4300. }
  4301. var body io.Reader = nil
  4302. c.urlParams_.Set("alt", alt)
  4303. c.urlParams_.Set("prettyPrint", "false")
  4304. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services:search")
  4305. urls += "?" + c.urlParams_.Encode()
  4306. req, err := http.NewRequest("GET", urls, body)
  4307. if err != nil {
  4308. return nil, err
  4309. }
  4310. req.Header = reqHeaders
  4311. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4312. }
  4313. // Do executes the "serviceuser.services.search" call.
  4314. // Exactly one of *SearchServicesResponse or error will be non-nil. Any
  4315. // non-2xx status code is an error. Response headers are in either
  4316. // *SearchServicesResponse.ServerResponse.Header or (if a response was
  4317. // returned at all) in error.(*googleapi.Error).Header. Use
  4318. // googleapi.IsNotModified to check whether the returned error was
  4319. // because http.StatusNotModified was returned.
  4320. func (c *ServicesSearchCall) Do(opts ...googleapi.CallOption) (*SearchServicesResponse, error) {
  4321. gensupport.SetOptions(c.urlParams_, opts...)
  4322. res, err := c.doRequest("json")
  4323. if res != nil && res.StatusCode == http.StatusNotModified {
  4324. if res.Body != nil {
  4325. res.Body.Close()
  4326. }
  4327. return nil, &googleapi.Error{
  4328. Code: res.StatusCode,
  4329. Header: res.Header,
  4330. }
  4331. }
  4332. if err != nil {
  4333. return nil, err
  4334. }
  4335. defer googleapi.CloseBody(res)
  4336. if err := googleapi.CheckResponse(res); err != nil {
  4337. return nil, err
  4338. }
  4339. ret := &SearchServicesResponse{
  4340. ServerResponse: googleapi.ServerResponse{
  4341. Header: res.Header,
  4342. HTTPStatusCode: res.StatusCode,
  4343. },
  4344. }
  4345. target := &ret
  4346. if err := gensupport.DecodeResponse(target, res); err != nil {
  4347. return nil, err
  4348. }
  4349. return ret, nil
  4350. // {
  4351. // "description": "Search available services.\n\nWhen no filter is specified, returns all accessible services. For\nauthenticated users, also returns all services the calling user has\n\"servicemanagement.services.bind\" permission for.",
  4352. // "flatPath": "v1/services:search",
  4353. // "httpMethod": "GET",
  4354. // "id": "serviceuser.services.search",
  4355. // "parameterOrder": [],
  4356. // "parameters": {
  4357. // "pageSize": {
  4358. // "description": "Requested size of the next page of data.",
  4359. // "format": "int32",
  4360. // "location": "query",
  4361. // "type": "integer"
  4362. // },
  4363. // "pageToken": {
  4364. // "description": "Token identifying which result to start with; returned by a previous list\ncall.",
  4365. // "location": "query",
  4366. // "type": "string"
  4367. // }
  4368. // },
  4369. // "path": "v1/services:search",
  4370. // "response": {
  4371. // "$ref": "SearchServicesResponse"
  4372. // },
  4373. // "scopes": [
  4374. // "https://www.googleapis.com/auth/cloud-platform",
  4375. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4376. // ]
  4377. // }
  4378. }
  4379. // Pages invokes f for each page of results.
  4380. // A non-nil error returned from f will halt the iteration.
  4381. // The provided context supersedes any context provided to the Context method.
  4382. func (c *ServicesSearchCall) Pages(ctx context.Context, f func(*SearchServicesResponse) error) error {
  4383. c.ctx_ = ctx
  4384. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4385. for {
  4386. x, err := c.Do()
  4387. if err != nil {
  4388. return err
  4389. }
  4390. if err := f(x); err != nil {
  4391. return err
  4392. }
  4393. if x.NextPageToken == "" {
  4394. return nil
  4395. }
  4396. c.PageToken(x.NextPageToken)
  4397. }
  4398. }