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.
 
 
 

4873 lines
180 KiB

  1. // Package servicebroker provides access to the Service Broker API.
  2. //
  3. // See https://cloud.google.com/kubernetes-engine/docs/concepts/add-on/service-broker
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/servicebroker/v1beta1"
  8. // ...
  9. // servicebrokerService, err := servicebroker.New(oauthHttpClient)
  10. package servicebroker // import "google.golang.org/api/servicebroker/v1beta1"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "servicebroker:v1beta1"
  41. const apiName = "servicebroker"
  42. const apiVersion = "v1beta1"
  43. const basePath = "https://servicebroker.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. )
  49. func New(client *http.Client) (*Service, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &Service{client: client, BasePath: basePath}
  54. s.Projects = NewProjectsService(s)
  55. s.V1beta1 = NewV1beta1Service(s)
  56. return s, nil
  57. }
  58. type Service struct {
  59. client *http.Client
  60. BasePath string // API endpoint base URL
  61. UserAgent string // optional additional User-Agent fragment
  62. Projects *ProjectsService
  63. V1beta1 *V1beta1Service
  64. }
  65. func (s *Service) userAgent() string {
  66. if s.UserAgent == "" {
  67. return googleapi.UserAgent
  68. }
  69. return googleapi.UserAgent + " " + s.UserAgent
  70. }
  71. func NewProjectsService(s *Service) *ProjectsService {
  72. rs := &ProjectsService{s: s}
  73. rs.Brokers = NewProjectsBrokersService(s)
  74. return rs
  75. }
  76. type ProjectsService struct {
  77. s *Service
  78. Brokers *ProjectsBrokersService
  79. }
  80. func NewProjectsBrokersService(s *Service) *ProjectsBrokersService {
  81. rs := &ProjectsBrokersService{s: s}
  82. rs.Instances = NewProjectsBrokersInstancesService(s)
  83. rs.V2 = NewProjectsBrokersV2Service(s)
  84. return rs
  85. }
  86. type ProjectsBrokersService struct {
  87. s *Service
  88. Instances *ProjectsBrokersInstancesService
  89. V2 *ProjectsBrokersV2Service
  90. }
  91. func NewProjectsBrokersInstancesService(s *Service) *ProjectsBrokersInstancesService {
  92. rs := &ProjectsBrokersInstancesService{s: s}
  93. rs.Bindings = NewProjectsBrokersInstancesBindingsService(s)
  94. return rs
  95. }
  96. type ProjectsBrokersInstancesService struct {
  97. s *Service
  98. Bindings *ProjectsBrokersInstancesBindingsService
  99. }
  100. func NewProjectsBrokersInstancesBindingsService(s *Service) *ProjectsBrokersInstancesBindingsService {
  101. rs := &ProjectsBrokersInstancesBindingsService{s: s}
  102. return rs
  103. }
  104. type ProjectsBrokersInstancesBindingsService struct {
  105. s *Service
  106. }
  107. func NewProjectsBrokersV2Service(s *Service) *ProjectsBrokersV2Service {
  108. rs := &ProjectsBrokersV2Service{s: s}
  109. rs.Catalog = NewProjectsBrokersV2CatalogService(s)
  110. rs.ServiceInstances = NewProjectsBrokersV2ServiceInstancesService(s)
  111. return rs
  112. }
  113. type ProjectsBrokersV2Service struct {
  114. s *Service
  115. Catalog *ProjectsBrokersV2CatalogService
  116. ServiceInstances *ProjectsBrokersV2ServiceInstancesService
  117. }
  118. func NewProjectsBrokersV2CatalogService(s *Service) *ProjectsBrokersV2CatalogService {
  119. rs := &ProjectsBrokersV2CatalogService{s: s}
  120. return rs
  121. }
  122. type ProjectsBrokersV2CatalogService struct {
  123. s *Service
  124. }
  125. func NewProjectsBrokersV2ServiceInstancesService(s *Service) *ProjectsBrokersV2ServiceInstancesService {
  126. rs := &ProjectsBrokersV2ServiceInstancesService{s: s}
  127. rs.ServiceBindings = NewProjectsBrokersV2ServiceInstancesServiceBindingsService(s)
  128. return rs
  129. }
  130. type ProjectsBrokersV2ServiceInstancesService struct {
  131. s *Service
  132. ServiceBindings *ProjectsBrokersV2ServiceInstancesServiceBindingsService
  133. }
  134. func NewProjectsBrokersV2ServiceInstancesServiceBindingsService(s *Service) *ProjectsBrokersV2ServiceInstancesServiceBindingsService {
  135. rs := &ProjectsBrokersV2ServiceInstancesServiceBindingsService{s: s}
  136. return rs
  137. }
  138. type ProjectsBrokersV2ServiceInstancesServiceBindingsService struct {
  139. s *Service
  140. }
  141. func NewV1beta1Service(s *Service) *V1beta1Service {
  142. rs := &V1beta1Service{s: s}
  143. return rs
  144. }
  145. type V1beta1Service struct {
  146. s *Service
  147. }
  148. // GoogleCloudServicebrokerV1beta1__Binding: Describes the binding.
  149. type GoogleCloudServicebrokerV1beta1__Binding struct {
  150. // BindResource: A JSON object that contains data for platform resources
  151. // associated with
  152. // the binding to be created.
  153. BindResource googleapi.RawMessage `json:"bind_resource,omitempty"`
  154. // BindingId: The id of the binding. Must be unique within GCP
  155. // project.
  156. // Maximum length is 64, GUID recommended.
  157. // Required.
  158. BindingId string `json:"binding_id,omitempty"`
  159. // CreateTime: Output only.
  160. // Timestamp for when the binding was created.
  161. CreateTime string `json:"createTime,omitempty"`
  162. // DeploymentName: Output only.
  163. // String containing the Deployment Manager deployment name that was
  164. // created
  165. // for this binding,
  166. DeploymentName string `json:"deploymentName,omitempty"`
  167. // Parameters: Configuration options for the service binding.
  168. Parameters googleapi.RawMessage `json:"parameters,omitempty"`
  169. // PlanId: The ID of the plan. See `Service` and `Plan` resources for
  170. // details.
  171. // Maximum length is 64, GUID recommended.
  172. // Required.
  173. PlanId string `json:"plan_id,omitempty"`
  174. // ResourceName: Output only.
  175. // The resource name of the binding,
  176. // e.g.
  177. // projects/project_id/brokers/broker_id/service_instances/instance_
  178. // id/bindings/binding_id.
  179. ResourceName string `json:"resourceName,omitempty"`
  180. // ServiceId: The id of the service. Must be a valid identifier of a
  181. // service
  182. // contained in the list from a `ListServices()` call.
  183. // Maximum length is 64, GUID recommended.
  184. // Required.
  185. ServiceId string `json:"service_id,omitempty"`
  186. // ForceSendFields is a list of field names (e.g. "BindResource") to
  187. // unconditionally include in API requests. By default, fields with
  188. // empty values are omitted from API requests. However, any non-pointer,
  189. // non-interface field appearing in ForceSendFields will be sent to the
  190. // server regardless of whether the field is empty or not. This may be
  191. // used to include empty fields in Patch requests.
  192. ForceSendFields []string `json:"-"`
  193. // NullFields is a list of field names (e.g. "BindResource") to include
  194. // in API requests with the JSON null value. By default, fields with
  195. // empty values are omitted from API requests. However, any field with
  196. // an empty value appearing in NullFields will be sent to the server as
  197. // null. It is an error if a field in this list has a non-empty value.
  198. // This may be used to include null fields in Patch requests.
  199. NullFields []string `json:"-"`
  200. }
  201. func (s *GoogleCloudServicebrokerV1beta1__Binding) MarshalJSON() ([]byte, error) {
  202. type NoMethod GoogleCloudServicebrokerV1beta1__Binding
  203. raw := NoMethod(*s)
  204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  205. }
  206. // GoogleCloudServicebrokerV1beta1__Broker: Broker represents a
  207. // consumable collection of Service Registry catalogs
  208. // exposed as an OSB Broker.
  209. type GoogleCloudServicebrokerV1beta1__Broker struct {
  210. // CreateTime: Output only.
  211. // Timestamp for when the broker was created.
  212. CreateTime string `json:"createTime,omitempty"`
  213. // Name: Name of the broker in the
  214. // format:
  215. // <projects>/<project-id>/brokers/<broker>.
  216. // This allows for multiple brokers per project which can be used
  217. // to
  218. // enable having custom brokers per GKE cluster, for example.
  219. Name string `json:"name,omitempty"`
  220. // Title: User friendly title of the broker.
  221. // Limited to 1024 characters. Requests with longer titles will be
  222. // rejected.
  223. Title string `json:"title,omitempty"`
  224. // Url: Output only.
  225. // URL of the broker OSB-compliant endpoint, for
  226. // example:
  227. // https://servicebroker.googleapis.com/projects/<project>/broke
  228. // rs/<broker>
  229. Url string `json:"url,omitempty"`
  230. // ServerResponse contains the HTTP response code and headers from the
  231. // server.
  232. googleapi.ServerResponse `json:"-"`
  233. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  234. // unconditionally include in API requests. By default, fields with
  235. // empty values are omitted from API requests. However, any non-pointer,
  236. // non-interface field appearing in ForceSendFields will be sent to the
  237. // server regardless of whether the field is empty or not. This may be
  238. // used to include empty fields in Patch requests.
  239. ForceSendFields []string `json:"-"`
  240. // NullFields is a list of field names (e.g. "CreateTime") to include in
  241. // API requests with the JSON null value. By default, fields with empty
  242. // values are omitted from API requests. However, any field with an
  243. // empty value appearing in NullFields will be sent to the server as
  244. // null. It is an error if a field in this list has a non-empty value.
  245. // This may be used to include null fields in Patch requests.
  246. NullFields []string `json:"-"`
  247. }
  248. func (s *GoogleCloudServicebrokerV1beta1__Broker) MarshalJSON() ([]byte, error) {
  249. type NoMethod GoogleCloudServicebrokerV1beta1__Broker
  250. raw := NoMethod(*s)
  251. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  252. }
  253. // GoogleCloudServicebrokerV1beta1__CreateBindingResponse: Response for
  254. // the `CreateBinding()` method.
  255. type GoogleCloudServicebrokerV1beta1__CreateBindingResponse struct {
  256. // Credentials: Credentials to use the binding.
  257. Credentials googleapi.RawMessage `json:"credentials,omitempty"`
  258. // Description: Used to communicate description of the response. Usually
  259. // for non-standard
  260. // error
  261. // codes.
  262. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  263. // er/spec.md#service-broker-errors
  264. Description string `json:"description,omitempty"`
  265. // Operation: If broker executes operation asynchronously, this is the
  266. // operation ID that
  267. // can be polled to check the completion status of said operation.
  268. // This broker always executes all create/delete operations
  269. // asynchronously.
  270. Operation string `json:"operation,omitempty"`
  271. // RouteServiceUrl: A URL to which the platform may proxy requests for
  272. // the address sent with
  273. // bind_resource.route
  274. RouteServiceUrl string `json:"route_service_url,omitempty"`
  275. // SyslogDrainUrl: From where to read system logs.
  276. SyslogDrainUrl string `json:"syslog_drain_url,omitempty"`
  277. // VolumeMounts: An array of configuration for mounting volumes.
  278. VolumeMounts []googleapi.RawMessage `json:"volume_mounts,omitempty"`
  279. // ServerResponse contains the HTTP response code and headers from the
  280. // server.
  281. googleapi.ServerResponse `json:"-"`
  282. // ForceSendFields is a list of field names (e.g. "Credentials") to
  283. // unconditionally include in API requests. By default, fields with
  284. // empty values are omitted from API requests. However, any non-pointer,
  285. // non-interface field appearing in ForceSendFields will be sent to the
  286. // server regardless of whether the field is empty or not. This may be
  287. // used to include empty fields in Patch requests.
  288. ForceSendFields []string `json:"-"`
  289. // NullFields is a list of field names (e.g. "Credentials") to include
  290. // in API requests with the JSON null value. By default, fields with
  291. // empty values are omitted from API requests. However, any field with
  292. // an empty value appearing in NullFields will be sent to the server as
  293. // null. It is an error if a field in this list has a non-empty value.
  294. // This may be used to include null fields in Patch requests.
  295. NullFields []string `json:"-"`
  296. }
  297. func (s *GoogleCloudServicebrokerV1beta1__CreateBindingResponse) MarshalJSON() ([]byte, error) {
  298. type NoMethod GoogleCloudServicebrokerV1beta1__CreateBindingResponse
  299. raw := NoMethod(*s)
  300. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  301. }
  302. // GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse:
  303. // Response for the `CreateServiceInstance()` method.
  304. type GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse struct {
  305. // Description: Used to communicate description of the response. Usually
  306. // for non-standard
  307. // error
  308. // codes.
  309. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  310. // er/spec.md#service-broker-errors
  311. Description string `json:"description,omitempty"`
  312. // Operation: If broker executes operation asynchronously, this is the
  313. // operation ID that
  314. // can be polled to check the completion status of said operation.
  315. // This broker always will return a non-empty operation on success.
  316. Operation string `json:"operation,omitempty"`
  317. // ServerResponse contains the HTTP response code and headers from the
  318. // server.
  319. googleapi.ServerResponse `json:"-"`
  320. // ForceSendFields is a list of field names (e.g. "Description") to
  321. // unconditionally include in API requests. By default, fields with
  322. // empty values are omitted from API requests. However, any non-pointer,
  323. // non-interface field appearing in ForceSendFields will be sent to the
  324. // server regardless of whether the field is empty or not. This may be
  325. // used to include empty fields in Patch requests.
  326. ForceSendFields []string `json:"-"`
  327. // NullFields is a list of field names (e.g. "Description") to include
  328. // in API requests with the JSON null value. By default, fields with
  329. // empty values are omitted from API requests. However, any field with
  330. // an empty value appearing in NullFields will be sent to the server as
  331. // null. It is an error if a field in this list has a non-empty value.
  332. // This may be used to include null fields in Patch requests.
  333. NullFields []string `json:"-"`
  334. }
  335. func (s *GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse) MarshalJSON() ([]byte, error) {
  336. type NoMethod GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse
  337. raw := NoMethod(*s)
  338. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  339. }
  340. // GoogleCloudServicebrokerV1beta1__DashboardClient: Message containing
  341. // information required to activate Dashboard SSO feature.
  342. type GoogleCloudServicebrokerV1beta1__DashboardClient struct {
  343. // Id: The id of the Oauth client that the dashboard will use.
  344. Id string `json:"id,omitempty"`
  345. // RedirectUri: A URI for the service dashboard.
  346. // Validated by the OAuth token server when the dashboard requests a
  347. // token.
  348. RedirectUri string `json:"redirect_uri,omitempty"`
  349. // Secret: A secret for the dashboard client.
  350. Secret string `json:"secret,omitempty"`
  351. // ForceSendFields is a list of field names (e.g. "Id") to
  352. // unconditionally include in API requests. By default, fields with
  353. // empty values are omitted from API requests. However, any non-pointer,
  354. // non-interface field appearing in ForceSendFields will be sent to the
  355. // server regardless of whether the field is empty or not. This may be
  356. // used to include empty fields in Patch requests.
  357. ForceSendFields []string `json:"-"`
  358. // NullFields is a list of field names (e.g. "Id") to include in API
  359. // requests with the JSON null value. By default, fields with empty
  360. // values are omitted from API requests. However, any field with an
  361. // empty value appearing in NullFields will be sent to the server as
  362. // null. It is an error if a field in this list has a non-empty value.
  363. // This may be used to include null fields in Patch requests.
  364. NullFields []string `json:"-"`
  365. }
  366. func (s *GoogleCloudServicebrokerV1beta1__DashboardClient) MarshalJSON() ([]byte, error) {
  367. type NoMethod GoogleCloudServicebrokerV1beta1__DashboardClient
  368. raw := NoMethod(*s)
  369. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  370. }
  371. // GoogleCloudServicebrokerV1beta1__DeleteBindingResponse: Response for
  372. // the `DeleteBinding()` method.
  373. type GoogleCloudServicebrokerV1beta1__DeleteBindingResponse struct {
  374. // Description: Used to communicate description of the response. Usually
  375. // for non-standard
  376. // error
  377. // codes.
  378. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  379. // er/spec.md#service-broker-errors
  380. Description string `json:"description,omitempty"`
  381. // Operation: If broker executes operation asynchronously, this is the
  382. // operation ID that
  383. // can be polled to check the completion status of said operation.
  384. Operation string `json:"operation,omitempty"`
  385. // ServerResponse contains the HTTP response code and headers from the
  386. // server.
  387. googleapi.ServerResponse `json:"-"`
  388. // ForceSendFields is a list of field names (e.g. "Description") to
  389. // unconditionally include in API requests. By default, fields with
  390. // empty values are omitted from API requests. However, any non-pointer,
  391. // non-interface field appearing in ForceSendFields will be sent to the
  392. // server regardless of whether the field is empty or not. This may be
  393. // used to include empty fields in Patch requests.
  394. ForceSendFields []string `json:"-"`
  395. // NullFields is a list of field names (e.g. "Description") to include
  396. // in API requests with the JSON null value. By default, fields with
  397. // empty values are omitted from API requests. However, any field with
  398. // an empty value appearing in NullFields will be sent to the server as
  399. // null. It is an error if a field in this list has a non-empty value.
  400. // This may be used to include null fields in Patch requests.
  401. NullFields []string `json:"-"`
  402. }
  403. func (s *GoogleCloudServicebrokerV1beta1__DeleteBindingResponse) MarshalJSON() ([]byte, error) {
  404. type NoMethod GoogleCloudServicebrokerV1beta1__DeleteBindingResponse
  405. raw := NoMethod(*s)
  406. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  407. }
  408. // GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse:
  409. // Response for the `DeleteServiceInstance()` method.
  410. type GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse struct {
  411. // Description: Used to communicate description of the response. Usually
  412. // for non-standard
  413. // error
  414. // codes.
  415. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  416. // er/spec.md#service-broker-errors
  417. Description string `json:"description,omitempty"`
  418. // Operation: If broker executes operation asynchronously, this is the
  419. // operation ID that
  420. // can be polled to check the completion status of said operation.
  421. Operation string `json:"operation,omitempty"`
  422. // ServerResponse contains the HTTP response code and headers from the
  423. // server.
  424. googleapi.ServerResponse `json:"-"`
  425. // ForceSendFields is a list of field names (e.g. "Description") to
  426. // unconditionally include in API requests. By default, fields with
  427. // empty values are omitted from API requests. However, any non-pointer,
  428. // non-interface field appearing in ForceSendFields will be sent to the
  429. // server regardless of whether the field is empty or not. This may be
  430. // used to include empty fields in Patch requests.
  431. ForceSendFields []string `json:"-"`
  432. // NullFields is a list of field names (e.g. "Description") to include
  433. // in API requests with the JSON null value. By default, fields with
  434. // empty values are omitted from API requests. However, any field with
  435. // an empty value appearing in NullFields will be sent to the server as
  436. // null. It is an error if a field in this list has a non-empty value.
  437. // This may be used to include null fields in Patch requests.
  438. NullFields []string `json:"-"`
  439. }
  440. func (s *GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse) MarshalJSON() ([]byte, error) {
  441. type NoMethod GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse
  442. raw := NoMethod(*s)
  443. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  444. }
  445. // GoogleCloudServicebrokerV1beta1__GetBindingResponse: Response for the
  446. // `GetBinding()` method.
  447. type GoogleCloudServicebrokerV1beta1__GetBindingResponse struct {
  448. // Credentials: Credentials to use the binding.
  449. Credentials googleapi.RawMessage `json:"credentials,omitempty"`
  450. // DeploymentName: String containing the Deployment Manager deployment
  451. // name that was created
  452. // for this binding,
  453. DeploymentName string `json:"deploymentName,omitempty"`
  454. // Description: Used to communicate description of the response. Usually
  455. // for non-standard
  456. // error
  457. // codes.
  458. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  459. // er/spec.md#service-broker-errors
  460. Description string `json:"description,omitempty"`
  461. // ResourceName: Output only.
  462. // The resource name of the binding,
  463. // e.g.
  464. // projects/project_id/brokers/broker_id/service_instances/instance_
  465. // id/bindings/binding_id.
  466. ResourceName string `json:"resourceName,omitempty"`
  467. // RouteServiceUrl: A URL to which the platform may proxy requests for
  468. // the address sent with
  469. // bind_resource.route
  470. RouteServiceUrl string `json:"route_service_url,omitempty"`
  471. // SyslogDrainUrl: From where to read system logs.
  472. SyslogDrainUrl string `json:"syslog_drain_url,omitempty"`
  473. // VolumeMounts: An array of configurations for mounting volumes.
  474. VolumeMounts []googleapi.RawMessage `json:"volume_mounts,omitempty"`
  475. // ServerResponse contains the HTTP response code and headers from the
  476. // server.
  477. googleapi.ServerResponse `json:"-"`
  478. // ForceSendFields is a list of field names (e.g. "Credentials") to
  479. // unconditionally include in API requests. By default, fields with
  480. // empty values are omitted from API requests. However, any non-pointer,
  481. // non-interface field appearing in ForceSendFields will be sent to the
  482. // server regardless of whether the field is empty or not. This may be
  483. // used to include empty fields in Patch requests.
  484. ForceSendFields []string `json:"-"`
  485. // NullFields is a list of field names (e.g. "Credentials") to include
  486. // in API requests with the JSON null value. By default, fields with
  487. // empty values are omitted from API requests. However, any field with
  488. // an empty value appearing in NullFields will be sent to the server as
  489. // null. It is an error if a field in this list has a non-empty value.
  490. // This may be used to include null fields in Patch requests.
  491. NullFields []string `json:"-"`
  492. }
  493. func (s *GoogleCloudServicebrokerV1beta1__GetBindingResponse) MarshalJSON() ([]byte, error) {
  494. type NoMethod GoogleCloudServicebrokerV1beta1__GetBindingResponse
  495. raw := NoMethod(*s)
  496. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  497. }
  498. // GoogleCloudServicebrokerV1beta1__ListBindingsResponse: The response
  499. // for the `ListBindings()` method.
  500. type GoogleCloudServicebrokerV1beta1__ListBindingsResponse struct {
  501. // Bindings: The list of bindings in the instance.
  502. Bindings []*GoogleCloudServicebrokerV1beta1__Binding `json:"bindings,omitempty"`
  503. // Description: Used to communicate description of the response. Usually
  504. // for non-standard
  505. // error
  506. // codes.
  507. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  508. // er/spec.md#service-broker-errors
  509. Description string `json:"description,omitempty"`
  510. // NextPageToken: This token allows you to get the next page of results
  511. // for list requests.
  512. // If the number of results is larger than `pageSize`, use the
  513. // `nextPageToken`
  514. // as a value for the query parameter `pageToken` in the next list
  515. // request.
  516. // Subsequent list requests will have their own `nextPageToken` to
  517. // continue
  518. // paging through the results
  519. NextPageToken string `json:"nextPageToken,omitempty"`
  520. // ServerResponse contains the HTTP response code and headers from the
  521. // server.
  522. googleapi.ServerResponse `json:"-"`
  523. // ForceSendFields is a list of field names (e.g. "Bindings") to
  524. // unconditionally include in API requests. By default, fields with
  525. // empty values are omitted from API requests. However, any non-pointer,
  526. // non-interface field appearing in ForceSendFields will be sent to the
  527. // server regardless of whether the field is empty or not. This may be
  528. // used to include empty fields in Patch requests.
  529. ForceSendFields []string `json:"-"`
  530. // NullFields is a list of field names (e.g. "Bindings") to include in
  531. // API requests with the JSON null value. By default, fields with empty
  532. // values are omitted from API requests. However, any field with an
  533. // empty value appearing in NullFields will be sent to the server as
  534. // null. It is an error if a field in this list has a non-empty value.
  535. // This may be used to include null fields in Patch requests.
  536. NullFields []string `json:"-"`
  537. }
  538. func (s *GoogleCloudServicebrokerV1beta1__ListBindingsResponse) MarshalJSON() ([]byte, error) {
  539. type NoMethod GoogleCloudServicebrokerV1beta1__ListBindingsResponse
  540. raw := NoMethod(*s)
  541. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  542. }
  543. // GoogleCloudServicebrokerV1beta1__ListBrokersResponse: The response
  544. // for the `ListBrokers()` method.
  545. type GoogleCloudServicebrokerV1beta1__ListBrokersResponse struct {
  546. // Brokers: The list of brokers in the container.
  547. Brokers []*GoogleCloudServicebrokerV1beta1__Broker `json:"brokers,omitempty"`
  548. // NextPageToken: This token allows you to get the next page of results
  549. // for list requests.
  550. // If the number of results is larger than `pageSize`, use the
  551. // `nextPageToken`
  552. // as a value for the query parameter `pageToken` in the next list
  553. // request.
  554. // Subsequent list requests will have their own `nextPageToken` to
  555. // continue
  556. // paging through the results
  557. NextPageToken string `json:"nextPageToken,omitempty"`
  558. // ServerResponse contains the HTTP response code and headers from the
  559. // server.
  560. googleapi.ServerResponse `json:"-"`
  561. // ForceSendFields is a list of field names (e.g. "Brokers") to
  562. // unconditionally include in API requests. By default, fields with
  563. // empty values are omitted from API requests. However, any non-pointer,
  564. // non-interface field appearing in ForceSendFields will be sent to the
  565. // server regardless of whether the field is empty or not. This may be
  566. // used to include empty fields in Patch requests.
  567. ForceSendFields []string `json:"-"`
  568. // NullFields is a list of field names (e.g. "Brokers") to include in
  569. // API requests with the JSON null value. By default, fields with empty
  570. // values are omitted from API requests. However, any field with an
  571. // empty value appearing in NullFields will be sent to the server as
  572. // null. It is an error if a field in this list has a non-empty value.
  573. // This may be used to include null fields in Patch requests.
  574. NullFields []string `json:"-"`
  575. }
  576. func (s *GoogleCloudServicebrokerV1beta1__ListBrokersResponse) MarshalJSON() ([]byte, error) {
  577. type NoMethod GoogleCloudServicebrokerV1beta1__ListBrokersResponse
  578. raw := NoMethod(*s)
  579. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  580. }
  581. // GoogleCloudServicebrokerV1beta1__ListCatalogResponse: Response
  582. // message for the `ListCatalog()` method.
  583. type GoogleCloudServicebrokerV1beta1__ListCatalogResponse struct {
  584. // Description: Used to communicate description of the response. Usually
  585. // for non-standard
  586. // error
  587. // codes.
  588. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  589. // er/spec.md#service-broker-errors
  590. Description string `json:"description,omitempty"`
  591. // NextPageToken: This token allows you to get the next page of results
  592. // for list requests.
  593. // If the number of results is larger than `pageSize`, use the
  594. // `nextPageToken`
  595. // as a value for the query parameter `pageToken` in the next list
  596. // request.
  597. // Subsequent list requests will have their own `nextPageToken` to
  598. // continue
  599. // paging through the results
  600. NextPageToken string `json:"nextPageToken,omitempty"`
  601. // Services: The services available for the requested GCP project.
  602. Services []*GoogleCloudServicebrokerV1beta1__Service `json:"services,omitempty"`
  603. // ServerResponse contains the HTTP response code and headers from the
  604. // server.
  605. googleapi.ServerResponse `json:"-"`
  606. // ForceSendFields is a list of field names (e.g. "Description") to
  607. // unconditionally include in API requests. By default, fields with
  608. // empty values are omitted from API requests. However, any non-pointer,
  609. // non-interface field appearing in ForceSendFields will be sent to the
  610. // server regardless of whether the field is empty or not. This may be
  611. // used to include empty fields in Patch requests.
  612. ForceSendFields []string `json:"-"`
  613. // NullFields is a list of field names (e.g. "Description") to include
  614. // in API requests with the JSON null value. By default, fields with
  615. // empty values are omitted from API requests. However, any field with
  616. // an empty value appearing in NullFields will be sent to the server as
  617. // null. It is an error if a field in this list has a non-empty value.
  618. // This may be used to include null fields in Patch requests.
  619. NullFields []string `json:"-"`
  620. }
  621. func (s *GoogleCloudServicebrokerV1beta1__ListCatalogResponse) MarshalJSON() ([]byte, error) {
  622. type NoMethod GoogleCloudServicebrokerV1beta1__ListCatalogResponse
  623. raw := NoMethod(*s)
  624. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  625. }
  626. // GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse: The
  627. // response for the `ListServiceInstances()` method.
  628. type GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse struct {
  629. // Description: Used to communicate description of the response. Usually
  630. // for non-standard
  631. // error
  632. // codes.
  633. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  634. // er/spec.md#service-broker-errors
  635. Description string `json:"description,omitempty"`
  636. // Instances: The list of instances in the broker.
  637. Instances []*GoogleCloudServicebrokerV1beta1__ServiceInstance `json:"instances,omitempty"`
  638. // NextPageToken: This token allows you to get the next page of results
  639. // for list requests.
  640. // If the number of results is larger than `pageSize`, use the
  641. // `nextPageToken`
  642. // as a value for the query parameter `pageToken` in the next list
  643. // request.
  644. // Subsequent list requests will have their own `nextPageToken` to
  645. // continue
  646. // paging through the results
  647. NextPageToken string `json:"nextPageToken,omitempty"`
  648. // ServerResponse contains the HTTP response code and headers from the
  649. // server.
  650. googleapi.ServerResponse `json:"-"`
  651. // ForceSendFields is a list of field names (e.g. "Description") to
  652. // unconditionally include in API requests. By default, fields with
  653. // empty values are omitted from API requests. However, any non-pointer,
  654. // non-interface field appearing in ForceSendFields will be sent to the
  655. // server regardless of whether the field is empty or not. This may be
  656. // used to include empty fields in Patch requests.
  657. ForceSendFields []string `json:"-"`
  658. // NullFields is a list of field names (e.g. "Description") to include
  659. // in API requests with the JSON null value. By default, fields with
  660. // empty values are omitted from API requests. However, any field with
  661. // an empty value appearing in NullFields will be sent to the server as
  662. // null. It is an error if a field in this list has a non-empty value.
  663. // This may be used to include null fields in Patch requests.
  664. NullFields []string `json:"-"`
  665. }
  666. func (s *GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse) MarshalJSON() ([]byte, error) {
  667. type NoMethod GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse
  668. raw := NoMethod(*s)
  669. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  670. }
  671. // GoogleCloudServicebrokerV1beta1__Operation: Describes a long running
  672. // operation, which conforms to OpenService API.
  673. type GoogleCloudServicebrokerV1beta1__Operation struct {
  674. // Description: Optional description of the Operation state.
  675. Description string `json:"description,omitempty"`
  676. // State: The state of the operation.
  677. // Valid values are: "in progress", "succeeded", and "failed".
  678. State string `json:"state,omitempty"`
  679. // ServerResponse contains the HTTP response code and headers from the
  680. // server.
  681. googleapi.ServerResponse `json:"-"`
  682. // ForceSendFields is a list of field names (e.g. "Description") to
  683. // unconditionally include in API requests. By default, fields with
  684. // empty values are omitted from API requests. However, any non-pointer,
  685. // non-interface field appearing in ForceSendFields will be sent to the
  686. // server regardless of whether the field is empty or not. This may be
  687. // used to include empty fields in Patch requests.
  688. ForceSendFields []string `json:"-"`
  689. // NullFields is a list of field names (e.g. "Description") to include
  690. // in API requests with the JSON null value. By default, fields with
  691. // empty values are omitted from API requests. However, any field with
  692. // an empty value appearing in NullFields will be sent to the server as
  693. // null. It is an error if a field in this list has a non-empty value.
  694. // This may be used to include null fields in Patch requests.
  695. NullFields []string `json:"-"`
  696. }
  697. func (s *GoogleCloudServicebrokerV1beta1__Operation) MarshalJSON() ([]byte, error) {
  698. type NoMethod GoogleCloudServicebrokerV1beta1__Operation
  699. raw := NoMethod(*s)
  700. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  701. }
  702. // GoogleCloudServicebrokerV1beta1__Plan: Plan message describes a
  703. // Service Plan.
  704. type GoogleCloudServicebrokerV1beta1__Plan struct {
  705. // Bindable: Specifies whether instances of the service can be bound to
  706. // applications.
  707. // If not specified, `Service.bindable` will be presumed.
  708. Bindable bool `json:"bindable,omitempty"`
  709. // Description: Textual description of the plan. Optional.
  710. Description string `json:"description,omitempty"`
  711. // Free: Whether the service is free.
  712. Free bool `json:"free,omitempty"`
  713. // Id: ID is a globally unique identifier used to uniquely identify the
  714. // plan.
  715. // User must make no presumption about the format of this field.
  716. Id string `json:"id,omitempty"`
  717. // Metadata: A list of metadata for a service offering.
  718. // Metadata is an arbitrary JSON object.
  719. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  720. // Name: User friendly name of the plan.
  721. // The name must be globally unique within GCP project.
  722. // Note, which is different from ("This must be globally unique within
  723. // a
  724. // platform marketplace").
  725. Name string `json:"name,omitempty"`
  726. // Schemas: Schema definitions for service instances and bindings for
  727. // the plan.
  728. Schemas googleapi.RawMessage `json:"schemas,omitempty"`
  729. // ForceSendFields is a list of field names (e.g. "Bindable") to
  730. // unconditionally include in API requests. By default, fields with
  731. // empty values are omitted from API requests. However, any non-pointer,
  732. // non-interface field appearing in ForceSendFields will be sent to the
  733. // server regardless of whether the field is empty or not. This may be
  734. // used to include empty fields in Patch requests.
  735. ForceSendFields []string `json:"-"`
  736. // NullFields is a list of field names (e.g. "Bindable") to include in
  737. // API requests with the JSON null value. By default, fields with empty
  738. // values are omitted from API requests. However, any field with an
  739. // empty value appearing in NullFields will be sent to the server as
  740. // null. It is an error if a field in this list has a non-empty value.
  741. // This may be used to include null fields in Patch requests.
  742. NullFields []string `json:"-"`
  743. }
  744. func (s *GoogleCloudServicebrokerV1beta1__Plan) MarshalJSON() ([]byte, error) {
  745. type NoMethod GoogleCloudServicebrokerV1beta1__Plan
  746. raw := NoMethod(*s)
  747. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  748. }
  749. // GoogleCloudServicebrokerV1beta1__Service: The resource model mostly
  750. // follows the Open Service Broker API, as
  751. // described
  752. // here:
  753. // https://github.com/openservicebrokerapi/servicebroker/blob/maste
  754. // r/_spec.md
  755. // Though due to Google Specifics it has additional optional fields.
  756. type GoogleCloudServicebrokerV1beta1__Service struct {
  757. // Bindable: Specifies whether instances of the service can be bound to
  758. // applications.
  759. // Required.
  760. Bindable bool `json:"bindable,omitempty"`
  761. // BindingRetrievable: Whether the service provides an endpoint to get
  762. // service bindings.
  763. BindingRetrievable bool `json:"binding_retrievable,omitempty"`
  764. // BindingsRetrievable: Whether the service provides an endpoint to get
  765. // service bindings.
  766. BindingsRetrievable bool `json:"bindings_retrievable,omitempty"`
  767. // DashboardClient: Information to activate Dashboard SSO feature.
  768. DashboardClient *GoogleCloudServicebrokerV1beta1__DashboardClient `json:"dashboard_client,omitempty"`
  769. // Description: Textual description of the service. Required.
  770. Description string `json:"description,omitempty"`
  771. // Id: ID is a globally unique identifier used to uniquely identify the
  772. // service.
  773. // ID is an opaque string.
  774. Id string `json:"id,omitempty"`
  775. // InstancesRetrievable: Whether the service provides an endpoint to get
  776. // service instances.
  777. InstancesRetrievable bool `json:"instances_retrievable,omitempty"`
  778. // Metadata: A list of metadata for a service offering.
  779. // Metadata is an arbitrary JSON object.
  780. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  781. // Name: User friendly service name.
  782. // Name must match [a-z0-9]+ regexp.
  783. // The name must be globally unique within GCP project.
  784. // Note, which is different from ("This must be globally unique within
  785. // a
  786. // platform marketplace").
  787. // Required.
  788. Name string `json:"name,omitempty"`
  789. // PlanUpdateable: Whether the service supports upgrade/downgrade for
  790. // some plans.
  791. PlanUpdateable bool `json:"plan_updateable,omitempty"`
  792. // Plans: A list of plans for this service.
  793. // At least one plan is required.
  794. Plans []*GoogleCloudServicebrokerV1beta1__Plan `json:"plans,omitempty"`
  795. // Tags: Tags provide a flexible mechanism to expose a classification,
  796. // attribute, or
  797. // base technology of a service.
  798. Tags []string `json:"tags,omitempty"`
  799. // ForceSendFields is a list of field names (e.g. "Bindable") to
  800. // unconditionally include in API requests. By default, fields with
  801. // empty values are omitted from API requests. However, any non-pointer,
  802. // non-interface field appearing in ForceSendFields will be sent to the
  803. // server regardless of whether the field is empty or not. This may be
  804. // used to include empty fields in Patch requests.
  805. ForceSendFields []string `json:"-"`
  806. // NullFields is a list of field names (e.g. "Bindable") to include in
  807. // API requests with the JSON null value. By default, fields with empty
  808. // values are omitted from API requests. However, any field with an
  809. // empty value appearing in NullFields will be sent to the server as
  810. // null. It is an error if a field in this list has a non-empty value.
  811. // This may be used to include null fields in Patch requests.
  812. NullFields []string `json:"-"`
  813. }
  814. func (s *GoogleCloudServicebrokerV1beta1__Service) MarshalJSON() ([]byte, error) {
  815. type NoMethod GoogleCloudServicebrokerV1beta1__Service
  816. raw := NoMethod(*s)
  817. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  818. }
  819. // GoogleCloudServicebrokerV1beta1__ServiceInstance: Message describing
  820. // inputs to Provision and Update Service instance requests.
  821. type GoogleCloudServicebrokerV1beta1__ServiceInstance struct {
  822. // Context: Platform specific contextual information under which the
  823. // service instance
  824. // is to be provisioned. This replaces organization_guid and
  825. // space_guid.
  826. // But can also contain anything.
  827. // Currently only used for logging context information.
  828. Context googleapi.RawMessage `json:"context,omitempty"`
  829. // CreateTime: Output only.
  830. // Timestamp for when the instance was created.
  831. CreateTime string `json:"createTime,omitempty"`
  832. // DeploymentName: Output only.
  833. // String containing the Deployment Manager deployment name that was
  834. // created
  835. // for this instance,
  836. DeploymentName string `json:"deploymentName,omitempty"`
  837. // Description: To return errors when GetInstance call is done via HTTP
  838. // to be unified with
  839. // other methods.
  840. Description string `json:"description,omitempty"`
  841. // InstanceId: The id of the service instance. Must be unique within GCP
  842. // project.
  843. // Maximum length is 64, GUID recommended.
  844. // Required.
  845. InstanceId string `json:"instance_id,omitempty"`
  846. // OrganizationGuid: The platform GUID for the organization under which
  847. // the service is to be
  848. // provisioned.
  849. // Required.
  850. OrganizationGuid string `json:"organization_guid,omitempty"`
  851. // Parameters: Configuration options for the service
  852. // instance.
  853. // Parameters is JSON object serialized to string.
  854. Parameters googleapi.RawMessage `json:"parameters,omitempty"`
  855. // PlanId: The ID of the plan. See `Service` and `Plan` resources for
  856. // details.
  857. // Maximum length is 64, GUID recommended.
  858. // Required.
  859. PlanId string `json:"plan_id,omitempty"`
  860. // PreviousValues: Used only in UpdateServiceInstance request to
  861. // optionally specify previous
  862. // fields.
  863. PreviousValues googleapi.RawMessage `json:"previous_values,omitempty"`
  864. // ResourceName: Output only.
  865. // The resource name of the instance,
  866. // e.g.
  867. // projects/project_id/brokers/broker_id/service_instances/instance_
  868. // id
  869. ResourceName string `json:"resourceName,omitempty"`
  870. // ServiceId: The id of the service. Must be a valid identifier of a
  871. // service
  872. // contained in the list from a `ListServices()` call.
  873. // Maximum length is 64, GUID recommended.
  874. // Required.
  875. ServiceId string `json:"service_id,omitempty"`
  876. // SpaceGuid: The identifier for the project space within the platform
  877. // organization.
  878. // Required.
  879. SpaceGuid string `json:"space_guid,omitempty"`
  880. // ServerResponse contains the HTTP response code and headers from the
  881. // server.
  882. googleapi.ServerResponse `json:"-"`
  883. // ForceSendFields is a list of field names (e.g. "Context") to
  884. // unconditionally include in API requests. By default, fields with
  885. // empty values are omitted from API requests. However, any non-pointer,
  886. // non-interface field appearing in ForceSendFields will be sent to the
  887. // server regardless of whether the field is empty or not. This may be
  888. // used to include empty fields in Patch requests.
  889. ForceSendFields []string `json:"-"`
  890. // NullFields is a list of field names (e.g. "Context") to include in
  891. // API requests with the JSON null value. By default, fields with empty
  892. // values are omitted from API requests. However, any field with an
  893. // empty value appearing in NullFields will be sent to the server as
  894. // null. It is an error if a field in this list has a non-empty value.
  895. // This may be used to include null fields in Patch requests.
  896. NullFields []string `json:"-"`
  897. }
  898. func (s *GoogleCloudServicebrokerV1beta1__ServiceInstance) MarshalJSON() ([]byte, error) {
  899. type NoMethod GoogleCloudServicebrokerV1beta1__ServiceInstance
  900. raw := NoMethod(*s)
  901. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  902. }
  903. // GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse:
  904. // Response for the `UpdateServiceInstance()` method.
  905. type GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse struct {
  906. // Description: Used to communicate description of the response. Usually
  907. // for non-standard
  908. // error
  909. // codes.
  910. // https://github.com/openservicebrokerapi/servicebroker/blob/mast
  911. // er/spec.md#service-broker-errors
  912. Description string `json:"description,omitempty"`
  913. // Operation: If broker executes operation asynchronously, this is the
  914. // operation ID that
  915. // can be polled to check the completion status of said operation.
  916. Operation string `json:"operation,omitempty"`
  917. // ServerResponse contains the HTTP response code and headers from the
  918. // server.
  919. googleapi.ServerResponse `json:"-"`
  920. // ForceSendFields is a list of field names (e.g. "Description") to
  921. // unconditionally include in API requests. By default, fields with
  922. // empty values are omitted from API requests. However, any non-pointer,
  923. // non-interface field appearing in ForceSendFields will be sent to the
  924. // server regardless of whether the field is empty or not. This may be
  925. // used to include empty fields in Patch requests.
  926. ForceSendFields []string `json:"-"`
  927. // NullFields is a list of field names (e.g. "Description") to include
  928. // in API requests with the JSON null value. By default, fields with
  929. // empty values are omitted from API requests. However, any field with
  930. // an empty value appearing in NullFields will be sent to the server as
  931. // null. It is an error if a field in this list has a non-empty value.
  932. // This may be used to include null fields in Patch requests.
  933. NullFields []string `json:"-"`
  934. }
  935. func (s *GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse) MarshalJSON() ([]byte, error) {
  936. type NoMethod GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse
  937. raw := NoMethod(*s)
  938. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  939. }
  940. // GoogleIamV1__Binding: Associates `members` with a `role`.
  941. type GoogleIamV1__Binding struct {
  942. // Members: Specifies the identities requesting access for a Cloud
  943. // Platform resource.
  944. // `members` can have the following values:
  945. //
  946. // * `allUsers`: A special identifier that represents anyone who is
  947. // on the internet; with or without a Google account.
  948. //
  949. // * `allAuthenticatedUsers`: A special identifier that represents
  950. // anyone
  951. // who is authenticated with a Google account or a service
  952. // account.
  953. //
  954. // * `user:{emailid}`: An email address that represents a specific
  955. // Google
  956. // account. For example, `alice@gmail.com` .
  957. //
  958. //
  959. // * `serviceAccount:{emailid}`: An email address that represents a
  960. // service
  961. // account. For example,
  962. // `my-other-app@appspot.gserviceaccount.com`.
  963. //
  964. // * `group:{emailid}`: An email address that represents a Google
  965. // group.
  966. // For example, `admins@example.com`.
  967. //
  968. //
  969. // * `domain:{domain}`: A Google Apps domain name that represents all
  970. // the
  971. // users of that domain. For example, `google.com` or
  972. // `example.com`.
  973. //
  974. //
  975. Members []string `json:"members,omitempty"`
  976. // Role: Role that is assigned to `members`.
  977. // For example, `roles/viewer`, `roles/editor`, or
  978. // `roles/owner`.
  979. // Required
  980. Role string `json:"role,omitempty"`
  981. // ForceSendFields is a list of field names (e.g. "Members") to
  982. // unconditionally include in API requests. By default, fields with
  983. // empty values are omitted from API requests. However, any non-pointer,
  984. // non-interface field appearing in ForceSendFields will be sent to the
  985. // server regardless of whether the field is empty or not. This may be
  986. // used to include empty fields in Patch requests.
  987. ForceSendFields []string `json:"-"`
  988. // NullFields is a list of field names (e.g. "Members") to include in
  989. // API requests with the JSON null value. By default, fields with empty
  990. // values are omitted from API requests. However, any field with an
  991. // empty value appearing in NullFields will be sent to the server as
  992. // null. It is an error if a field in this list has a non-empty value.
  993. // This may be used to include null fields in Patch requests.
  994. NullFields []string `json:"-"`
  995. }
  996. func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) {
  997. type NoMethod GoogleIamV1__Binding
  998. raw := NoMethod(*s)
  999. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1000. }
  1001. // GoogleIamV1__Policy: Defines an Identity and Access Management (IAM)
  1002. // policy. It is used to
  1003. // specify access control policies for Cloud Platform resources.
  1004. //
  1005. //
  1006. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  1007. // of
  1008. // `members` to a `role`, where the members can be user accounts, Google
  1009. // groups,
  1010. // Google domains, and service accounts. A `role` is a named list of
  1011. // permissions
  1012. // defined by IAM.
  1013. //
  1014. // **JSON Example**
  1015. //
  1016. // {
  1017. // "bindings": [
  1018. // {
  1019. // "role": "roles/owner",
  1020. // "members": [
  1021. // "user:mike@example.com",
  1022. // "group:admins@example.com",
  1023. // "domain:google.com",
  1024. //
  1025. // "serviceAccount:my-other-app@appspot.gserviceaccount.com"
  1026. // ]
  1027. // },
  1028. // {
  1029. // "role": "roles/viewer",
  1030. // "members": ["user:sean@example.com"]
  1031. // }
  1032. // ]
  1033. // }
  1034. //
  1035. // **YAML Example**
  1036. //
  1037. // bindings:
  1038. // - members:
  1039. // - user:mike@example.com
  1040. // - group:admins@example.com
  1041. // - domain:google.com
  1042. // - serviceAccount:my-other-app@appspot.gserviceaccount.com
  1043. // role: roles/owner
  1044. // - members:
  1045. // - user:sean@example.com
  1046. // role: roles/viewer
  1047. //
  1048. //
  1049. // For a description of IAM and its features, see the
  1050. // [IAM developer's guide](https://cloud.google.com/iam/docs).
  1051. type GoogleIamV1__Policy struct {
  1052. // Bindings: Associates a list of `members` to a `role`.
  1053. // `bindings` with no members will result in an error.
  1054. Bindings []*GoogleIamV1__Binding `json:"bindings,omitempty"`
  1055. // Etag: `etag` is used for optimistic concurrency control as a way to
  1056. // help
  1057. // prevent simultaneous updates of a policy from overwriting each
  1058. // other.
  1059. // It is strongly suggested that systems make use of the `etag` in
  1060. // the
  1061. // read-modify-write cycle to perform policy updates in order to avoid
  1062. // race
  1063. // conditions: An `etag` is returned in the response to `getIamPolicy`,
  1064. // and
  1065. // systems are expected to put that etag in the request to
  1066. // `setIamPolicy` to
  1067. // ensure that their change will be applied to the same version of the
  1068. // policy.
  1069. //
  1070. // If no `etag` is provided in the call to `setIamPolicy`, then the
  1071. // existing
  1072. // policy is overwritten blindly.
  1073. Etag string `json:"etag,omitempty"`
  1074. // Version: Deprecated.
  1075. Version int64 `json:"version,omitempty"`
  1076. // ServerResponse contains the HTTP response code and headers from the
  1077. // server.
  1078. googleapi.ServerResponse `json:"-"`
  1079. // ForceSendFields is a list of field names (e.g. "Bindings") to
  1080. // unconditionally include in API requests. By default, fields with
  1081. // empty values are omitted from API requests. However, any non-pointer,
  1082. // non-interface field appearing in ForceSendFields will be sent to the
  1083. // server regardless of whether the field is empty or not. This may be
  1084. // used to include empty fields in Patch requests.
  1085. ForceSendFields []string `json:"-"`
  1086. // NullFields is a list of field names (e.g. "Bindings") to include in
  1087. // API requests with the JSON null value. By default, fields with empty
  1088. // values are omitted from API requests. However, any field with an
  1089. // empty value appearing in NullFields will be sent to the server as
  1090. // null. It is an error if a field in this list has a non-empty value.
  1091. // This may be used to include null fields in Patch requests.
  1092. NullFields []string `json:"-"`
  1093. }
  1094. func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) {
  1095. type NoMethod GoogleIamV1__Policy
  1096. raw := NoMethod(*s)
  1097. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1098. }
  1099. // GoogleIamV1__SetIamPolicyRequest: Request message for `SetIamPolicy`
  1100. // method.
  1101. type GoogleIamV1__SetIamPolicyRequest struct {
  1102. // Policy: REQUIRED: The complete policy to be applied to the
  1103. // `resource`. The size of
  1104. // the policy is limited to a few 10s of KB. An empty policy is a
  1105. // valid policy but certain Cloud Platform services (such as
  1106. // Projects)
  1107. // might reject them.
  1108. Policy *GoogleIamV1__Policy `json:"policy,omitempty"`
  1109. // ForceSendFields is a list of field names (e.g. "Policy") to
  1110. // unconditionally include in API requests. By default, fields with
  1111. // empty values are omitted from API requests. However, any non-pointer,
  1112. // non-interface field appearing in ForceSendFields will be sent to the
  1113. // server regardless of whether the field is empty or not. This may be
  1114. // used to include empty fields in Patch requests.
  1115. ForceSendFields []string `json:"-"`
  1116. // NullFields is a list of field names (e.g. "Policy") to include in API
  1117. // requests with the JSON null value. By default, fields with empty
  1118. // values are omitted from API requests. However, any field with an
  1119. // empty value appearing in NullFields will be sent to the server as
  1120. // null. It is an error if a field in this list has a non-empty value.
  1121. // This may be used to include null fields in Patch requests.
  1122. NullFields []string `json:"-"`
  1123. }
  1124. func (s *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1125. type NoMethod GoogleIamV1__SetIamPolicyRequest
  1126. raw := NoMethod(*s)
  1127. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1128. }
  1129. // GoogleIamV1__TestIamPermissionsRequest: Request message for
  1130. // `TestIamPermissions` method.
  1131. type GoogleIamV1__TestIamPermissionsRequest struct {
  1132. // Permissions: The set of permissions to check for the `resource`.
  1133. // Permissions with
  1134. // wildcards (such as '*' or 'storage.*') are not allowed. For
  1135. // more
  1136. // information see
  1137. // [IAM
  1138. // Overview](https://cloud.google.com/iam/docs/overview#permissions).
  1139. Permissions []string `json:"permissions,omitempty"`
  1140. // ForceSendFields is a list of field names (e.g. "Permissions") to
  1141. // unconditionally include in API requests. By default, fields with
  1142. // empty values are omitted from API requests. However, any non-pointer,
  1143. // non-interface field appearing in ForceSendFields will be sent to the
  1144. // server regardless of whether the field is empty or not. This may be
  1145. // used to include empty fields in Patch requests.
  1146. ForceSendFields []string `json:"-"`
  1147. // NullFields is a list of field names (e.g. "Permissions") to include
  1148. // in API requests with the JSON null value. By default, fields with
  1149. // empty values are omitted from API requests. However, any field with
  1150. // an empty value appearing in NullFields will be sent to the server as
  1151. // null. It is an error if a field in this list has a non-empty value.
  1152. // This may be used to include null fields in Patch requests.
  1153. NullFields []string `json:"-"`
  1154. }
  1155. func (s *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1156. type NoMethod GoogleIamV1__TestIamPermissionsRequest
  1157. raw := NoMethod(*s)
  1158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1159. }
  1160. // GoogleIamV1__TestIamPermissionsResponse: Response message for
  1161. // `TestIamPermissions` method.
  1162. type GoogleIamV1__TestIamPermissionsResponse struct {
  1163. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  1164. // the caller is
  1165. // allowed.
  1166. Permissions []string `json:"permissions,omitempty"`
  1167. // ServerResponse contains the HTTP response code and headers from the
  1168. // server.
  1169. googleapi.ServerResponse `json:"-"`
  1170. // ForceSendFields is a list of field names (e.g. "Permissions") to
  1171. // unconditionally include in API requests. By default, fields with
  1172. // empty values are omitted from API requests. However, any non-pointer,
  1173. // non-interface field appearing in ForceSendFields will be sent to the
  1174. // server regardless of whether the field is empty or not. This may be
  1175. // used to include empty fields in Patch requests.
  1176. ForceSendFields []string `json:"-"`
  1177. // NullFields is a list of field names (e.g. "Permissions") to include
  1178. // in API requests with the JSON null value. By default, fields with
  1179. // empty values are omitted from API requests. However, any field with
  1180. // an empty value appearing in NullFields will be sent to the server as
  1181. // null. It is an error if a field in this list has a non-empty value.
  1182. // This may be used to include null fields in Patch requests.
  1183. NullFields []string `json:"-"`
  1184. }
  1185. func (s *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1186. type NoMethod GoogleIamV1__TestIamPermissionsResponse
  1187. raw := NoMethod(*s)
  1188. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1189. }
  1190. // GoogleProtobuf__Empty: A generic empty message that you can re-use to
  1191. // avoid defining duplicated
  1192. // empty messages in your APIs. A typical example is to use it as the
  1193. // request
  1194. // or the response type of an API method. For instance:
  1195. //
  1196. // service Foo {
  1197. // rpc Bar(google.protobuf.Empty) returns
  1198. // (google.protobuf.Empty);
  1199. // }
  1200. //
  1201. // The JSON representation for `Empty` is empty JSON object `{}`.
  1202. type GoogleProtobuf__Empty struct {
  1203. // ServerResponse contains the HTTP response code and headers from the
  1204. // server.
  1205. googleapi.ServerResponse `json:"-"`
  1206. }
  1207. // method id "servicebroker.projects.brokers.create":
  1208. type ProjectsBrokersCreateCall struct {
  1209. s *Service
  1210. parent string
  1211. googlecloudservicebrokerv1beta1__broker *GoogleCloudServicebrokerV1beta1__Broker
  1212. urlParams_ gensupport.URLParams
  1213. ctx_ context.Context
  1214. header_ http.Header
  1215. }
  1216. // Create: CreateBroker creates a Broker.
  1217. func (r *ProjectsBrokersService) Create(parent string, googlecloudservicebrokerv1beta1__broker *GoogleCloudServicebrokerV1beta1__Broker) *ProjectsBrokersCreateCall {
  1218. c := &ProjectsBrokersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1219. c.parent = parent
  1220. c.googlecloudservicebrokerv1beta1__broker = googlecloudservicebrokerv1beta1__broker
  1221. return c
  1222. }
  1223. // Fields allows partial responses to be retrieved. See
  1224. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1225. // for more information.
  1226. func (c *ProjectsBrokersCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersCreateCall {
  1227. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1228. return c
  1229. }
  1230. // Context sets the context to be used in this call's Do method. Any
  1231. // pending HTTP request will be aborted if the provided context is
  1232. // canceled.
  1233. func (c *ProjectsBrokersCreateCall) Context(ctx context.Context) *ProjectsBrokersCreateCall {
  1234. c.ctx_ = ctx
  1235. return c
  1236. }
  1237. // Header returns an http.Header that can be modified by the caller to
  1238. // add HTTP headers to the request.
  1239. func (c *ProjectsBrokersCreateCall) Header() http.Header {
  1240. if c.header_ == nil {
  1241. c.header_ = make(http.Header)
  1242. }
  1243. return c.header_
  1244. }
  1245. func (c *ProjectsBrokersCreateCall) doRequest(alt string) (*http.Response, error) {
  1246. reqHeaders := make(http.Header)
  1247. for k, v := range c.header_ {
  1248. reqHeaders[k] = v
  1249. }
  1250. reqHeaders.Set("User-Agent", c.s.userAgent())
  1251. var body io.Reader = nil
  1252. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__broker)
  1253. if err != nil {
  1254. return nil, err
  1255. }
  1256. reqHeaders.Set("Content-Type", "application/json")
  1257. c.urlParams_.Set("alt", alt)
  1258. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/brokers")
  1259. urls += "?" + c.urlParams_.Encode()
  1260. req, _ := http.NewRequest("POST", urls, body)
  1261. req.Header = reqHeaders
  1262. googleapi.Expand(req.URL, map[string]string{
  1263. "parent": c.parent,
  1264. })
  1265. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1266. }
  1267. // Do executes the "servicebroker.projects.brokers.create" call.
  1268. // Exactly one of *GoogleCloudServicebrokerV1beta1__Broker or error will
  1269. // be non-nil. Any non-2xx status code is an error. Response headers are
  1270. // in either
  1271. // *GoogleCloudServicebrokerV1beta1__Broker.ServerResponse.Header or (if
  1272. // a response was returned at all) in error.(*googleapi.Error).Header.
  1273. // Use googleapi.IsNotModified to check whether the returned error was
  1274. // because http.StatusNotModified was returned.
  1275. func (c *ProjectsBrokersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Broker, error) {
  1276. gensupport.SetOptions(c.urlParams_, opts...)
  1277. res, err := c.doRequest("json")
  1278. if res != nil && res.StatusCode == http.StatusNotModified {
  1279. if res.Body != nil {
  1280. res.Body.Close()
  1281. }
  1282. return nil, &googleapi.Error{
  1283. Code: res.StatusCode,
  1284. Header: res.Header,
  1285. }
  1286. }
  1287. if err != nil {
  1288. return nil, err
  1289. }
  1290. defer googleapi.CloseBody(res)
  1291. if err := googleapi.CheckResponse(res); err != nil {
  1292. return nil, err
  1293. }
  1294. ret := &GoogleCloudServicebrokerV1beta1__Broker{
  1295. ServerResponse: googleapi.ServerResponse{
  1296. Header: res.Header,
  1297. HTTPStatusCode: res.StatusCode,
  1298. },
  1299. }
  1300. target := &ret
  1301. if err := gensupport.DecodeResponse(target, res); err != nil {
  1302. return nil, err
  1303. }
  1304. return ret, nil
  1305. // {
  1306. // "description": "CreateBroker creates a Broker.",
  1307. // "flatPath": "v1beta1/projects/{projectsId}/brokers",
  1308. // "httpMethod": "POST",
  1309. // "id": "servicebroker.projects.brokers.create",
  1310. // "parameterOrder": [
  1311. // "parent"
  1312. // ],
  1313. // "parameters": {
  1314. // "parent": {
  1315. // "description": "The project in which to create broker.",
  1316. // "location": "path",
  1317. // "pattern": "^projects/[^/]+$",
  1318. // "required": true,
  1319. // "type": "string"
  1320. // }
  1321. // },
  1322. // "path": "v1beta1/{+parent}/brokers",
  1323. // "request": {
  1324. // "$ref": "GoogleCloudServicebrokerV1beta1__Broker"
  1325. // },
  1326. // "response": {
  1327. // "$ref": "GoogleCloudServicebrokerV1beta1__Broker"
  1328. // },
  1329. // "scopes": [
  1330. // "https://www.googleapis.com/auth/cloud-platform"
  1331. // ]
  1332. // }
  1333. }
  1334. // method id "servicebroker.projects.brokers.delete":
  1335. type ProjectsBrokersDeleteCall struct {
  1336. s *Service
  1337. name string
  1338. urlParams_ gensupport.URLParams
  1339. ctx_ context.Context
  1340. header_ http.Header
  1341. }
  1342. // Delete: DeleteBroker deletes a Broker.
  1343. func (r *ProjectsBrokersService) Delete(name string) *ProjectsBrokersDeleteCall {
  1344. c := &ProjectsBrokersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1345. c.name = name
  1346. return c
  1347. }
  1348. // Fields allows partial responses to be retrieved. See
  1349. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1350. // for more information.
  1351. func (c *ProjectsBrokersDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersDeleteCall {
  1352. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1353. return c
  1354. }
  1355. // Context sets the context to be used in this call's Do method. Any
  1356. // pending HTTP request will be aborted if the provided context is
  1357. // canceled.
  1358. func (c *ProjectsBrokersDeleteCall) Context(ctx context.Context) *ProjectsBrokersDeleteCall {
  1359. c.ctx_ = ctx
  1360. return c
  1361. }
  1362. // Header returns an http.Header that can be modified by the caller to
  1363. // add HTTP headers to the request.
  1364. func (c *ProjectsBrokersDeleteCall) Header() http.Header {
  1365. if c.header_ == nil {
  1366. c.header_ = make(http.Header)
  1367. }
  1368. return c.header_
  1369. }
  1370. func (c *ProjectsBrokersDeleteCall) doRequest(alt string) (*http.Response, error) {
  1371. reqHeaders := make(http.Header)
  1372. for k, v := range c.header_ {
  1373. reqHeaders[k] = v
  1374. }
  1375. reqHeaders.Set("User-Agent", c.s.userAgent())
  1376. var body io.Reader = nil
  1377. c.urlParams_.Set("alt", alt)
  1378. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1379. urls += "?" + c.urlParams_.Encode()
  1380. req, _ := http.NewRequest("DELETE", urls, body)
  1381. req.Header = reqHeaders
  1382. googleapi.Expand(req.URL, map[string]string{
  1383. "name": c.name,
  1384. })
  1385. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1386. }
  1387. // Do executes the "servicebroker.projects.brokers.delete" call.
  1388. // Exactly one of *GoogleProtobuf__Empty or error will be non-nil. Any
  1389. // non-2xx status code is an error. Response headers are in either
  1390. // *GoogleProtobuf__Empty.ServerResponse.Header or (if a response was
  1391. // returned at all) in error.(*googleapi.Error).Header. Use
  1392. // googleapi.IsNotModified to check whether the returned error was
  1393. // because http.StatusNotModified was returned.
  1394. func (c *ProjectsBrokersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
  1395. gensupport.SetOptions(c.urlParams_, opts...)
  1396. res, err := c.doRequest("json")
  1397. if res != nil && res.StatusCode == http.StatusNotModified {
  1398. if res.Body != nil {
  1399. res.Body.Close()
  1400. }
  1401. return nil, &googleapi.Error{
  1402. Code: res.StatusCode,
  1403. Header: res.Header,
  1404. }
  1405. }
  1406. if err != nil {
  1407. return nil, err
  1408. }
  1409. defer googleapi.CloseBody(res)
  1410. if err := googleapi.CheckResponse(res); err != nil {
  1411. return nil, err
  1412. }
  1413. ret := &GoogleProtobuf__Empty{
  1414. ServerResponse: googleapi.ServerResponse{
  1415. Header: res.Header,
  1416. HTTPStatusCode: res.StatusCode,
  1417. },
  1418. }
  1419. target := &ret
  1420. if err := gensupport.DecodeResponse(target, res); err != nil {
  1421. return nil, err
  1422. }
  1423. return ret, nil
  1424. // {
  1425. // "description": "DeleteBroker deletes a Broker.",
  1426. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}",
  1427. // "httpMethod": "DELETE",
  1428. // "id": "servicebroker.projects.brokers.delete",
  1429. // "parameterOrder": [
  1430. // "name"
  1431. // ],
  1432. // "parameters": {
  1433. // "name": {
  1434. // "description": "The broker to delete.",
  1435. // "location": "path",
  1436. // "pattern": "^projects/[^/]+/brokers/[^/]+$",
  1437. // "required": true,
  1438. // "type": "string"
  1439. // }
  1440. // },
  1441. // "path": "v1beta1/{+name}",
  1442. // "response": {
  1443. // "$ref": "GoogleProtobuf__Empty"
  1444. // },
  1445. // "scopes": [
  1446. // "https://www.googleapis.com/auth/cloud-platform"
  1447. // ]
  1448. // }
  1449. }
  1450. // method id "servicebroker.projects.brokers.list":
  1451. type ProjectsBrokersListCall struct {
  1452. s *Service
  1453. parent string
  1454. urlParams_ gensupport.URLParams
  1455. ifNoneMatch_ string
  1456. ctx_ context.Context
  1457. header_ http.Header
  1458. }
  1459. // List: ListBrokers lists brokers.
  1460. func (r *ProjectsBrokersService) List(parent string) *ProjectsBrokersListCall {
  1461. c := &ProjectsBrokersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1462. c.parent = parent
  1463. return c
  1464. }
  1465. // PageSize sets the optional parameter "pageSize": Specifies the number
  1466. // of results to return per page. If there are fewer
  1467. // elements than the specified number, returns all elements.
  1468. // Acceptable values are 0 to 200, inclusive. (Default: 100)
  1469. func (c *ProjectsBrokersListCall) PageSize(pageSize int64) *ProjectsBrokersListCall {
  1470. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1471. return c
  1472. }
  1473. // PageToken sets the optional parameter "pageToken": Specifies a page
  1474. // token to use. Set `pageToken` to a `nextPageToken`
  1475. // returned by a previous list request to get the next page of results.
  1476. func (c *ProjectsBrokersListCall) PageToken(pageToken string) *ProjectsBrokersListCall {
  1477. c.urlParams_.Set("pageToken", pageToken)
  1478. return c
  1479. }
  1480. // Fields allows partial responses to be retrieved. See
  1481. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1482. // for more information.
  1483. func (c *ProjectsBrokersListCall) Fields(s ...googleapi.Field) *ProjectsBrokersListCall {
  1484. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1485. return c
  1486. }
  1487. // IfNoneMatch sets the optional parameter which makes the operation
  1488. // fail if the object's ETag matches the given value. This is useful for
  1489. // getting updates only after the object has changed since the last
  1490. // request. Use googleapi.IsNotModified to check whether the response
  1491. // error from Do is the result of In-None-Match.
  1492. func (c *ProjectsBrokersListCall) IfNoneMatch(entityTag string) *ProjectsBrokersListCall {
  1493. c.ifNoneMatch_ = entityTag
  1494. return c
  1495. }
  1496. // Context sets the context to be used in this call's Do method. Any
  1497. // pending HTTP request will be aborted if the provided context is
  1498. // canceled.
  1499. func (c *ProjectsBrokersListCall) Context(ctx context.Context) *ProjectsBrokersListCall {
  1500. c.ctx_ = ctx
  1501. return c
  1502. }
  1503. // Header returns an http.Header that can be modified by the caller to
  1504. // add HTTP headers to the request.
  1505. func (c *ProjectsBrokersListCall) Header() http.Header {
  1506. if c.header_ == nil {
  1507. c.header_ = make(http.Header)
  1508. }
  1509. return c.header_
  1510. }
  1511. func (c *ProjectsBrokersListCall) doRequest(alt string) (*http.Response, error) {
  1512. reqHeaders := make(http.Header)
  1513. for k, v := range c.header_ {
  1514. reqHeaders[k] = v
  1515. }
  1516. reqHeaders.Set("User-Agent", c.s.userAgent())
  1517. if c.ifNoneMatch_ != "" {
  1518. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1519. }
  1520. var body io.Reader = nil
  1521. c.urlParams_.Set("alt", alt)
  1522. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/brokers")
  1523. urls += "?" + c.urlParams_.Encode()
  1524. req, _ := http.NewRequest("GET", urls, body)
  1525. req.Header = reqHeaders
  1526. googleapi.Expand(req.URL, map[string]string{
  1527. "parent": c.parent,
  1528. })
  1529. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1530. }
  1531. // Do executes the "servicebroker.projects.brokers.list" call.
  1532. // Exactly one of *GoogleCloudServicebrokerV1beta1__ListBrokersResponse
  1533. // or error will be non-nil. Any non-2xx status code is an error.
  1534. // Response headers are in either
  1535. // *GoogleCloudServicebrokerV1beta1__ListBrokersResponse.ServerResponse.H
  1536. // eader or (if a response was returned at all) in
  1537. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1538. // whether the returned error was because http.StatusNotModified was
  1539. // returned.
  1540. func (c *ProjectsBrokersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListBrokersResponse, error) {
  1541. gensupport.SetOptions(c.urlParams_, opts...)
  1542. res, err := c.doRequest("json")
  1543. if res != nil && res.StatusCode == http.StatusNotModified {
  1544. if res.Body != nil {
  1545. res.Body.Close()
  1546. }
  1547. return nil, &googleapi.Error{
  1548. Code: res.StatusCode,
  1549. Header: res.Header,
  1550. }
  1551. }
  1552. if err != nil {
  1553. return nil, err
  1554. }
  1555. defer googleapi.CloseBody(res)
  1556. if err := googleapi.CheckResponse(res); err != nil {
  1557. return nil, err
  1558. }
  1559. ret := &GoogleCloudServicebrokerV1beta1__ListBrokersResponse{
  1560. ServerResponse: googleapi.ServerResponse{
  1561. Header: res.Header,
  1562. HTTPStatusCode: res.StatusCode,
  1563. },
  1564. }
  1565. target := &ret
  1566. if err := gensupport.DecodeResponse(target, res); err != nil {
  1567. return nil, err
  1568. }
  1569. return ret, nil
  1570. // {
  1571. // "description": "ListBrokers lists brokers.",
  1572. // "flatPath": "v1beta1/projects/{projectsId}/brokers",
  1573. // "httpMethod": "GET",
  1574. // "id": "servicebroker.projects.brokers.list",
  1575. // "parameterOrder": [
  1576. // "parent"
  1577. // ],
  1578. // "parameters": {
  1579. // "pageSize": {
  1580. // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. Acceptable values are 0 to 200, inclusive. (Default: 100)",
  1581. // "format": "int32",
  1582. // "location": "query",
  1583. // "type": "integer"
  1584. // },
  1585. // "pageToken": {
  1586. // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.",
  1587. // "location": "query",
  1588. // "type": "string"
  1589. // },
  1590. // "parent": {
  1591. // "description": "Parent must match `projects/[PROJECT_ID]/brokers`.",
  1592. // "location": "path",
  1593. // "pattern": "^projects/[^/]+$",
  1594. // "required": true,
  1595. // "type": "string"
  1596. // }
  1597. // },
  1598. // "path": "v1beta1/{+parent}/brokers",
  1599. // "response": {
  1600. // "$ref": "GoogleCloudServicebrokerV1beta1__ListBrokersResponse"
  1601. // },
  1602. // "scopes": [
  1603. // "https://www.googleapis.com/auth/cloud-platform"
  1604. // ]
  1605. // }
  1606. }
  1607. // Pages invokes f for each page of results.
  1608. // A non-nil error returned from f will halt the iteration.
  1609. // The provided context supersedes any context provided to the Context method.
  1610. func (c *ProjectsBrokersListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListBrokersResponse) error) error {
  1611. c.ctx_ = ctx
  1612. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1613. for {
  1614. x, err := c.Do()
  1615. if err != nil {
  1616. return err
  1617. }
  1618. if err := f(x); err != nil {
  1619. return err
  1620. }
  1621. if x.NextPageToken == "" {
  1622. return nil
  1623. }
  1624. c.PageToken(x.NextPageToken)
  1625. }
  1626. }
  1627. // method id "servicebroker.projects.brokers.instances.get":
  1628. type ProjectsBrokersInstancesGetCall struct {
  1629. s *Service
  1630. name string
  1631. urlParams_ gensupport.URLParams
  1632. ifNoneMatch_ string
  1633. ctx_ context.Context
  1634. header_ http.Header
  1635. }
  1636. // Get: Gets the given service instance from the system.
  1637. // The API call accepts both OSB style API and standard google style
  1638. // API
  1639. // resource path.
  1640. // i.e. both `projects/*/brokers/*/instances/*`
  1641. // and `projects/*/brokers/*/v2/service_instances/*` are acceptable
  1642. // paths.
  1643. func (r *ProjectsBrokersInstancesService) Get(name string) *ProjectsBrokersInstancesGetCall {
  1644. c := &ProjectsBrokersInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1645. c.name = name
  1646. return c
  1647. }
  1648. // Fields allows partial responses to be retrieved. See
  1649. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1650. // for more information.
  1651. func (c *ProjectsBrokersInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesGetCall {
  1652. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1653. return c
  1654. }
  1655. // IfNoneMatch sets the optional parameter which makes the operation
  1656. // fail if the object's ETag matches the given value. This is useful for
  1657. // getting updates only after the object has changed since the last
  1658. // request. Use googleapi.IsNotModified to check whether the response
  1659. // error from Do is the result of In-None-Match.
  1660. func (c *ProjectsBrokersInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesGetCall {
  1661. c.ifNoneMatch_ = entityTag
  1662. return c
  1663. }
  1664. // Context sets the context to be used in this call's Do method. Any
  1665. // pending HTTP request will be aborted if the provided context is
  1666. // canceled.
  1667. func (c *ProjectsBrokersInstancesGetCall) Context(ctx context.Context) *ProjectsBrokersInstancesGetCall {
  1668. c.ctx_ = ctx
  1669. return c
  1670. }
  1671. // Header returns an http.Header that can be modified by the caller to
  1672. // add HTTP headers to the request.
  1673. func (c *ProjectsBrokersInstancesGetCall) Header() http.Header {
  1674. if c.header_ == nil {
  1675. c.header_ = make(http.Header)
  1676. }
  1677. return c.header_
  1678. }
  1679. func (c *ProjectsBrokersInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  1680. reqHeaders := make(http.Header)
  1681. for k, v := range c.header_ {
  1682. reqHeaders[k] = v
  1683. }
  1684. reqHeaders.Set("User-Agent", c.s.userAgent())
  1685. if c.ifNoneMatch_ != "" {
  1686. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1687. }
  1688. var body io.Reader = nil
  1689. c.urlParams_.Set("alt", alt)
  1690. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1691. urls += "?" + c.urlParams_.Encode()
  1692. req, _ := http.NewRequest("GET", urls, body)
  1693. req.Header = reqHeaders
  1694. googleapi.Expand(req.URL, map[string]string{
  1695. "name": c.name,
  1696. })
  1697. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1698. }
  1699. // Do executes the "servicebroker.projects.brokers.instances.get" call.
  1700. // Exactly one of *GoogleCloudServicebrokerV1beta1__ServiceInstance or
  1701. // error will be non-nil. Any non-2xx status code is an error. Response
  1702. // headers are in either
  1703. // *GoogleCloudServicebrokerV1beta1__ServiceInstance.ServerResponse.Heade
  1704. // r or (if a response was returned at all) in
  1705. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1706. // whether the returned error was because http.StatusNotModified was
  1707. // returned.
  1708. func (c *ProjectsBrokersInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ServiceInstance, error) {
  1709. gensupport.SetOptions(c.urlParams_, opts...)
  1710. res, err := c.doRequest("json")
  1711. if res != nil && res.StatusCode == http.StatusNotModified {
  1712. if res.Body != nil {
  1713. res.Body.Close()
  1714. }
  1715. return nil, &googleapi.Error{
  1716. Code: res.StatusCode,
  1717. Header: res.Header,
  1718. }
  1719. }
  1720. if err != nil {
  1721. return nil, err
  1722. }
  1723. defer googleapi.CloseBody(res)
  1724. if err := googleapi.CheckResponse(res); err != nil {
  1725. return nil, err
  1726. }
  1727. ret := &GoogleCloudServicebrokerV1beta1__ServiceInstance{
  1728. ServerResponse: googleapi.ServerResponse{
  1729. Header: res.Header,
  1730. HTTPStatusCode: res.StatusCode,
  1731. },
  1732. }
  1733. target := &ret
  1734. if err := gensupport.DecodeResponse(target, res); err != nil {
  1735. return nil, err
  1736. }
  1737. return ret, nil
  1738. // {
  1739. // "description": "Gets the given service instance from the system.\nThe API call accepts both OSB style API and standard google style API\nresource path.\ni.e. both `projects/*/brokers/*/instances/*`\n and `projects/*/brokers/*/v2/service_instances/*` are acceptable paths.",
  1740. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/instances/{instancesId}",
  1741. // "httpMethod": "GET",
  1742. // "id": "servicebroker.projects.brokers.instances.get",
  1743. // "parameterOrder": [
  1744. // "name"
  1745. // ],
  1746. // "parameters": {
  1747. // "name": {
  1748. // "description": "The resource name of the instance to return.\nName must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/` +\n`v2/service_instances/[INSTANCE_ID]`\nor\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/instances/[INSTANCE_ID]`.",
  1749. // "location": "path",
  1750. // "pattern": "^projects/[^/]+/brokers/[^/]+/instances/[^/]+$",
  1751. // "required": true,
  1752. // "type": "string"
  1753. // }
  1754. // },
  1755. // "path": "v1beta1/{+name}",
  1756. // "response": {
  1757. // "$ref": "GoogleCloudServicebrokerV1beta1__ServiceInstance"
  1758. // },
  1759. // "scopes": [
  1760. // "https://www.googleapis.com/auth/cloud-platform"
  1761. // ]
  1762. // }
  1763. }
  1764. // method id "servicebroker.projects.brokers.instances.getLast_operation":
  1765. type ProjectsBrokersInstancesGetLastOperationCall struct {
  1766. s *Service
  1767. name string
  1768. urlParams_ gensupport.URLParams
  1769. ifNoneMatch_ string
  1770. ctx_ context.Context
  1771. header_ http.Header
  1772. }
  1773. // GetLastOperation: Returns the state of the last operation for the
  1774. // service instance.
  1775. // Only last (or current) operation can be polled.
  1776. func (r *ProjectsBrokersInstancesService) GetLastOperation(name string) *ProjectsBrokersInstancesGetLastOperationCall {
  1777. c := &ProjectsBrokersInstancesGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1778. c.name = name
  1779. return c
  1780. }
  1781. // Operation sets the optional parameter "operation": If `operation` was
  1782. // returned during mutation operation, this field must be
  1783. // populated with the provided value.
  1784. func (c *ProjectsBrokersInstancesGetLastOperationCall) Operation(operation string) *ProjectsBrokersInstancesGetLastOperationCall {
  1785. c.urlParams_.Set("operation", operation)
  1786. return c
  1787. }
  1788. // PlanId sets the optional parameter "planId": Plan id.
  1789. func (c *ProjectsBrokersInstancesGetLastOperationCall) PlanId(planId string) *ProjectsBrokersInstancesGetLastOperationCall {
  1790. c.urlParams_.Set("planId", planId)
  1791. return c
  1792. }
  1793. // ServiceId sets the optional parameter "serviceId": Service id.
  1794. func (c *ProjectsBrokersInstancesGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersInstancesGetLastOperationCall {
  1795. c.urlParams_.Set("serviceId", serviceId)
  1796. return c
  1797. }
  1798. // Fields allows partial responses to be retrieved. See
  1799. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1800. // for more information.
  1801. func (c *ProjectsBrokersInstancesGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesGetLastOperationCall {
  1802. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1803. return c
  1804. }
  1805. // IfNoneMatch sets the optional parameter which makes the operation
  1806. // fail if the object's ETag matches the given value. This is useful for
  1807. // getting updates only after the object has changed since the last
  1808. // request. Use googleapi.IsNotModified to check whether the response
  1809. // error from Do is the result of In-None-Match.
  1810. func (c *ProjectsBrokersInstancesGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesGetLastOperationCall {
  1811. c.ifNoneMatch_ = entityTag
  1812. return c
  1813. }
  1814. // Context sets the context to be used in this call's Do method. Any
  1815. // pending HTTP request will be aborted if the provided context is
  1816. // canceled.
  1817. func (c *ProjectsBrokersInstancesGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersInstancesGetLastOperationCall {
  1818. c.ctx_ = ctx
  1819. return c
  1820. }
  1821. // Header returns an http.Header that can be modified by the caller to
  1822. // add HTTP headers to the request.
  1823. func (c *ProjectsBrokersInstancesGetLastOperationCall) Header() http.Header {
  1824. if c.header_ == nil {
  1825. c.header_ = make(http.Header)
  1826. }
  1827. return c.header_
  1828. }
  1829. func (c *ProjectsBrokersInstancesGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
  1830. reqHeaders := make(http.Header)
  1831. for k, v := range c.header_ {
  1832. reqHeaders[k] = v
  1833. }
  1834. reqHeaders.Set("User-Agent", c.s.userAgent())
  1835. if c.ifNoneMatch_ != "" {
  1836. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1837. }
  1838. var body io.Reader = nil
  1839. c.urlParams_.Set("alt", alt)
  1840. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
  1841. urls += "?" + c.urlParams_.Encode()
  1842. req, _ := http.NewRequest("GET", urls, body)
  1843. req.Header = reqHeaders
  1844. googleapi.Expand(req.URL, map[string]string{
  1845. "name": c.name,
  1846. })
  1847. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1848. }
  1849. // Do executes the "servicebroker.projects.brokers.instances.getLast_operation" call.
  1850. // Exactly one of *GoogleCloudServicebrokerV1beta1__Operation or error
  1851. // will be non-nil. Any non-2xx status code is an error. Response
  1852. // headers are in either
  1853. // *GoogleCloudServicebrokerV1beta1__Operation.ServerResponse.Header or
  1854. // (if a response was returned at all) in
  1855. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1856. // whether the returned error was because http.StatusNotModified was
  1857. // returned.
  1858. func (c *ProjectsBrokersInstancesGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
  1859. gensupport.SetOptions(c.urlParams_, opts...)
  1860. res, err := c.doRequest("json")
  1861. if res != nil && res.StatusCode == http.StatusNotModified {
  1862. if res.Body != nil {
  1863. res.Body.Close()
  1864. }
  1865. return nil, &googleapi.Error{
  1866. Code: res.StatusCode,
  1867. Header: res.Header,
  1868. }
  1869. }
  1870. if err != nil {
  1871. return nil, err
  1872. }
  1873. defer googleapi.CloseBody(res)
  1874. if err := googleapi.CheckResponse(res); err != nil {
  1875. return nil, err
  1876. }
  1877. ret := &GoogleCloudServicebrokerV1beta1__Operation{
  1878. ServerResponse: googleapi.ServerResponse{
  1879. Header: res.Header,
  1880. HTTPStatusCode: res.StatusCode,
  1881. },
  1882. }
  1883. target := &ret
  1884. if err := gensupport.DecodeResponse(target, res); err != nil {
  1885. return nil, err
  1886. }
  1887. return ret, nil
  1888. // {
  1889. // "description": "Returns the state of the last operation for the service instance.\nOnly last (or current) operation can be polled.",
  1890. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/instances/{instancesId}/last_operation",
  1891. // "httpMethod": "GET",
  1892. // "id": "servicebroker.projects.brokers.instances.getLast_operation",
  1893. // "parameterOrder": [
  1894. // "name"
  1895. // ],
  1896. // "parameters": {
  1897. // "name": {
  1898. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/`+\n `service_instances/[INSTANCE_ID]`.",
  1899. // "location": "path",
  1900. // "pattern": "^projects/[^/]+/brokers/[^/]+/instances/[^/]+$",
  1901. // "required": true,
  1902. // "type": "string"
  1903. // },
  1904. // "operation": {
  1905. // "description": "If `operation` was returned during mutation operation, this field must be\npopulated with the provided value.",
  1906. // "location": "query",
  1907. // "type": "string"
  1908. // },
  1909. // "planId": {
  1910. // "description": "Plan id.",
  1911. // "location": "query",
  1912. // "type": "string"
  1913. // },
  1914. // "serviceId": {
  1915. // "description": "Service id.",
  1916. // "location": "query",
  1917. // "type": "string"
  1918. // }
  1919. // },
  1920. // "path": "v1beta1/{+name}/last_operation",
  1921. // "response": {
  1922. // "$ref": "GoogleCloudServicebrokerV1beta1__Operation"
  1923. // },
  1924. // "scopes": [
  1925. // "https://www.googleapis.com/auth/cloud-platform"
  1926. // ]
  1927. // }
  1928. }
  1929. // method id "servicebroker.projects.brokers.instances.list":
  1930. type ProjectsBrokersInstancesListCall struct {
  1931. s *Service
  1932. parent string
  1933. urlParams_ gensupport.URLParams
  1934. ifNoneMatch_ string
  1935. ctx_ context.Context
  1936. header_ http.Header
  1937. }
  1938. // List: Lists all the instances in the brokers
  1939. // This API is an extension and not part of the OSB spec.
  1940. // Hence the path is a standard Google API URL.
  1941. func (r *ProjectsBrokersInstancesService) List(parent string) *ProjectsBrokersInstancesListCall {
  1942. c := &ProjectsBrokersInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1943. c.parent = parent
  1944. return c
  1945. }
  1946. // PageSize sets the optional parameter "pageSize": Specifies the number
  1947. // of results to return per page. If there are fewer
  1948. // elements than the specified number, returns all elements.
  1949. // Acceptable values are 0 to 200, inclusive. (Default: 100)
  1950. func (c *ProjectsBrokersInstancesListCall) PageSize(pageSize int64) *ProjectsBrokersInstancesListCall {
  1951. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1952. return c
  1953. }
  1954. // PageToken sets the optional parameter "pageToken": Specifies a page
  1955. // token to use. Set `pageToken` to a `nextPageToken`
  1956. // returned by a previous list request to get the next page of results.
  1957. func (c *ProjectsBrokersInstancesListCall) PageToken(pageToken string) *ProjectsBrokersInstancesListCall {
  1958. c.urlParams_.Set("pageToken", pageToken)
  1959. return c
  1960. }
  1961. // Fields allows partial responses to be retrieved. See
  1962. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1963. // for more information.
  1964. func (c *ProjectsBrokersInstancesListCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesListCall {
  1965. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1966. return c
  1967. }
  1968. // IfNoneMatch sets the optional parameter which makes the operation
  1969. // fail if the object's ETag matches the given value. This is useful for
  1970. // getting updates only after the object has changed since the last
  1971. // request. Use googleapi.IsNotModified to check whether the response
  1972. // error from Do is the result of In-None-Match.
  1973. func (c *ProjectsBrokersInstancesListCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesListCall {
  1974. c.ifNoneMatch_ = entityTag
  1975. return c
  1976. }
  1977. // Context sets the context to be used in this call's Do method. Any
  1978. // pending HTTP request will be aborted if the provided context is
  1979. // canceled.
  1980. func (c *ProjectsBrokersInstancesListCall) Context(ctx context.Context) *ProjectsBrokersInstancesListCall {
  1981. c.ctx_ = ctx
  1982. return c
  1983. }
  1984. // Header returns an http.Header that can be modified by the caller to
  1985. // add HTTP headers to the request.
  1986. func (c *ProjectsBrokersInstancesListCall) Header() http.Header {
  1987. if c.header_ == nil {
  1988. c.header_ = make(http.Header)
  1989. }
  1990. return c.header_
  1991. }
  1992. func (c *ProjectsBrokersInstancesListCall) doRequest(alt string) (*http.Response, error) {
  1993. reqHeaders := make(http.Header)
  1994. for k, v := range c.header_ {
  1995. reqHeaders[k] = v
  1996. }
  1997. reqHeaders.Set("User-Agent", c.s.userAgent())
  1998. if c.ifNoneMatch_ != "" {
  1999. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2000. }
  2001. var body io.Reader = nil
  2002. c.urlParams_.Set("alt", alt)
  2003. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances")
  2004. urls += "?" + c.urlParams_.Encode()
  2005. req, _ := http.NewRequest("GET", urls, body)
  2006. req.Header = reqHeaders
  2007. googleapi.Expand(req.URL, map[string]string{
  2008. "parent": c.parent,
  2009. })
  2010. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2011. }
  2012. // Do executes the "servicebroker.projects.brokers.instances.list" call.
  2013. // Exactly one of
  2014. // *GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse or
  2015. // error will be non-nil. Any non-2xx status code is an error. Response
  2016. // headers are in either
  2017. // *GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse.ServerR
  2018. // esponse.Header or (if a response was returned at all) in
  2019. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2020. // whether the returned error was because http.StatusNotModified was
  2021. // returned.
  2022. func (c *ProjectsBrokersInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse, error) {
  2023. gensupport.SetOptions(c.urlParams_, opts...)
  2024. res, err := c.doRequest("json")
  2025. if res != nil && res.StatusCode == http.StatusNotModified {
  2026. if res.Body != nil {
  2027. res.Body.Close()
  2028. }
  2029. return nil, &googleapi.Error{
  2030. Code: res.StatusCode,
  2031. Header: res.Header,
  2032. }
  2033. }
  2034. if err != nil {
  2035. return nil, err
  2036. }
  2037. defer googleapi.CloseBody(res)
  2038. if err := googleapi.CheckResponse(res); err != nil {
  2039. return nil, err
  2040. }
  2041. ret := &GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse{
  2042. ServerResponse: googleapi.ServerResponse{
  2043. Header: res.Header,
  2044. HTTPStatusCode: res.StatusCode,
  2045. },
  2046. }
  2047. target := &ret
  2048. if err := gensupport.DecodeResponse(target, res); err != nil {
  2049. return nil, err
  2050. }
  2051. return ret, nil
  2052. // {
  2053. // "description": "Lists all the instances in the brokers\nThis API is an extension and not part of the OSB spec.\nHence the path is a standard Google API URL.",
  2054. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/instances",
  2055. // "httpMethod": "GET",
  2056. // "id": "servicebroker.projects.brokers.instances.list",
  2057. // "parameterOrder": [
  2058. // "parent"
  2059. // ],
  2060. // "parameters": {
  2061. // "pageSize": {
  2062. // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. Acceptable values are 0 to 200, inclusive. (Default: 100)",
  2063. // "format": "int32",
  2064. // "location": "query",
  2065. // "type": "integer"
  2066. // },
  2067. // "pageToken": {
  2068. // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.",
  2069. // "location": "query",
  2070. // "type": "string"
  2071. // },
  2072. // "parent": {
  2073. // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.",
  2074. // "location": "path",
  2075. // "pattern": "^projects/[^/]+/brokers/[^/]+$",
  2076. // "required": true,
  2077. // "type": "string"
  2078. // }
  2079. // },
  2080. // "path": "v1beta1/{+parent}/instances",
  2081. // "response": {
  2082. // "$ref": "GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse"
  2083. // },
  2084. // "scopes": [
  2085. // "https://www.googleapis.com/auth/cloud-platform"
  2086. // ]
  2087. // }
  2088. }
  2089. // Pages invokes f for each page of results.
  2090. // A non-nil error returned from f will halt the iteration.
  2091. // The provided context supersedes any context provided to the Context method.
  2092. func (c *ProjectsBrokersInstancesListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse) error) error {
  2093. c.ctx_ = ctx
  2094. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2095. for {
  2096. x, err := c.Do()
  2097. if err != nil {
  2098. return err
  2099. }
  2100. if err := f(x); err != nil {
  2101. return err
  2102. }
  2103. if x.NextPageToken == "" {
  2104. return nil
  2105. }
  2106. c.PageToken(x.NextPageToken)
  2107. }
  2108. }
  2109. // method id "servicebroker.projects.brokers.instances.bindings.getLast_operation":
  2110. type ProjectsBrokersInstancesBindingsGetLastOperationCall struct {
  2111. s *Service
  2112. name string
  2113. urlParams_ gensupport.URLParams
  2114. ifNoneMatch_ string
  2115. ctx_ context.Context
  2116. header_ http.Header
  2117. }
  2118. // GetLastOperation: Returns the state of the last operation for the
  2119. // binding.
  2120. // Only last (or current) operation can be polled.
  2121. func (r *ProjectsBrokersInstancesBindingsService) GetLastOperation(name string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2122. c := &ProjectsBrokersInstancesBindingsGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2123. c.name = name
  2124. return c
  2125. }
  2126. // Operation sets the optional parameter "operation": If `operation` was
  2127. // returned during mutation operation, this field must be
  2128. // populated with the provided value.
  2129. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Operation(operation string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2130. c.urlParams_.Set("operation", operation)
  2131. return c
  2132. }
  2133. // PlanId sets the optional parameter "planId": Plan id.
  2134. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) PlanId(planId string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2135. c.urlParams_.Set("planId", planId)
  2136. return c
  2137. }
  2138. // ServiceId sets the optional parameter "serviceId": Service id.
  2139. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2140. c.urlParams_.Set("serviceId", serviceId)
  2141. return c
  2142. }
  2143. // Fields allows partial responses to be retrieved. See
  2144. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2145. // for more information.
  2146. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2147. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2148. return c
  2149. }
  2150. // IfNoneMatch sets the optional parameter which makes the operation
  2151. // fail if the object's ETag matches the given value. This is useful for
  2152. // getting updates only after the object has changed since the last
  2153. // request. Use googleapi.IsNotModified to check whether the response
  2154. // error from Do is the result of In-None-Match.
  2155. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2156. c.ifNoneMatch_ = entityTag
  2157. return c
  2158. }
  2159. // Context sets the context to be used in this call's Do method. Any
  2160. // pending HTTP request will be aborted if the provided context is
  2161. // canceled.
  2162. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
  2163. c.ctx_ = ctx
  2164. return c
  2165. }
  2166. // Header returns an http.Header that can be modified by the caller to
  2167. // add HTTP headers to the request.
  2168. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Header() http.Header {
  2169. if c.header_ == nil {
  2170. c.header_ = make(http.Header)
  2171. }
  2172. return c.header_
  2173. }
  2174. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
  2175. reqHeaders := make(http.Header)
  2176. for k, v := range c.header_ {
  2177. reqHeaders[k] = v
  2178. }
  2179. reqHeaders.Set("User-Agent", c.s.userAgent())
  2180. if c.ifNoneMatch_ != "" {
  2181. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2182. }
  2183. var body io.Reader = nil
  2184. c.urlParams_.Set("alt", alt)
  2185. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
  2186. urls += "?" + c.urlParams_.Encode()
  2187. req, _ := http.NewRequest("GET", urls, body)
  2188. req.Header = reqHeaders
  2189. googleapi.Expand(req.URL, map[string]string{
  2190. "name": c.name,
  2191. })
  2192. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2193. }
  2194. // Do executes the "servicebroker.projects.brokers.instances.bindings.getLast_operation" call.
  2195. // Exactly one of *GoogleCloudServicebrokerV1beta1__Operation or error
  2196. // will be non-nil. Any non-2xx status code is an error. Response
  2197. // headers are in either
  2198. // *GoogleCloudServicebrokerV1beta1__Operation.ServerResponse.Header or
  2199. // (if a response was returned at all) in
  2200. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2201. // whether the returned error was because http.StatusNotModified was
  2202. // returned.
  2203. func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
  2204. gensupport.SetOptions(c.urlParams_, opts...)
  2205. res, err := c.doRequest("json")
  2206. if res != nil && res.StatusCode == http.StatusNotModified {
  2207. if res.Body != nil {
  2208. res.Body.Close()
  2209. }
  2210. return nil, &googleapi.Error{
  2211. Code: res.StatusCode,
  2212. Header: res.Header,
  2213. }
  2214. }
  2215. if err != nil {
  2216. return nil, err
  2217. }
  2218. defer googleapi.CloseBody(res)
  2219. if err := googleapi.CheckResponse(res); err != nil {
  2220. return nil, err
  2221. }
  2222. ret := &GoogleCloudServicebrokerV1beta1__Operation{
  2223. ServerResponse: googleapi.ServerResponse{
  2224. Header: res.Header,
  2225. HTTPStatusCode: res.StatusCode,
  2226. },
  2227. }
  2228. target := &ret
  2229. if err := gensupport.DecodeResponse(target, res); err != nil {
  2230. return nil, err
  2231. }
  2232. return ret, nil
  2233. // {
  2234. // "description": "Returns the state of the last operation for the binding.\nOnly last (or current) operation can be polled.",
  2235. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/instances/{instancesId}/bindings/{bindingsId}/last_operation",
  2236. // "httpMethod": "GET",
  2237. // "id": "servicebroker.projects.brokers.instances.bindings.getLast_operation",
  2238. // "parameterOrder": [
  2239. // "name"
  2240. // ],
  2241. // "parameters": {
  2242. // "name": {
  2243. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/service_instances/[INSTANCE_ID]/service_binding/[BINDING_ID]`.",
  2244. // "location": "path",
  2245. // "pattern": "^projects/[^/]+/brokers/[^/]+/instances/[^/]+/bindings/[^/]+$",
  2246. // "required": true,
  2247. // "type": "string"
  2248. // },
  2249. // "operation": {
  2250. // "description": "If `operation` was returned during mutation operation, this field must be\npopulated with the provided value.",
  2251. // "location": "query",
  2252. // "type": "string"
  2253. // },
  2254. // "planId": {
  2255. // "description": "Plan id.",
  2256. // "location": "query",
  2257. // "type": "string"
  2258. // },
  2259. // "serviceId": {
  2260. // "description": "Service id.",
  2261. // "location": "query",
  2262. // "type": "string"
  2263. // }
  2264. // },
  2265. // "path": "v1beta1/{+name}/last_operation",
  2266. // "response": {
  2267. // "$ref": "GoogleCloudServicebrokerV1beta1__Operation"
  2268. // },
  2269. // "scopes": [
  2270. // "https://www.googleapis.com/auth/cloud-platform"
  2271. // ]
  2272. // }
  2273. }
  2274. // method id "servicebroker.projects.brokers.instances.bindings.list":
  2275. type ProjectsBrokersInstancesBindingsListCall struct {
  2276. s *Service
  2277. parent string
  2278. urlParams_ gensupport.URLParams
  2279. ifNoneMatch_ string
  2280. ctx_ context.Context
  2281. header_ http.Header
  2282. }
  2283. // List: Lists all the bindings in the instance.
  2284. func (r *ProjectsBrokersInstancesBindingsService) List(parent string) *ProjectsBrokersInstancesBindingsListCall {
  2285. c := &ProjectsBrokersInstancesBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2286. c.parent = parent
  2287. return c
  2288. }
  2289. // PageSize sets the optional parameter "pageSize": Specifies the number
  2290. // of results to return per page. If there are fewer
  2291. // elements than the specified number, returns all elements.
  2292. // Acceptable values are 0 to 200, inclusive. (Default: 100)
  2293. func (c *ProjectsBrokersInstancesBindingsListCall) PageSize(pageSize int64) *ProjectsBrokersInstancesBindingsListCall {
  2294. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2295. return c
  2296. }
  2297. // PageToken sets the optional parameter "pageToken": Specifies a page
  2298. // token to use. Set `pageToken` to a `nextPageToken`
  2299. // returned by a previous list request to get the next page of results.
  2300. func (c *ProjectsBrokersInstancesBindingsListCall) PageToken(pageToken string) *ProjectsBrokersInstancesBindingsListCall {
  2301. c.urlParams_.Set("pageToken", pageToken)
  2302. return c
  2303. }
  2304. // Fields allows partial responses to be retrieved. See
  2305. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2306. // for more information.
  2307. func (c *ProjectsBrokersInstancesBindingsListCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesBindingsListCall {
  2308. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2309. return c
  2310. }
  2311. // IfNoneMatch sets the optional parameter which makes the operation
  2312. // fail if the object's ETag matches the given value. This is useful for
  2313. // getting updates only after the object has changed since the last
  2314. // request. Use googleapi.IsNotModified to check whether the response
  2315. // error from Do is the result of In-None-Match.
  2316. func (c *ProjectsBrokersInstancesBindingsListCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesBindingsListCall {
  2317. c.ifNoneMatch_ = entityTag
  2318. return c
  2319. }
  2320. // Context sets the context to be used in this call's Do method. Any
  2321. // pending HTTP request will be aborted if the provided context is
  2322. // canceled.
  2323. func (c *ProjectsBrokersInstancesBindingsListCall) Context(ctx context.Context) *ProjectsBrokersInstancesBindingsListCall {
  2324. c.ctx_ = ctx
  2325. return c
  2326. }
  2327. // Header returns an http.Header that can be modified by the caller to
  2328. // add HTTP headers to the request.
  2329. func (c *ProjectsBrokersInstancesBindingsListCall) Header() http.Header {
  2330. if c.header_ == nil {
  2331. c.header_ = make(http.Header)
  2332. }
  2333. return c.header_
  2334. }
  2335. func (c *ProjectsBrokersInstancesBindingsListCall) doRequest(alt string) (*http.Response, error) {
  2336. reqHeaders := make(http.Header)
  2337. for k, v := range c.header_ {
  2338. reqHeaders[k] = v
  2339. }
  2340. reqHeaders.Set("User-Agent", c.s.userAgent())
  2341. if c.ifNoneMatch_ != "" {
  2342. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2343. }
  2344. var body io.Reader = nil
  2345. c.urlParams_.Set("alt", alt)
  2346. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/bindings")
  2347. urls += "?" + c.urlParams_.Encode()
  2348. req, _ := http.NewRequest("GET", urls, body)
  2349. req.Header = reqHeaders
  2350. googleapi.Expand(req.URL, map[string]string{
  2351. "parent": c.parent,
  2352. })
  2353. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2354. }
  2355. // Do executes the "servicebroker.projects.brokers.instances.bindings.list" call.
  2356. // Exactly one of *GoogleCloudServicebrokerV1beta1__ListBindingsResponse
  2357. // or error will be non-nil. Any non-2xx status code is an error.
  2358. // Response headers are in either
  2359. // *GoogleCloudServicebrokerV1beta1__ListBindingsResponse.ServerResponse.
  2360. // Header or (if a response was returned at all) in
  2361. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2362. // whether the returned error was because http.StatusNotModified was
  2363. // returned.
  2364. func (c *ProjectsBrokersInstancesBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListBindingsResponse, error) {
  2365. gensupport.SetOptions(c.urlParams_, opts...)
  2366. res, err := c.doRequest("json")
  2367. if res != nil && res.StatusCode == http.StatusNotModified {
  2368. if res.Body != nil {
  2369. res.Body.Close()
  2370. }
  2371. return nil, &googleapi.Error{
  2372. Code: res.StatusCode,
  2373. Header: res.Header,
  2374. }
  2375. }
  2376. if err != nil {
  2377. return nil, err
  2378. }
  2379. defer googleapi.CloseBody(res)
  2380. if err := googleapi.CheckResponse(res); err != nil {
  2381. return nil, err
  2382. }
  2383. ret := &GoogleCloudServicebrokerV1beta1__ListBindingsResponse{
  2384. ServerResponse: googleapi.ServerResponse{
  2385. Header: res.Header,
  2386. HTTPStatusCode: res.StatusCode,
  2387. },
  2388. }
  2389. target := &ret
  2390. if err := gensupport.DecodeResponse(target, res); err != nil {
  2391. return nil, err
  2392. }
  2393. return ret, nil
  2394. // {
  2395. // "description": "Lists all the bindings in the instance.",
  2396. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/instances/{instancesId}/bindings",
  2397. // "httpMethod": "GET",
  2398. // "id": "servicebroker.projects.brokers.instances.bindings.list",
  2399. // "parameterOrder": [
  2400. // "parent"
  2401. // ],
  2402. // "parameters": {
  2403. // "pageSize": {
  2404. // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. Acceptable values are 0 to 200, inclusive. (Default: 100)",
  2405. // "format": "int32",
  2406. // "location": "query",
  2407. // "type": "integer"
  2408. // },
  2409. // "pageToken": {
  2410. // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.",
  2411. // "location": "query",
  2412. // "type": "string"
  2413. // },
  2414. // "parent": {
  2415. // "description": "Parent must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/` +\n`v2/service_instances/[INSTANCE_ID]`\nor\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/instances/[INSTANCE_ID]`.",
  2416. // "location": "path",
  2417. // "pattern": "^projects/[^/]+/brokers/[^/]+/instances/[^/]+$",
  2418. // "required": true,
  2419. // "type": "string"
  2420. // }
  2421. // },
  2422. // "path": "v1beta1/{+parent}/bindings",
  2423. // "response": {
  2424. // "$ref": "GoogleCloudServicebrokerV1beta1__ListBindingsResponse"
  2425. // },
  2426. // "scopes": [
  2427. // "https://www.googleapis.com/auth/cloud-platform"
  2428. // ]
  2429. // }
  2430. }
  2431. // Pages invokes f for each page of results.
  2432. // A non-nil error returned from f will halt the iteration.
  2433. // The provided context supersedes any context provided to the Context method.
  2434. func (c *ProjectsBrokersInstancesBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListBindingsResponse) error) error {
  2435. c.ctx_ = ctx
  2436. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2437. for {
  2438. x, err := c.Do()
  2439. if err != nil {
  2440. return err
  2441. }
  2442. if err := f(x); err != nil {
  2443. return err
  2444. }
  2445. if x.NextPageToken == "" {
  2446. return nil
  2447. }
  2448. c.PageToken(x.NextPageToken)
  2449. }
  2450. }
  2451. // method id "servicebroker.projects.brokers.v2.catalog.list":
  2452. type ProjectsBrokersV2CatalogListCall struct {
  2453. s *Service
  2454. parent string
  2455. urlParams_ gensupport.URLParams
  2456. ifNoneMatch_ string
  2457. ctx_ context.Context
  2458. header_ http.Header
  2459. }
  2460. // List: Lists all the Services registered with this broker for
  2461. // consumption for
  2462. // given service registry broker, which contains an set of
  2463. // services.
  2464. // Note, that Service producer API is separate from Broker API.
  2465. func (r *ProjectsBrokersV2CatalogService) List(parent string) *ProjectsBrokersV2CatalogListCall {
  2466. c := &ProjectsBrokersV2CatalogListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2467. c.parent = parent
  2468. return c
  2469. }
  2470. // PageSize sets the optional parameter "pageSize": Specifies the number
  2471. // of results to return per page. If there are fewer
  2472. // elements than the specified number, returns all elements.
  2473. // If unset or 0, all the results will be returned.
  2474. func (c *ProjectsBrokersV2CatalogListCall) PageSize(pageSize int64) *ProjectsBrokersV2CatalogListCall {
  2475. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2476. return c
  2477. }
  2478. // PageToken sets the optional parameter "pageToken": Specifies a page
  2479. // token to use. Set `pageToken` to a `nextPageToken`
  2480. // returned by a previous list request to get the next page of results.
  2481. func (c *ProjectsBrokersV2CatalogListCall) PageToken(pageToken string) *ProjectsBrokersV2CatalogListCall {
  2482. c.urlParams_.Set("pageToken", pageToken)
  2483. return c
  2484. }
  2485. // Fields allows partial responses to be retrieved. See
  2486. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2487. // for more information.
  2488. func (c *ProjectsBrokersV2CatalogListCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2CatalogListCall {
  2489. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2490. return c
  2491. }
  2492. // IfNoneMatch sets the optional parameter which makes the operation
  2493. // fail if the object's ETag matches the given value. This is useful for
  2494. // getting updates only after the object has changed since the last
  2495. // request. Use googleapi.IsNotModified to check whether the response
  2496. // error from Do is the result of In-None-Match.
  2497. func (c *ProjectsBrokersV2CatalogListCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2CatalogListCall {
  2498. c.ifNoneMatch_ = entityTag
  2499. return c
  2500. }
  2501. // Context sets the context to be used in this call's Do method. Any
  2502. // pending HTTP request will be aborted if the provided context is
  2503. // canceled.
  2504. func (c *ProjectsBrokersV2CatalogListCall) Context(ctx context.Context) *ProjectsBrokersV2CatalogListCall {
  2505. c.ctx_ = ctx
  2506. return c
  2507. }
  2508. // Header returns an http.Header that can be modified by the caller to
  2509. // add HTTP headers to the request.
  2510. func (c *ProjectsBrokersV2CatalogListCall) Header() http.Header {
  2511. if c.header_ == nil {
  2512. c.header_ = make(http.Header)
  2513. }
  2514. return c.header_
  2515. }
  2516. func (c *ProjectsBrokersV2CatalogListCall) doRequest(alt string) (*http.Response, error) {
  2517. reqHeaders := make(http.Header)
  2518. for k, v := range c.header_ {
  2519. reqHeaders[k] = v
  2520. }
  2521. reqHeaders.Set("User-Agent", c.s.userAgent())
  2522. if c.ifNoneMatch_ != "" {
  2523. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2524. }
  2525. var body io.Reader = nil
  2526. c.urlParams_.Set("alt", alt)
  2527. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/v2/catalog")
  2528. urls += "?" + c.urlParams_.Encode()
  2529. req, _ := http.NewRequest("GET", urls, body)
  2530. req.Header = reqHeaders
  2531. googleapi.Expand(req.URL, map[string]string{
  2532. "parent": c.parent,
  2533. })
  2534. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2535. }
  2536. // Do executes the "servicebroker.projects.brokers.v2.catalog.list" call.
  2537. // Exactly one of *GoogleCloudServicebrokerV1beta1__ListCatalogResponse
  2538. // or error will be non-nil. Any non-2xx status code is an error.
  2539. // Response headers are in either
  2540. // *GoogleCloudServicebrokerV1beta1__ListCatalogResponse.ServerResponse.H
  2541. // eader or (if a response was returned at all) in
  2542. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2543. // whether the returned error was because http.StatusNotModified was
  2544. // returned.
  2545. func (c *ProjectsBrokersV2CatalogListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListCatalogResponse, error) {
  2546. gensupport.SetOptions(c.urlParams_, opts...)
  2547. res, err := c.doRequest("json")
  2548. if res != nil && res.StatusCode == http.StatusNotModified {
  2549. if res.Body != nil {
  2550. res.Body.Close()
  2551. }
  2552. return nil, &googleapi.Error{
  2553. Code: res.StatusCode,
  2554. Header: res.Header,
  2555. }
  2556. }
  2557. if err != nil {
  2558. return nil, err
  2559. }
  2560. defer googleapi.CloseBody(res)
  2561. if err := googleapi.CheckResponse(res); err != nil {
  2562. return nil, err
  2563. }
  2564. ret := &GoogleCloudServicebrokerV1beta1__ListCatalogResponse{
  2565. ServerResponse: googleapi.ServerResponse{
  2566. Header: res.Header,
  2567. HTTPStatusCode: res.StatusCode,
  2568. },
  2569. }
  2570. target := &ret
  2571. if err := gensupport.DecodeResponse(target, res); err != nil {
  2572. return nil, err
  2573. }
  2574. return ret, nil
  2575. // {
  2576. // "description": "Lists all the Services registered with this broker for consumption for\ngiven service registry broker, which contains an set of services.\nNote, that Service producer API is separate from Broker API.",
  2577. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/catalog",
  2578. // "httpMethod": "GET",
  2579. // "id": "servicebroker.projects.brokers.v2.catalog.list",
  2580. // "parameterOrder": [
  2581. // "parent"
  2582. // ],
  2583. // "parameters": {
  2584. // "pageSize": {
  2585. // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. If unset or 0, all the results will be returned.",
  2586. // "format": "int32",
  2587. // "location": "query",
  2588. // "type": "integer"
  2589. // },
  2590. // "pageToken": {
  2591. // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.",
  2592. // "location": "query",
  2593. // "type": "string"
  2594. // },
  2595. // "parent": {
  2596. // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.",
  2597. // "location": "path",
  2598. // "pattern": "^projects/[^/]+/brokers/[^/]+$",
  2599. // "required": true,
  2600. // "type": "string"
  2601. // }
  2602. // },
  2603. // "path": "v1beta1/{+parent}/v2/catalog",
  2604. // "response": {
  2605. // "$ref": "GoogleCloudServicebrokerV1beta1__ListCatalogResponse"
  2606. // },
  2607. // "scopes": [
  2608. // "https://www.googleapis.com/auth/cloud-platform"
  2609. // ]
  2610. // }
  2611. }
  2612. // Pages invokes f for each page of results.
  2613. // A non-nil error returned from f will halt the iteration.
  2614. // The provided context supersedes any context provided to the Context method.
  2615. func (c *ProjectsBrokersV2CatalogListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListCatalogResponse) error) error {
  2616. c.ctx_ = ctx
  2617. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2618. for {
  2619. x, err := c.Do()
  2620. if err != nil {
  2621. return err
  2622. }
  2623. if err := f(x); err != nil {
  2624. return err
  2625. }
  2626. if x.NextPageToken == "" {
  2627. return nil
  2628. }
  2629. c.PageToken(x.NextPageToken)
  2630. }
  2631. }
  2632. // method id "servicebroker.projects.brokers.v2.service_instances.create":
  2633. type ProjectsBrokersV2ServiceInstancesCreateCall struct {
  2634. s *Service
  2635. parent string
  2636. instanceId string
  2637. googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance
  2638. urlParams_ gensupport.URLParams
  2639. ctx_ context.Context
  2640. header_ http.Header
  2641. }
  2642. // Create: Provisions a service instance.
  2643. // If `request.accepts_incomplete` is false and Broker cannot execute
  2644. // request
  2645. // synchronously HTTP 422 error will be returned along
  2646. // with
  2647. // FAILED_PRECONDITION status.
  2648. // If `request.accepts_incomplete` is true and the Broker decides to
  2649. // execute
  2650. // resource asynchronously then HTTP 202 response code will be returned
  2651. // and a
  2652. // valid polling operation in the response will be included.
  2653. // If Broker executes the request synchronously and it succeeds HTTP
  2654. // 201
  2655. // response will be furnished.
  2656. // If identical instance exists, then HTTP 200 response will be
  2657. // returned.
  2658. // If an instance with identical ID but mismatching parameters exists,
  2659. // then
  2660. // HTTP 409 status code will be returned.
  2661. func (r *ProjectsBrokersV2ServiceInstancesService) Create(parent string, instanceId string, googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance) *ProjectsBrokersV2ServiceInstancesCreateCall {
  2662. c := &ProjectsBrokersV2ServiceInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2663. c.parent = parent
  2664. c.instanceId = instanceId
  2665. c.googlecloudservicebrokerv1beta1__serviceinstance = googlecloudservicebrokerv1beta1__serviceinstance
  2666. return c
  2667. }
  2668. // AcceptsIncomplete sets the optional parameter "acceptsIncomplete":
  2669. // Value indicating that API client supports asynchronous operations.
  2670. // If
  2671. // Broker cannot execute the request synchronously HTTP 422 code will
  2672. // be
  2673. // returned to HTTP clients along with FAILED_PRECONDITION error.
  2674. // If true and broker will execute request asynchronously 202 HTTP code
  2675. // will
  2676. // be returned.
  2677. // This broker always requires this to be true as all mutator operations
  2678. // are
  2679. // asynchronous.
  2680. func (c *ProjectsBrokersV2ServiceInstancesCreateCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesCreateCall {
  2681. c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
  2682. return c
  2683. }
  2684. // Fields allows partial responses to be retrieved. See
  2685. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2686. // for more information.
  2687. func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesCreateCall {
  2688. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2689. return c
  2690. }
  2691. // Context sets the context to be used in this call's Do method. Any
  2692. // pending HTTP request will be aborted if the provided context is
  2693. // canceled.
  2694. func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesCreateCall {
  2695. c.ctx_ = ctx
  2696. return c
  2697. }
  2698. // Header returns an http.Header that can be modified by the caller to
  2699. // add HTTP headers to the request.
  2700. func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Header() http.Header {
  2701. if c.header_ == nil {
  2702. c.header_ = make(http.Header)
  2703. }
  2704. return c.header_
  2705. }
  2706. func (c *ProjectsBrokersV2ServiceInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
  2707. reqHeaders := make(http.Header)
  2708. for k, v := range c.header_ {
  2709. reqHeaders[k] = v
  2710. }
  2711. reqHeaders.Set("User-Agent", c.s.userAgent())
  2712. var body io.Reader = nil
  2713. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__serviceinstance)
  2714. if err != nil {
  2715. return nil, err
  2716. }
  2717. reqHeaders.Set("Content-Type", "application/json")
  2718. c.urlParams_.Set("alt", alt)
  2719. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/v2/service_instances/{+instance_id}")
  2720. urls += "?" + c.urlParams_.Encode()
  2721. req, _ := http.NewRequest("PUT", urls, body)
  2722. req.Header = reqHeaders
  2723. googleapi.Expand(req.URL, map[string]string{
  2724. "parent": c.parent,
  2725. "instance_id": c.instanceId,
  2726. })
  2727. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2728. }
  2729. // Do executes the "servicebroker.projects.brokers.v2.service_instances.create" call.
  2730. // Exactly one of
  2731. // *GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse or
  2732. // error will be non-nil. Any non-2xx status code is an error. Response
  2733. // headers are in either
  2734. // *GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse.Server
  2735. // Response.Header or (if a response was returned at all) in
  2736. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2737. // whether the returned error was because http.StatusNotModified was
  2738. // returned.
  2739. func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse, error) {
  2740. gensupport.SetOptions(c.urlParams_, opts...)
  2741. res, err := c.doRequest("json")
  2742. if res != nil && res.StatusCode == http.StatusNotModified {
  2743. if res.Body != nil {
  2744. res.Body.Close()
  2745. }
  2746. return nil, &googleapi.Error{
  2747. Code: res.StatusCode,
  2748. Header: res.Header,
  2749. }
  2750. }
  2751. if err != nil {
  2752. return nil, err
  2753. }
  2754. defer googleapi.CloseBody(res)
  2755. if err := googleapi.CheckResponse(res); err != nil {
  2756. return nil, err
  2757. }
  2758. ret := &GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse{
  2759. ServerResponse: googleapi.ServerResponse{
  2760. Header: res.Header,
  2761. HTTPStatusCode: res.StatusCode,
  2762. },
  2763. }
  2764. target := &ret
  2765. if err := gensupport.DecodeResponse(target, res); err != nil {
  2766. return nil, err
  2767. }
  2768. return ret, nil
  2769. // {
  2770. // "description": "Provisions a service instance.\nIf `request.accepts_incomplete` is false and Broker cannot execute request\nsynchronously HTTP 422 error will be returned along with\nFAILED_PRECONDITION status.\nIf `request.accepts_incomplete` is true and the Broker decides to execute\nresource asynchronously then HTTP 202 response code will be returned and a\nvalid polling operation in the response will be included.\nIf Broker executes the request synchronously and it succeeds HTTP 201\nresponse will be furnished.\nIf identical instance exists, then HTTP 200 response will be returned.\nIf an instance with identical ID but mismatching parameters exists, then\nHTTP 409 status code will be returned.",
  2771. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}",
  2772. // "httpMethod": "PUT",
  2773. // "id": "servicebroker.projects.brokers.v2.service_instances.create",
  2774. // "parameterOrder": [
  2775. // "parent",
  2776. // "instance_id"
  2777. // ],
  2778. // "parameters": {
  2779. // "acceptsIncomplete": {
  2780. // "description": "Value indicating that API client supports asynchronous operations. If\nBroker cannot execute the request synchronously HTTP 422 code will be\nreturned to HTTP clients along with FAILED_PRECONDITION error.\nIf true and broker will execute request asynchronously 202 HTTP code will\nbe returned.\nThis broker always requires this to be true as all mutator operations are\nasynchronous.",
  2781. // "location": "query",
  2782. // "type": "boolean"
  2783. // },
  2784. // "instance_id": {
  2785. // "description": "The id of the service instance. Must be unique within GCP project.\nMaximum length is 64, GUID recommended.\nRequired.",
  2786. // "location": "path",
  2787. // "pattern": "^[^/]+$",
  2788. // "required": true,
  2789. // "type": "string"
  2790. // },
  2791. // "parent": {
  2792. // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.",
  2793. // "location": "path",
  2794. // "pattern": "^projects/[^/]+/brokers/[^/]+$",
  2795. // "required": true,
  2796. // "type": "string"
  2797. // }
  2798. // },
  2799. // "path": "v1beta1/{+parent}/v2/service_instances/{+instance_id}",
  2800. // "request": {
  2801. // "$ref": "GoogleCloudServicebrokerV1beta1__ServiceInstance"
  2802. // },
  2803. // "response": {
  2804. // "$ref": "GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse"
  2805. // },
  2806. // "scopes": [
  2807. // "https://www.googleapis.com/auth/cloud-platform"
  2808. // ]
  2809. // }
  2810. }
  2811. // method id "servicebroker.projects.brokers.v2.service_instances.delete":
  2812. type ProjectsBrokersV2ServiceInstancesDeleteCall struct {
  2813. s *Service
  2814. name string
  2815. urlParams_ gensupport.URLParams
  2816. ctx_ context.Context
  2817. header_ http.Header
  2818. }
  2819. // Delete: Deprovisions a service instance.
  2820. // For synchronous/asynchronous request details see
  2821. // CreateServiceInstance
  2822. // method.
  2823. // If service instance does not exist HTTP 410 status will be returned.
  2824. func (r *ProjectsBrokersV2ServiceInstancesService) Delete(name string) *ProjectsBrokersV2ServiceInstancesDeleteCall {
  2825. c := &ProjectsBrokersV2ServiceInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2826. c.name = name
  2827. return c
  2828. }
  2829. // AcceptsIncomplete sets the optional parameter "acceptsIncomplete":
  2830. // See CreateServiceInstanceRequest for details.
  2831. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesDeleteCall {
  2832. c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
  2833. return c
  2834. }
  2835. // PlanId sets the optional parameter "planId": The plan id of the
  2836. // service instance.
  2837. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesDeleteCall {
  2838. c.urlParams_.Set("planId", planId)
  2839. return c
  2840. }
  2841. // ServiceId sets the optional parameter "serviceId": The service id of
  2842. // the service instance.
  2843. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesDeleteCall {
  2844. c.urlParams_.Set("serviceId", serviceId)
  2845. return c
  2846. }
  2847. // Fields allows partial responses to be retrieved. See
  2848. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2849. // for more information.
  2850. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesDeleteCall {
  2851. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2852. return c
  2853. }
  2854. // Context sets the context to be used in this call's Do method. Any
  2855. // pending HTTP request will be aborted if the provided context is
  2856. // canceled.
  2857. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesDeleteCall {
  2858. c.ctx_ = ctx
  2859. return c
  2860. }
  2861. // Header returns an http.Header that can be modified by the caller to
  2862. // add HTTP headers to the request.
  2863. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Header() http.Header {
  2864. if c.header_ == nil {
  2865. c.header_ = make(http.Header)
  2866. }
  2867. return c.header_
  2868. }
  2869. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2870. reqHeaders := make(http.Header)
  2871. for k, v := range c.header_ {
  2872. reqHeaders[k] = v
  2873. }
  2874. reqHeaders.Set("User-Agent", c.s.userAgent())
  2875. var body io.Reader = nil
  2876. c.urlParams_.Set("alt", alt)
  2877. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2878. urls += "?" + c.urlParams_.Encode()
  2879. req, _ := http.NewRequest("DELETE", urls, body)
  2880. req.Header = reqHeaders
  2881. googleapi.Expand(req.URL, map[string]string{
  2882. "name": c.name,
  2883. })
  2884. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2885. }
  2886. // Do executes the "servicebroker.projects.brokers.v2.service_instances.delete" call.
  2887. // Exactly one of
  2888. // *GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse or
  2889. // error will be non-nil. Any non-2xx status code is an error. Response
  2890. // headers are in either
  2891. // *GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse.Server
  2892. // Response.Header or (if a response was returned at all) in
  2893. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2894. // whether the returned error was because http.StatusNotModified was
  2895. // returned.
  2896. func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse, error) {
  2897. gensupport.SetOptions(c.urlParams_, opts...)
  2898. res, err := c.doRequest("json")
  2899. if res != nil && res.StatusCode == http.StatusNotModified {
  2900. if res.Body != nil {
  2901. res.Body.Close()
  2902. }
  2903. return nil, &googleapi.Error{
  2904. Code: res.StatusCode,
  2905. Header: res.Header,
  2906. }
  2907. }
  2908. if err != nil {
  2909. return nil, err
  2910. }
  2911. defer googleapi.CloseBody(res)
  2912. if err := googleapi.CheckResponse(res); err != nil {
  2913. return nil, err
  2914. }
  2915. ret := &GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse{
  2916. ServerResponse: googleapi.ServerResponse{
  2917. Header: res.Header,
  2918. HTTPStatusCode: res.StatusCode,
  2919. },
  2920. }
  2921. target := &ret
  2922. if err := gensupport.DecodeResponse(target, res); err != nil {
  2923. return nil, err
  2924. }
  2925. return ret, nil
  2926. // {
  2927. // "description": "Deprovisions a service instance.\nFor synchronous/asynchronous request details see CreateServiceInstance\nmethod.\nIf service instance does not exist HTTP 410 status will be returned.",
  2928. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}",
  2929. // "httpMethod": "DELETE",
  2930. // "id": "servicebroker.projects.brokers.v2.service_instances.delete",
  2931. // "parameterOrder": [
  2932. // "name"
  2933. // ],
  2934. // "parameters": {
  2935. // "acceptsIncomplete": {
  2936. // "description": "See CreateServiceInstanceRequest for details.",
  2937. // "location": "query",
  2938. // "type": "boolean"
  2939. // },
  2940. // "name": {
  2941. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/` +\n`v2/service_instances/[INSTANCE_ID]`\nor\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/instances/[INSTANCE_ID]`.",
  2942. // "location": "path",
  2943. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+$",
  2944. // "required": true,
  2945. // "type": "string"
  2946. // },
  2947. // "planId": {
  2948. // "description": "The plan id of the service instance.",
  2949. // "location": "query",
  2950. // "type": "string"
  2951. // },
  2952. // "serviceId": {
  2953. // "description": "The service id of the service instance.",
  2954. // "location": "query",
  2955. // "type": "string"
  2956. // }
  2957. // },
  2958. // "path": "v1beta1/{+name}",
  2959. // "response": {
  2960. // "$ref": "GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse"
  2961. // },
  2962. // "scopes": [
  2963. // "https://www.googleapis.com/auth/cloud-platform"
  2964. // ]
  2965. // }
  2966. }
  2967. // method id "servicebroker.projects.brokers.v2.service_instances.get":
  2968. type ProjectsBrokersV2ServiceInstancesGetCall struct {
  2969. s *Service
  2970. name string
  2971. urlParams_ gensupport.URLParams
  2972. ifNoneMatch_ string
  2973. ctx_ context.Context
  2974. header_ http.Header
  2975. }
  2976. // Get: Gets the given service instance from the system.
  2977. // The API call accepts both OSB style API and standard google style
  2978. // API
  2979. // resource path.
  2980. // i.e. both `projects/*/brokers/*/instances/*`
  2981. // and `projects/*/brokers/*/v2/service_instances/*` are acceptable
  2982. // paths.
  2983. func (r *ProjectsBrokersV2ServiceInstancesService) Get(name string) *ProjectsBrokersV2ServiceInstancesGetCall {
  2984. c := &ProjectsBrokersV2ServiceInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2985. c.name = name
  2986. return c
  2987. }
  2988. // Fields allows partial responses to be retrieved. See
  2989. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2990. // for more information.
  2991. func (c *ProjectsBrokersV2ServiceInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesGetCall {
  2992. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2993. return c
  2994. }
  2995. // IfNoneMatch sets the optional parameter which makes the operation
  2996. // fail if the object's ETag matches the given value. This is useful for
  2997. // getting updates only after the object has changed since the last
  2998. // request. Use googleapi.IsNotModified to check whether the response
  2999. // error from Do is the result of In-None-Match.
  3000. func (c *ProjectsBrokersV2ServiceInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesGetCall {
  3001. c.ifNoneMatch_ = entityTag
  3002. return c
  3003. }
  3004. // Context sets the context to be used in this call's Do method. Any
  3005. // pending HTTP request will be aborted if the provided context is
  3006. // canceled.
  3007. func (c *ProjectsBrokersV2ServiceInstancesGetCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesGetCall {
  3008. c.ctx_ = ctx
  3009. return c
  3010. }
  3011. // Header returns an http.Header that can be modified by the caller to
  3012. // add HTTP headers to the request.
  3013. func (c *ProjectsBrokersV2ServiceInstancesGetCall) Header() http.Header {
  3014. if c.header_ == nil {
  3015. c.header_ = make(http.Header)
  3016. }
  3017. return c.header_
  3018. }
  3019. func (c *ProjectsBrokersV2ServiceInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  3020. reqHeaders := make(http.Header)
  3021. for k, v := range c.header_ {
  3022. reqHeaders[k] = v
  3023. }
  3024. reqHeaders.Set("User-Agent", c.s.userAgent())
  3025. if c.ifNoneMatch_ != "" {
  3026. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3027. }
  3028. var body io.Reader = nil
  3029. c.urlParams_.Set("alt", alt)
  3030. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3031. urls += "?" + c.urlParams_.Encode()
  3032. req, _ := http.NewRequest("GET", urls, body)
  3033. req.Header = reqHeaders
  3034. googleapi.Expand(req.URL, map[string]string{
  3035. "name": c.name,
  3036. })
  3037. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3038. }
  3039. // Do executes the "servicebroker.projects.brokers.v2.service_instances.get" call.
  3040. // Exactly one of *GoogleCloudServicebrokerV1beta1__ServiceInstance or
  3041. // error will be non-nil. Any non-2xx status code is an error. Response
  3042. // headers are in either
  3043. // *GoogleCloudServicebrokerV1beta1__ServiceInstance.ServerResponse.Heade
  3044. // r or (if a response was returned at all) in
  3045. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3046. // whether the returned error was because http.StatusNotModified was
  3047. // returned.
  3048. func (c *ProjectsBrokersV2ServiceInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ServiceInstance, error) {
  3049. gensupport.SetOptions(c.urlParams_, opts...)
  3050. res, err := c.doRequest("json")
  3051. if res != nil && res.StatusCode == http.StatusNotModified {
  3052. if res.Body != nil {
  3053. res.Body.Close()
  3054. }
  3055. return nil, &googleapi.Error{
  3056. Code: res.StatusCode,
  3057. Header: res.Header,
  3058. }
  3059. }
  3060. if err != nil {
  3061. return nil, err
  3062. }
  3063. defer googleapi.CloseBody(res)
  3064. if err := googleapi.CheckResponse(res); err != nil {
  3065. return nil, err
  3066. }
  3067. ret := &GoogleCloudServicebrokerV1beta1__ServiceInstance{
  3068. ServerResponse: googleapi.ServerResponse{
  3069. Header: res.Header,
  3070. HTTPStatusCode: res.StatusCode,
  3071. },
  3072. }
  3073. target := &ret
  3074. if err := gensupport.DecodeResponse(target, res); err != nil {
  3075. return nil, err
  3076. }
  3077. return ret, nil
  3078. // {
  3079. // "description": "Gets the given service instance from the system.\nThe API call accepts both OSB style API and standard google style API\nresource path.\ni.e. both `projects/*/brokers/*/instances/*`\n and `projects/*/brokers/*/v2/service_instances/*` are acceptable paths.",
  3080. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}",
  3081. // "httpMethod": "GET",
  3082. // "id": "servicebroker.projects.brokers.v2.service_instances.get",
  3083. // "parameterOrder": [
  3084. // "name"
  3085. // ],
  3086. // "parameters": {
  3087. // "name": {
  3088. // "description": "The resource name of the instance to return.\nName must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/` +\n`v2/service_instances/[INSTANCE_ID]`\nor\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/instances/[INSTANCE_ID]`.",
  3089. // "location": "path",
  3090. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+$",
  3091. // "required": true,
  3092. // "type": "string"
  3093. // }
  3094. // },
  3095. // "path": "v1beta1/{+name}",
  3096. // "response": {
  3097. // "$ref": "GoogleCloudServicebrokerV1beta1__ServiceInstance"
  3098. // },
  3099. // "scopes": [
  3100. // "https://www.googleapis.com/auth/cloud-platform"
  3101. // ]
  3102. // }
  3103. }
  3104. // method id "servicebroker.projects.brokers.v2.service_instances.getLast_operation":
  3105. type ProjectsBrokersV2ServiceInstancesGetLastOperationCall struct {
  3106. s *Service
  3107. name string
  3108. urlParams_ gensupport.URLParams
  3109. ifNoneMatch_ string
  3110. ctx_ context.Context
  3111. header_ http.Header
  3112. }
  3113. // GetLastOperation: Returns the state of the last operation for the
  3114. // service instance.
  3115. // Only last (or current) operation can be polled.
  3116. func (r *ProjectsBrokersV2ServiceInstancesService) GetLastOperation(name string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3117. c := &ProjectsBrokersV2ServiceInstancesGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3118. c.name = name
  3119. return c
  3120. }
  3121. // Operation sets the optional parameter "operation": If `operation` was
  3122. // returned during mutation operation, this field must be
  3123. // populated with the provided value.
  3124. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Operation(operation string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3125. c.urlParams_.Set("operation", operation)
  3126. return c
  3127. }
  3128. // PlanId sets the optional parameter "planId": Plan id.
  3129. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3130. c.urlParams_.Set("planId", planId)
  3131. return c
  3132. }
  3133. // ServiceId sets the optional parameter "serviceId": Service id.
  3134. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3135. c.urlParams_.Set("serviceId", serviceId)
  3136. return c
  3137. }
  3138. // Fields allows partial responses to be retrieved. See
  3139. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3140. // for more information.
  3141. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3142. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3143. return c
  3144. }
  3145. // IfNoneMatch sets the optional parameter which makes the operation
  3146. // fail if the object's ETag matches the given value. This is useful for
  3147. // getting updates only after the object has changed since the last
  3148. // request. Use googleapi.IsNotModified to check whether the response
  3149. // error from Do is the result of In-None-Match.
  3150. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3151. c.ifNoneMatch_ = entityTag
  3152. return c
  3153. }
  3154. // Context sets the context to be used in this call's Do method. Any
  3155. // pending HTTP request will be aborted if the provided context is
  3156. // canceled.
  3157. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
  3158. c.ctx_ = ctx
  3159. return c
  3160. }
  3161. // Header returns an http.Header that can be modified by the caller to
  3162. // add HTTP headers to the request.
  3163. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Header() http.Header {
  3164. if c.header_ == nil {
  3165. c.header_ = make(http.Header)
  3166. }
  3167. return c.header_
  3168. }
  3169. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
  3170. reqHeaders := make(http.Header)
  3171. for k, v := range c.header_ {
  3172. reqHeaders[k] = v
  3173. }
  3174. reqHeaders.Set("User-Agent", c.s.userAgent())
  3175. if c.ifNoneMatch_ != "" {
  3176. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3177. }
  3178. var body io.Reader = nil
  3179. c.urlParams_.Set("alt", alt)
  3180. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
  3181. urls += "?" + c.urlParams_.Encode()
  3182. req, _ := http.NewRequest("GET", urls, body)
  3183. req.Header = reqHeaders
  3184. googleapi.Expand(req.URL, map[string]string{
  3185. "name": c.name,
  3186. })
  3187. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3188. }
  3189. // Do executes the "servicebroker.projects.brokers.v2.service_instances.getLast_operation" call.
  3190. // Exactly one of *GoogleCloudServicebrokerV1beta1__Operation or error
  3191. // will be non-nil. Any non-2xx status code is an error. Response
  3192. // headers are in either
  3193. // *GoogleCloudServicebrokerV1beta1__Operation.ServerResponse.Header or
  3194. // (if a response was returned at all) in
  3195. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3196. // whether the returned error was because http.StatusNotModified was
  3197. // returned.
  3198. func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
  3199. gensupport.SetOptions(c.urlParams_, opts...)
  3200. res, err := c.doRequest("json")
  3201. if res != nil && res.StatusCode == http.StatusNotModified {
  3202. if res.Body != nil {
  3203. res.Body.Close()
  3204. }
  3205. return nil, &googleapi.Error{
  3206. Code: res.StatusCode,
  3207. Header: res.Header,
  3208. }
  3209. }
  3210. if err != nil {
  3211. return nil, err
  3212. }
  3213. defer googleapi.CloseBody(res)
  3214. if err := googleapi.CheckResponse(res); err != nil {
  3215. return nil, err
  3216. }
  3217. ret := &GoogleCloudServicebrokerV1beta1__Operation{
  3218. ServerResponse: googleapi.ServerResponse{
  3219. Header: res.Header,
  3220. HTTPStatusCode: res.StatusCode,
  3221. },
  3222. }
  3223. target := &ret
  3224. if err := gensupport.DecodeResponse(target, res); err != nil {
  3225. return nil, err
  3226. }
  3227. return ret, nil
  3228. // {
  3229. // "description": "Returns the state of the last operation for the service instance.\nOnly last (or current) operation can be polled.",
  3230. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/last_operation",
  3231. // "httpMethod": "GET",
  3232. // "id": "servicebroker.projects.brokers.v2.service_instances.getLast_operation",
  3233. // "parameterOrder": [
  3234. // "name"
  3235. // ],
  3236. // "parameters": {
  3237. // "name": {
  3238. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/`+\n `service_instances/[INSTANCE_ID]`.",
  3239. // "location": "path",
  3240. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+$",
  3241. // "required": true,
  3242. // "type": "string"
  3243. // },
  3244. // "operation": {
  3245. // "description": "If `operation` was returned during mutation operation, this field must be\npopulated with the provided value.",
  3246. // "location": "query",
  3247. // "type": "string"
  3248. // },
  3249. // "planId": {
  3250. // "description": "Plan id.",
  3251. // "location": "query",
  3252. // "type": "string"
  3253. // },
  3254. // "serviceId": {
  3255. // "description": "Service id.",
  3256. // "location": "query",
  3257. // "type": "string"
  3258. // }
  3259. // },
  3260. // "path": "v1beta1/{+name}/last_operation",
  3261. // "response": {
  3262. // "$ref": "GoogleCloudServicebrokerV1beta1__Operation"
  3263. // },
  3264. // "scopes": [
  3265. // "https://www.googleapis.com/auth/cloud-platform"
  3266. // ]
  3267. // }
  3268. }
  3269. // method id "servicebroker.projects.brokers.v2.service_instances.patch":
  3270. type ProjectsBrokersV2ServiceInstancesPatchCall struct {
  3271. s *Service
  3272. name string
  3273. googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance
  3274. urlParams_ gensupport.URLParams
  3275. ctx_ context.Context
  3276. header_ http.Header
  3277. }
  3278. // Patch: Updates an existing service instance.
  3279. // See CreateServiceInstance for possible response codes.
  3280. func (r *ProjectsBrokersV2ServiceInstancesService) Patch(name string, googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance) *ProjectsBrokersV2ServiceInstancesPatchCall {
  3281. c := &ProjectsBrokersV2ServiceInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3282. c.name = name
  3283. c.googlecloudservicebrokerv1beta1__serviceinstance = googlecloudservicebrokerv1beta1__serviceinstance
  3284. return c
  3285. }
  3286. // AcceptsIncomplete sets the optional parameter "acceptsIncomplete":
  3287. // See CreateServiceInstanceRequest for details.
  3288. func (c *ProjectsBrokersV2ServiceInstancesPatchCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesPatchCall {
  3289. c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
  3290. return c
  3291. }
  3292. // Fields allows partial responses to be retrieved. See
  3293. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3294. // for more information.
  3295. func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesPatchCall {
  3296. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3297. return c
  3298. }
  3299. // Context sets the context to be used in this call's Do method. Any
  3300. // pending HTTP request will be aborted if the provided context is
  3301. // canceled.
  3302. func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesPatchCall {
  3303. c.ctx_ = ctx
  3304. return c
  3305. }
  3306. // Header returns an http.Header that can be modified by the caller to
  3307. // add HTTP headers to the request.
  3308. func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Header() http.Header {
  3309. if c.header_ == nil {
  3310. c.header_ = make(http.Header)
  3311. }
  3312. return c.header_
  3313. }
  3314. func (c *ProjectsBrokersV2ServiceInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
  3315. reqHeaders := make(http.Header)
  3316. for k, v := range c.header_ {
  3317. reqHeaders[k] = v
  3318. }
  3319. reqHeaders.Set("User-Agent", c.s.userAgent())
  3320. var body io.Reader = nil
  3321. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__serviceinstance)
  3322. if err != nil {
  3323. return nil, err
  3324. }
  3325. reqHeaders.Set("Content-Type", "application/json")
  3326. c.urlParams_.Set("alt", alt)
  3327. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3328. urls += "?" + c.urlParams_.Encode()
  3329. req, _ := http.NewRequest("PATCH", urls, body)
  3330. req.Header = reqHeaders
  3331. googleapi.Expand(req.URL, map[string]string{
  3332. "name": c.name,
  3333. })
  3334. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3335. }
  3336. // Do executes the "servicebroker.projects.brokers.v2.service_instances.patch" call.
  3337. // Exactly one of
  3338. // *GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse or
  3339. // error will be non-nil. Any non-2xx status code is an error. Response
  3340. // headers are in either
  3341. // *GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse.Server
  3342. // Response.Header or (if a response was returned at all) in
  3343. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3344. // whether the returned error was because http.StatusNotModified was
  3345. // returned.
  3346. func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse, error) {
  3347. gensupport.SetOptions(c.urlParams_, opts...)
  3348. res, err := c.doRequest("json")
  3349. if res != nil && res.StatusCode == http.StatusNotModified {
  3350. if res.Body != nil {
  3351. res.Body.Close()
  3352. }
  3353. return nil, &googleapi.Error{
  3354. Code: res.StatusCode,
  3355. Header: res.Header,
  3356. }
  3357. }
  3358. if err != nil {
  3359. return nil, err
  3360. }
  3361. defer googleapi.CloseBody(res)
  3362. if err := googleapi.CheckResponse(res); err != nil {
  3363. return nil, err
  3364. }
  3365. ret := &GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse{
  3366. ServerResponse: googleapi.ServerResponse{
  3367. Header: res.Header,
  3368. HTTPStatusCode: res.StatusCode,
  3369. },
  3370. }
  3371. target := &ret
  3372. if err := gensupport.DecodeResponse(target, res); err != nil {
  3373. return nil, err
  3374. }
  3375. return ret, nil
  3376. // {
  3377. // "description": "Updates an existing service instance.\nSee CreateServiceInstance for possible response codes.",
  3378. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}",
  3379. // "httpMethod": "PATCH",
  3380. // "id": "servicebroker.projects.brokers.v2.service_instances.patch",
  3381. // "parameterOrder": [
  3382. // "name"
  3383. // ],
  3384. // "parameters": {
  3385. // "acceptsIncomplete": {
  3386. // "description": "See CreateServiceInstanceRequest for details.",
  3387. // "location": "query",
  3388. // "type": "boolean"
  3389. // },
  3390. // "name": {
  3391. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/service_instances/[INSTANCE_ID]`.",
  3392. // "location": "path",
  3393. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+$",
  3394. // "required": true,
  3395. // "type": "string"
  3396. // }
  3397. // },
  3398. // "path": "v1beta1/{+name}",
  3399. // "request": {
  3400. // "$ref": "GoogleCloudServicebrokerV1beta1__ServiceInstance"
  3401. // },
  3402. // "response": {
  3403. // "$ref": "GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse"
  3404. // },
  3405. // "scopes": [
  3406. // "https://www.googleapis.com/auth/cloud-platform"
  3407. // ]
  3408. // }
  3409. }
  3410. // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.create":
  3411. type ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall struct {
  3412. s *Service
  3413. parent string
  3414. bindingId string
  3415. googlecloudservicebrokerv1beta1__binding *GoogleCloudServicebrokerV1beta1__Binding
  3416. urlParams_ gensupport.URLParams
  3417. ctx_ context.Context
  3418. header_ http.Header
  3419. }
  3420. // Create: CreateBinding generates a service binding to an existing
  3421. // service instance.
  3422. // See ProviServiceInstance for async operation details.
  3423. func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Create(parent string, bindingId string, googlecloudservicebrokerv1beta1__binding *GoogleCloudServicebrokerV1beta1__Binding) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
  3424. c := &ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3425. c.parent = parent
  3426. c.bindingId = bindingId
  3427. c.googlecloudservicebrokerv1beta1__binding = googlecloudservicebrokerv1beta1__binding
  3428. return c
  3429. }
  3430. // AcceptsIncomplete sets the optional parameter "acceptsIncomplete":
  3431. // See CreateServiceInstanceRequest for details.
  3432. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
  3433. c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
  3434. return c
  3435. }
  3436. // Fields allows partial responses to be retrieved. See
  3437. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3438. // for more information.
  3439. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
  3440. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3441. return c
  3442. }
  3443. // Context sets the context to be used in this call's Do method. Any
  3444. // pending HTTP request will be aborted if the provided context is
  3445. // canceled.
  3446. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
  3447. c.ctx_ = ctx
  3448. return c
  3449. }
  3450. // Header returns an http.Header that can be modified by the caller to
  3451. // add HTTP headers to the request.
  3452. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Header() http.Header {
  3453. if c.header_ == nil {
  3454. c.header_ = make(http.Header)
  3455. }
  3456. return c.header_
  3457. }
  3458. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
  3459. reqHeaders := make(http.Header)
  3460. for k, v := range c.header_ {
  3461. reqHeaders[k] = v
  3462. }
  3463. reqHeaders.Set("User-Agent", c.s.userAgent())
  3464. var body io.Reader = nil
  3465. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__binding)
  3466. if err != nil {
  3467. return nil, err
  3468. }
  3469. reqHeaders.Set("Content-Type", "application/json")
  3470. c.urlParams_.Set("alt", alt)
  3471. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/service_bindings/{+binding_id}")
  3472. urls += "?" + c.urlParams_.Encode()
  3473. req, _ := http.NewRequest("PUT", urls, body)
  3474. req.Header = reqHeaders
  3475. googleapi.Expand(req.URL, map[string]string{
  3476. "parent": c.parent,
  3477. "binding_id": c.bindingId,
  3478. })
  3479. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3480. }
  3481. // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.create" call.
  3482. // Exactly one of
  3483. // *GoogleCloudServicebrokerV1beta1__CreateBindingResponse or error will
  3484. // be non-nil. Any non-2xx status code is an error. Response headers are
  3485. // in either
  3486. // *GoogleCloudServicebrokerV1beta1__CreateBindingResponse.ServerResponse
  3487. // .Header or (if a response was returned at all) in
  3488. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3489. // whether the returned error was because http.StatusNotModified was
  3490. // returned.
  3491. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__CreateBindingResponse, error) {
  3492. gensupport.SetOptions(c.urlParams_, opts...)
  3493. res, err := c.doRequest("json")
  3494. if res != nil && res.StatusCode == http.StatusNotModified {
  3495. if res.Body != nil {
  3496. res.Body.Close()
  3497. }
  3498. return nil, &googleapi.Error{
  3499. Code: res.StatusCode,
  3500. Header: res.Header,
  3501. }
  3502. }
  3503. if err != nil {
  3504. return nil, err
  3505. }
  3506. defer googleapi.CloseBody(res)
  3507. if err := googleapi.CheckResponse(res); err != nil {
  3508. return nil, err
  3509. }
  3510. ret := &GoogleCloudServicebrokerV1beta1__CreateBindingResponse{
  3511. ServerResponse: googleapi.ServerResponse{
  3512. Header: res.Header,
  3513. HTTPStatusCode: res.StatusCode,
  3514. },
  3515. }
  3516. target := &ret
  3517. if err := gensupport.DecodeResponse(target, res); err != nil {
  3518. return nil, err
  3519. }
  3520. return ret, nil
  3521. // {
  3522. // "description": "CreateBinding generates a service binding to an existing service instance.\nSee ProviServiceInstance for async operation details.",
  3523. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}",
  3524. // "httpMethod": "PUT",
  3525. // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.create",
  3526. // "parameterOrder": [
  3527. // "parent",
  3528. // "binding_id"
  3529. // ],
  3530. // "parameters": {
  3531. // "acceptsIncomplete": {
  3532. // "description": "See CreateServiceInstanceRequest for details.",
  3533. // "location": "query",
  3534. // "type": "boolean"
  3535. // },
  3536. // "binding_id": {
  3537. // "description": "The id of the binding. Must be unique within GCP project.\nMaximum length is 64, GUID recommended.\nRequired.",
  3538. // "location": "path",
  3539. // "pattern": "^[^/]+$",
  3540. // "required": true,
  3541. // "type": "string"
  3542. // },
  3543. // "parent": {
  3544. // "description": "The GCP container.\nMust match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/service_instances/[INSTANCE_ID]`.",
  3545. // "location": "path",
  3546. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+$",
  3547. // "required": true,
  3548. // "type": "string"
  3549. // }
  3550. // },
  3551. // "path": "v1beta1/{+parent}/service_bindings/{+binding_id}",
  3552. // "request": {
  3553. // "$ref": "GoogleCloudServicebrokerV1beta1__Binding"
  3554. // },
  3555. // "response": {
  3556. // "$ref": "GoogleCloudServicebrokerV1beta1__CreateBindingResponse"
  3557. // },
  3558. // "scopes": [
  3559. // "https://www.googleapis.com/auth/cloud-platform"
  3560. // ]
  3561. // }
  3562. }
  3563. // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.delete":
  3564. type ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall struct {
  3565. s *Service
  3566. name string
  3567. urlParams_ gensupport.URLParams
  3568. ctx_ context.Context
  3569. header_ http.Header
  3570. }
  3571. // Delete: Unbinds from a service instance.
  3572. // For synchronous/asynchronous request details see
  3573. // CreateServiceInstance
  3574. // method.
  3575. // If binding does not exist HTTP 410 status will be returned.
  3576. func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Delete(name string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
  3577. c := &ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3578. c.name = name
  3579. return c
  3580. }
  3581. // AcceptsIncomplete sets the optional parameter "acceptsIncomplete":
  3582. // See CreateServiceInstanceRequest for details.
  3583. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
  3584. c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
  3585. return c
  3586. }
  3587. // PlanId sets the optional parameter "planId": The plan id of the
  3588. // service instance.
  3589. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
  3590. c.urlParams_.Set("planId", planId)
  3591. return c
  3592. }
  3593. // ServiceId sets the optional parameter "serviceId": Additional query
  3594. // parameter hints.
  3595. // The service id of the service instance.
  3596. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
  3597. c.urlParams_.Set("serviceId", serviceId)
  3598. return c
  3599. }
  3600. // Fields allows partial responses to be retrieved. See
  3601. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3602. // for more information.
  3603. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
  3604. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3605. return c
  3606. }
  3607. // Context sets the context to be used in this call's Do method. Any
  3608. // pending HTTP request will be aborted if the provided context is
  3609. // canceled.
  3610. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
  3611. c.ctx_ = ctx
  3612. return c
  3613. }
  3614. // Header returns an http.Header that can be modified by the caller to
  3615. // add HTTP headers to the request.
  3616. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Header() http.Header {
  3617. if c.header_ == nil {
  3618. c.header_ = make(http.Header)
  3619. }
  3620. return c.header_
  3621. }
  3622. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3623. reqHeaders := make(http.Header)
  3624. for k, v := range c.header_ {
  3625. reqHeaders[k] = v
  3626. }
  3627. reqHeaders.Set("User-Agent", c.s.userAgent())
  3628. var body io.Reader = nil
  3629. c.urlParams_.Set("alt", alt)
  3630. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3631. urls += "?" + c.urlParams_.Encode()
  3632. req, _ := http.NewRequest("DELETE", urls, body)
  3633. req.Header = reqHeaders
  3634. googleapi.Expand(req.URL, map[string]string{
  3635. "name": c.name,
  3636. })
  3637. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3638. }
  3639. // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.delete" call.
  3640. // Exactly one of
  3641. // *GoogleCloudServicebrokerV1beta1__DeleteBindingResponse or error will
  3642. // be non-nil. Any non-2xx status code is an error. Response headers are
  3643. // in either
  3644. // *GoogleCloudServicebrokerV1beta1__DeleteBindingResponse.ServerResponse
  3645. // .Header or (if a response was returned at all) in
  3646. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3647. // whether the returned error was because http.StatusNotModified was
  3648. // returned.
  3649. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__DeleteBindingResponse, error) {
  3650. gensupport.SetOptions(c.urlParams_, opts...)
  3651. res, err := c.doRequest("json")
  3652. if res != nil && res.StatusCode == http.StatusNotModified {
  3653. if res.Body != nil {
  3654. res.Body.Close()
  3655. }
  3656. return nil, &googleapi.Error{
  3657. Code: res.StatusCode,
  3658. Header: res.Header,
  3659. }
  3660. }
  3661. if err != nil {
  3662. return nil, err
  3663. }
  3664. defer googleapi.CloseBody(res)
  3665. if err := googleapi.CheckResponse(res); err != nil {
  3666. return nil, err
  3667. }
  3668. ret := &GoogleCloudServicebrokerV1beta1__DeleteBindingResponse{
  3669. ServerResponse: googleapi.ServerResponse{
  3670. Header: res.Header,
  3671. HTTPStatusCode: res.StatusCode,
  3672. },
  3673. }
  3674. target := &ret
  3675. if err := gensupport.DecodeResponse(target, res); err != nil {
  3676. return nil, err
  3677. }
  3678. return ret, nil
  3679. // {
  3680. // "description": "Unbinds from a service instance.\nFor synchronous/asynchronous request details see CreateServiceInstance\nmethod.\nIf binding does not exist HTTP 410 status will be returned.",
  3681. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}",
  3682. // "httpMethod": "DELETE",
  3683. // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.delete",
  3684. // "parameterOrder": [
  3685. // "name"
  3686. // ],
  3687. // "parameters": {
  3688. // "acceptsIncomplete": {
  3689. // "description": "See CreateServiceInstanceRequest for details.",
  3690. // "location": "query",
  3691. // "type": "boolean"
  3692. // },
  3693. // "name": {
  3694. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/`\n`v2/service_instances/[INSTANCE_ID]/service_bindings/[BINDING_ID]`\nor\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/`\n`/instances/[INSTANCE_ID]/bindings/[BINDING_ID]`.",
  3695. // "location": "path",
  3696. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+/service_bindings/[^/]+$",
  3697. // "required": true,
  3698. // "type": "string"
  3699. // },
  3700. // "planId": {
  3701. // "description": "The plan id of the service instance.",
  3702. // "location": "query",
  3703. // "type": "string"
  3704. // },
  3705. // "serviceId": {
  3706. // "description": "Additional query parameter hints.\nThe service id of the service instance.",
  3707. // "location": "query",
  3708. // "type": "string"
  3709. // }
  3710. // },
  3711. // "path": "v1beta1/{+name}",
  3712. // "response": {
  3713. // "$ref": "GoogleCloudServicebrokerV1beta1__DeleteBindingResponse"
  3714. // },
  3715. // "scopes": [
  3716. // "https://www.googleapis.com/auth/cloud-platform"
  3717. // ]
  3718. // }
  3719. }
  3720. // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.get":
  3721. type ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall struct {
  3722. s *Service
  3723. name string
  3724. urlParams_ gensupport.URLParams
  3725. ifNoneMatch_ string
  3726. ctx_ context.Context
  3727. header_ http.Header
  3728. }
  3729. // Get: GetBinding returns the binding information.
  3730. func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Get(name string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
  3731. c := &ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3732. c.name = name
  3733. return c
  3734. }
  3735. // PlanId sets the optional parameter "planId": Plan id.
  3736. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
  3737. c.urlParams_.Set("planId", planId)
  3738. return c
  3739. }
  3740. // ServiceId sets the optional parameter "serviceId": Service id.
  3741. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
  3742. c.urlParams_.Set("serviceId", serviceId)
  3743. return c
  3744. }
  3745. // Fields allows partial responses to be retrieved. See
  3746. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3747. // for more information.
  3748. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
  3749. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3750. return c
  3751. }
  3752. // IfNoneMatch sets the optional parameter which makes the operation
  3753. // fail if the object's ETag matches the given value. This is useful for
  3754. // getting updates only after the object has changed since the last
  3755. // request. Use googleapi.IsNotModified to check whether the response
  3756. // error from Do is the result of In-None-Match.
  3757. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
  3758. c.ifNoneMatch_ = entityTag
  3759. return c
  3760. }
  3761. // Context sets the context to be used in this call's Do method. Any
  3762. // pending HTTP request will be aborted if the provided context is
  3763. // canceled.
  3764. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
  3765. c.ctx_ = ctx
  3766. return c
  3767. }
  3768. // Header returns an http.Header that can be modified by the caller to
  3769. // add HTTP headers to the request.
  3770. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Header() http.Header {
  3771. if c.header_ == nil {
  3772. c.header_ = make(http.Header)
  3773. }
  3774. return c.header_
  3775. }
  3776. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) {
  3777. reqHeaders := make(http.Header)
  3778. for k, v := range c.header_ {
  3779. reqHeaders[k] = v
  3780. }
  3781. reqHeaders.Set("User-Agent", c.s.userAgent())
  3782. if c.ifNoneMatch_ != "" {
  3783. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3784. }
  3785. var body io.Reader = nil
  3786. c.urlParams_.Set("alt", alt)
  3787. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3788. urls += "?" + c.urlParams_.Encode()
  3789. req, _ := http.NewRequest("GET", urls, body)
  3790. req.Header = reqHeaders
  3791. googleapi.Expand(req.URL, map[string]string{
  3792. "name": c.name,
  3793. })
  3794. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3795. }
  3796. // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.get" call.
  3797. // Exactly one of *GoogleCloudServicebrokerV1beta1__GetBindingResponse
  3798. // or error will be non-nil. Any non-2xx status code is an error.
  3799. // Response headers are in either
  3800. // *GoogleCloudServicebrokerV1beta1__GetBindingResponse.ServerResponse.He
  3801. // ader or (if a response was returned at all) in
  3802. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3803. // whether the returned error was because http.StatusNotModified was
  3804. // returned.
  3805. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__GetBindingResponse, error) {
  3806. gensupport.SetOptions(c.urlParams_, opts...)
  3807. res, err := c.doRequest("json")
  3808. if res != nil && res.StatusCode == http.StatusNotModified {
  3809. if res.Body != nil {
  3810. res.Body.Close()
  3811. }
  3812. return nil, &googleapi.Error{
  3813. Code: res.StatusCode,
  3814. Header: res.Header,
  3815. }
  3816. }
  3817. if err != nil {
  3818. return nil, err
  3819. }
  3820. defer googleapi.CloseBody(res)
  3821. if err := googleapi.CheckResponse(res); err != nil {
  3822. return nil, err
  3823. }
  3824. ret := &GoogleCloudServicebrokerV1beta1__GetBindingResponse{
  3825. ServerResponse: googleapi.ServerResponse{
  3826. Header: res.Header,
  3827. HTTPStatusCode: res.StatusCode,
  3828. },
  3829. }
  3830. target := &ret
  3831. if err := gensupport.DecodeResponse(target, res); err != nil {
  3832. return nil, err
  3833. }
  3834. return ret, nil
  3835. // {
  3836. // "description": "GetBinding returns the binding information.",
  3837. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}",
  3838. // "httpMethod": "GET",
  3839. // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.get",
  3840. // "parameterOrder": [
  3841. // "name"
  3842. // ],
  3843. // "parameters": {
  3844. // "name": {
  3845. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/service_instances/[INSTANCE_ID]/service_bindings`.",
  3846. // "location": "path",
  3847. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+/service_bindings/[^/]+$",
  3848. // "required": true,
  3849. // "type": "string"
  3850. // },
  3851. // "planId": {
  3852. // "description": "Plan id.",
  3853. // "location": "query",
  3854. // "type": "string"
  3855. // },
  3856. // "serviceId": {
  3857. // "description": "Service id.",
  3858. // "location": "query",
  3859. // "type": "string"
  3860. // }
  3861. // },
  3862. // "path": "v1beta1/{+name}",
  3863. // "response": {
  3864. // "$ref": "GoogleCloudServicebrokerV1beta1__GetBindingResponse"
  3865. // },
  3866. // "scopes": [
  3867. // "https://www.googleapis.com/auth/cloud-platform"
  3868. // ]
  3869. // }
  3870. }
  3871. // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.getLast_operation":
  3872. type ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall struct {
  3873. s *Service
  3874. name string
  3875. urlParams_ gensupport.URLParams
  3876. ifNoneMatch_ string
  3877. ctx_ context.Context
  3878. header_ http.Header
  3879. }
  3880. // GetLastOperation: Returns the state of the last operation for the
  3881. // binding.
  3882. // Only last (or current) operation can be polled.
  3883. func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) GetLastOperation(name string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3884. c := &ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3885. c.name = name
  3886. return c
  3887. }
  3888. // Operation sets the optional parameter "operation": If `operation` was
  3889. // returned during mutation operation, this field must be
  3890. // populated with the provided value.
  3891. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Operation(operation string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3892. c.urlParams_.Set("operation", operation)
  3893. return c
  3894. }
  3895. // PlanId sets the optional parameter "planId": Plan id.
  3896. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3897. c.urlParams_.Set("planId", planId)
  3898. return c
  3899. }
  3900. // ServiceId sets the optional parameter "serviceId": Service id.
  3901. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3902. c.urlParams_.Set("serviceId", serviceId)
  3903. return c
  3904. }
  3905. // Fields allows partial responses to be retrieved. See
  3906. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3907. // for more information.
  3908. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3909. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3910. return c
  3911. }
  3912. // IfNoneMatch sets the optional parameter which makes the operation
  3913. // fail if the object's ETag matches the given value. This is useful for
  3914. // getting updates only after the object has changed since the last
  3915. // request. Use googleapi.IsNotModified to check whether the response
  3916. // error from Do is the result of In-None-Match.
  3917. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3918. c.ifNoneMatch_ = entityTag
  3919. return c
  3920. }
  3921. // Context sets the context to be used in this call's Do method. Any
  3922. // pending HTTP request will be aborted if the provided context is
  3923. // canceled.
  3924. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
  3925. c.ctx_ = ctx
  3926. return c
  3927. }
  3928. // Header returns an http.Header that can be modified by the caller to
  3929. // add HTTP headers to the request.
  3930. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Header() http.Header {
  3931. if c.header_ == nil {
  3932. c.header_ = make(http.Header)
  3933. }
  3934. return c.header_
  3935. }
  3936. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
  3937. reqHeaders := make(http.Header)
  3938. for k, v := range c.header_ {
  3939. reqHeaders[k] = v
  3940. }
  3941. reqHeaders.Set("User-Agent", c.s.userAgent())
  3942. if c.ifNoneMatch_ != "" {
  3943. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3944. }
  3945. var body io.Reader = nil
  3946. c.urlParams_.Set("alt", alt)
  3947. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
  3948. urls += "?" + c.urlParams_.Encode()
  3949. req, _ := http.NewRequest("GET", urls, body)
  3950. req.Header = reqHeaders
  3951. googleapi.Expand(req.URL, map[string]string{
  3952. "name": c.name,
  3953. })
  3954. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3955. }
  3956. // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.getLast_operation" call.
  3957. // Exactly one of *GoogleCloudServicebrokerV1beta1__Operation or error
  3958. // will be non-nil. Any non-2xx status code is an error. Response
  3959. // headers are in either
  3960. // *GoogleCloudServicebrokerV1beta1__Operation.ServerResponse.Header or
  3961. // (if a response was returned at all) in
  3962. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3963. // whether the returned error was because http.StatusNotModified was
  3964. // returned.
  3965. func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
  3966. gensupport.SetOptions(c.urlParams_, opts...)
  3967. res, err := c.doRequest("json")
  3968. if res != nil && res.StatusCode == http.StatusNotModified {
  3969. if res.Body != nil {
  3970. res.Body.Close()
  3971. }
  3972. return nil, &googleapi.Error{
  3973. Code: res.StatusCode,
  3974. Header: res.Header,
  3975. }
  3976. }
  3977. if err != nil {
  3978. return nil, err
  3979. }
  3980. defer googleapi.CloseBody(res)
  3981. if err := googleapi.CheckResponse(res); err != nil {
  3982. return nil, err
  3983. }
  3984. ret := &GoogleCloudServicebrokerV1beta1__Operation{
  3985. ServerResponse: googleapi.ServerResponse{
  3986. Header: res.Header,
  3987. HTTPStatusCode: res.StatusCode,
  3988. },
  3989. }
  3990. target := &ret
  3991. if err := gensupport.DecodeResponse(target, res); err != nil {
  3992. return nil, err
  3993. }
  3994. return ret, nil
  3995. // {
  3996. // "description": "Returns the state of the last operation for the binding.\nOnly last (or current) operation can be polled.",
  3997. // "flatPath": "v1beta1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}/last_operation",
  3998. // "httpMethod": "GET",
  3999. // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.getLast_operation",
  4000. // "parameterOrder": [
  4001. // "name"
  4002. // ],
  4003. // "parameters": {
  4004. // "name": {
  4005. // "description": "Name must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/v2/service_instances/[INSTANCE_ID]/service_binding/[BINDING_ID]`.",
  4006. // "location": "path",
  4007. // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+/service_bindings/[^/]+$",
  4008. // "required": true,
  4009. // "type": "string"
  4010. // },
  4011. // "operation": {
  4012. // "description": "If `operation` was returned during mutation operation, this field must be\npopulated with the provided value.",
  4013. // "location": "query",
  4014. // "type": "string"
  4015. // },
  4016. // "planId": {
  4017. // "description": "Plan id.",
  4018. // "location": "query",
  4019. // "type": "string"
  4020. // },
  4021. // "serviceId": {
  4022. // "description": "Service id.",
  4023. // "location": "query",
  4024. // "type": "string"
  4025. // }
  4026. // },
  4027. // "path": "v1beta1/{+name}/last_operation",
  4028. // "response": {
  4029. // "$ref": "GoogleCloudServicebrokerV1beta1__Operation"
  4030. // },
  4031. // "scopes": [
  4032. // "https://www.googleapis.com/auth/cloud-platform"
  4033. // ]
  4034. // }
  4035. }
  4036. // method id "servicebroker.getIamPolicy":
  4037. type V1beta1GetIamPolicyCall struct {
  4038. s *Service
  4039. resource string
  4040. urlParams_ gensupport.URLParams
  4041. ifNoneMatch_ string
  4042. ctx_ context.Context
  4043. header_ http.Header
  4044. }
  4045. // GetIamPolicy: Gets the access control policy for a resource.
  4046. // Returns an empty policy if the resource exists and does not have a
  4047. // policy
  4048. // set.
  4049. func (r *V1beta1Service) GetIamPolicy(resource string) *V1beta1GetIamPolicyCall {
  4050. c := &V1beta1GetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4051. c.resource = resource
  4052. return c
  4053. }
  4054. // Fields allows partial responses to be retrieved. See
  4055. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4056. // for more information.
  4057. func (c *V1beta1GetIamPolicyCall) Fields(s ...googleapi.Field) *V1beta1GetIamPolicyCall {
  4058. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4059. return c
  4060. }
  4061. // IfNoneMatch sets the optional parameter which makes the operation
  4062. // fail if the object's ETag matches the given value. This is useful for
  4063. // getting updates only after the object has changed since the last
  4064. // request. Use googleapi.IsNotModified to check whether the response
  4065. // error from Do is the result of In-None-Match.
  4066. func (c *V1beta1GetIamPolicyCall) IfNoneMatch(entityTag string) *V1beta1GetIamPolicyCall {
  4067. c.ifNoneMatch_ = entityTag
  4068. return c
  4069. }
  4070. // Context sets the context to be used in this call's Do method. Any
  4071. // pending HTTP request will be aborted if the provided context is
  4072. // canceled.
  4073. func (c *V1beta1GetIamPolicyCall) Context(ctx context.Context) *V1beta1GetIamPolicyCall {
  4074. c.ctx_ = ctx
  4075. return c
  4076. }
  4077. // Header returns an http.Header that can be modified by the caller to
  4078. // add HTTP headers to the request.
  4079. func (c *V1beta1GetIamPolicyCall) Header() http.Header {
  4080. if c.header_ == nil {
  4081. c.header_ = make(http.Header)
  4082. }
  4083. return c.header_
  4084. }
  4085. func (c *V1beta1GetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4086. reqHeaders := make(http.Header)
  4087. for k, v := range c.header_ {
  4088. reqHeaders[k] = v
  4089. }
  4090. reqHeaders.Set("User-Agent", c.s.userAgent())
  4091. if c.ifNoneMatch_ != "" {
  4092. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4093. }
  4094. var body io.Reader = nil
  4095. c.urlParams_.Set("alt", alt)
  4096. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  4097. urls += "?" + c.urlParams_.Encode()
  4098. req, _ := http.NewRequest("GET", urls, body)
  4099. req.Header = reqHeaders
  4100. googleapi.Expand(req.URL, map[string]string{
  4101. "resource": c.resource,
  4102. })
  4103. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4104. }
  4105. // Do executes the "servicebroker.getIamPolicy" call.
  4106. // Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any
  4107. // non-2xx status code is an error. Response headers are in either
  4108. // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was
  4109. // returned at all) in error.(*googleapi.Error).Header. Use
  4110. // googleapi.IsNotModified to check whether the returned error was
  4111. // because http.StatusNotModified was returned.
  4112. func (c *V1beta1GetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
  4113. gensupport.SetOptions(c.urlParams_, opts...)
  4114. res, err := c.doRequest("json")
  4115. if res != nil && res.StatusCode == http.StatusNotModified {
  4116. if res.Body != nil {
  4117. res.Body.Close()
  4118. }
  4119. return nil, &googleapi.Error{
  4120. Code: res.StatusCode,
  4121. Header: res.Header,
  4122. }
  4123. }
  4124. if err != nil {
  4125. return nil, err
  4126. }
  4127. defer googleapi.CloseBody(res)
  4128. if err := googleapi.CheckResponse(res); err != nil {
  4129. return nil, err
  4130. }
  4131. ret := &GoogleIamV1__Policy{
  4132. ServerResponse: googleapi.ServerResponse{
  4133. Header: res.Header,
  4134. HTTPStatusCode: res.StatusCode,
  4135. },
  4136. }
  4137. target := &ret
  4138. if err := gensupport.DecodeResponse(target, res); err != nil {
  4139. return nil, err
  4140. }
  4141. return ret, nil
  4142. // {
  4143. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  4144. // "flatPath": "v1beta1/{v1beta1Id}:getIamPolicy",
  4145. // "httpMethod": "GET",
  4146. // "id": "servicebroker.getIamPolicy",
  4147. // "parameterOrder": [
  4148. // "resource"
  4149. // ],
  4150. // "parameters": {
  4151. // "resource": {
  4152. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  4153. // "location": "path",
  4154. // "pattern": "^.+$",
  4155. // "required": true,
  4156. // "type": "string"
  4157. // }
  4158. // },
  4159. // "path": "v1beta1/{+resource}:getIamPolicy",
  4160. // "response": {
  4161. // "$ref": "GoogleIamV1__Policy"
  4162. // },
  4163. // "scopes": [
  4164. // "https://www.googleapis.com/auth/cloud-platform"
  4165. // ]
  4166. // }
  4167. }
  4168. // method id "servicebroker.setIamPolicy":
  4169. type V1beta1SetIamPolicyCall struct {
  4170. s *Service
  4171. resource string
  4172. googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
  4173. urlParams_ gensupport.URLParams
  4174. ctx_ context.Context
  4175. header_ http.Header
  4176. }
  4177. // SetIamPolicy: Sets the access control policy on the specified
  4178. // resource. Replaces any
  4179. // existing policy.
  4180. func (r *V1beta1Service) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *V1beta1SetIamPolicyCall {
  4181. c := &V1beta1SetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4182. c.resource = resource
  4183. c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
  4184. return c
  4185. }
  4186. // Fields allows partial responses to be retrieved. See
  4187. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4188. // for more information.
  4189. func (c *V1beta1SetIamPolicyCall) Fields(s ...googleapi.Field) *V1beta1SetIamPolicyCall {
  4190. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4191. return c
  4192. }
  4193. // Context sets the context to be used in this call's Do method. Any
  4194. // pending HTTP request will be aborted if the provided context is
  4195. // canceled.
  4196. func (c *V1beta1SetIamPolicyCall) Context(ctx context.Context) *V1beta1SetIamPolicyCall {
  4197. c.ctx_ = ctx
  4198. return c
  4199. }
  4200. // Header returns an http.Header that can be modified by the caller to
  4201. // add HTTP headers to the request.
  4202. func (c *V1beta1SetIamPolicyCall) Header() http.Header {
  4203. if c.header_ == nil {
  4204. c.header_ = make(http.Header)
  4205. }
  4206. return c.header_
  4207. }
  4208. func (c *V1beta1SetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4209. reqHeaders := make(http.Header)
  4210. for k, v := range c.header_ {
  4211. reqHeaders[k] = v
  4212. }
  4213. reqHeaders.Set("User-Agent", c.s.userAgent())
  4214. var body io.Reader = nil
  4215. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
  4216. if err != nil {
  4217. return nil, err
  4218. }
  4219. reqHeaders.Set("Content-Type", "application/json")
  4220. c.urlParams_.Set("alt", alt)
  4221. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  4222. urls += "?" + c.urlParams_.Encode()
  4223. req, _ := http.NewRequest("POST", urls, body)
  4224. req.Header = reqHeaders
  4225. googleapi.Expand(req.URL, map[string]string{
  4226. "resource": c.resource,
  4227. })
  4228. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4229. }
  4230. // Do executes the "servicebroker.setIamPolicy" call.
  4231. // Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any
  4232. // non-2xx status code is an error. Response headers are in either
  4233. // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was
  4234. // returned at all) in error.(*googleapi.Error).Header. Use
  4235. // googleapi.IsNotModified to check whether the returned error was
  4236. // because http.StatusNotModified was returned.
  4237. func (c *V1beta1SetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
  4238. gensupport.SetOptions(c.urlParams_, opts...)
  4239. res, err := c.doRequest("json")
  4240. if res != nil && res.StatusCode == http.StatusNotModified {
  4241. if res.Body != nil {
  4242. res.Body.Close()
  4243. }
  4244. return nil, &googleapi.Error{
  4245. Code: res.StatusCode,
  4246. Header: res.Header,
  4247. }
  4248. }
  4249. if err != nil {
  4250. return nil, err
  4251. }
  4252. defer googleapi.CloseBody(res)
  4253. if err := googleapi.CheckResponse(res); err != nil {
  4254. return nil, err
  4255. }
  4256. ret := &GoogleIamV1__Policy{
  4257. ServerResponse: googleapi.ServerResponse{
  4258. Header: res.Header,
  4259. HTTPStatusCode: res.StatusCode,
  4260. },
  4261. }
  4262. target := &ret
  4263. if err := gensupport.DecodeResponse(target, res); err != nil {
  4264. return nil, err
  4265. }
  4266. return ret, nil
  4267. // {
  4268. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  4269. // "flatPath": "v1beta1/{v1beta1Id}:setIamPolicy",
  4270. // "httpMethod": "POST",
  4271. // "id": "servicebroker.setIamPolicy",
  4272. // "parameterOrder": [
  4273. // "resource"
  4274. // ],
  4275. // "parameters": {
  4276. // "resource": {
  4277. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  4278. // "location": "path",
  4279. // "pattern": "^.+$",
  4280. // "required": true,
  4281. // "type": "string"
  4282. // }
  4283. // },
  4284. // "path": "v1beta1/{+resource}:setIamPolicy",
  4285. // "request": {
  4286. // "$ref": "GoogleIamV1__SetIamPolicyRequest"
  4287. // },
  4288. // "response": {
  4289. // "$ref": "GoogleIamV1__Policy"
  4290. // },
  4291. // "scopes": [
  4292. // "https://www.googleapis.com/auth/cloud-platform"
  4293. // ]
  4294. // }
  4295. }
  4296. // method id "servicebroker.testIamPermissions":
  4297. type V1beta1TestIamPermissionsCall struct {
  4298. s *Service
  4299. resource string
  4300. googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
  4301. urlParams_ gensupport.URLParams
  4302. ctx_ context.Context
  4303. header_ http.Header
  4304. }
  4305. // TestIamPermissions: Returns permissions that a caller has on the
  4306. // specified resource.
  4307. // If the resource does not exist, this will return an empty set
  4308. // of
  4309. // permissions, not a NOT_FOUND error.
  4310. //
  4311. // Note: This operation is designed to be used for building
  4312. // permission-aware
  4313. // UIs and command-line tools, not for authorization checking. This
  4314. // operation
  4315. // may "fail open" without warning.
  4316. func (r *V1beta1Service) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *V1beta1TestIamPermissionsCall {
  4317. c := &V1beta1TestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4318. c.resource = resource
  4319. c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
  4320. return c
  4321. }
  4322. // Fields allows partial responses to be retrieved. See
  4323. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4324. // for more information.
  4325. func (c *V1beta1TestIamPermissionsCall) Fields(s ...googleapi.Field) *V1beta1TestIamPermissionsCall {
  4326. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4327. return c
  4328. }
  4329. // Context sets the context to be used in this call's Do method. Any
  4330. // pending HTTP request will be aborted if the provided context is
  4331. // canceled.
  4332. func (c *V1beta1TestIamPermissionsCall) Context(ctx context.Context) *V1beta1TestIamPermissionsCall {
  4333. c.ctx_ = ctx
  4334. return c
  4335. }
  4336. // Header returns an http.Header that can be modified by the caller to
  4337. // add HTTP headers to the request.
  4338. func (c *V1beta1TestIamPermissionsCall) Header() http.Header {
  4339. if c.header_ == nil {
  4340. c.header_ = make(http.Header)
  4341. }
  4342. return c.header_
  4343. }
  4344. func (c *V1beta1TestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4345. reqHeaders := make(http.Header)
  4346. for k, v := range c.header_ {
  4347. reqHeaders[k] = v
  4348. }
  4349. reqHeaders.Set("User-Agent", c.s.userAgent())
  4350. var body io.Reader = nil
  4351. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
  4352. if err != nil {
  4353. return nil, err
  4354. }
  4355. reqHeaders.Set("Content-Type", "application/json")
  4356. c.urlParams_.Set("alt", alt)
  4357. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  4358. urls += "?" + c.urlParams_.Encode()
  4359. req, _ := http.NewRequest("POST", urls, body)
  4360. req.Header = reqHeaders
  4361. googleapi.Expand(req.URL, map[string]string{
  4362. "resource": c.resource,
  4363. })
  4364. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4365. }
  4366. // Do executes the "servicebroker.testIamPermissions" call.
  4367. // Exactly one of *GoogleIamV1__TestIamPermissionsResponse or error will
  4368. // be non-nil. Any non-2xx status code is an error. Response headers are
  4369. // in either
  4370. // *GoogleIamV1__TestIamPermissionsResponse.ServerResponse.Header or (if
  4371. // a response was returned at all) in error.(*googleapi.Error).Header.
  4372. // Use googleapi.IsNotModified to check whether the returned error was
  4373. // because http.StatusNotModified was returned.
  4374. func (c *V1beta1TestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
  4375. gensupport.SetOptions(c.urlParams_, opts...)
  4376. res, err := c.doRequest("json")
  4377. if res != nil && res.StatusCode == http.StatusNotModified {
  4378. if res.Body != nil {
  4379. res.Body.Close()
  4380. }
  4381. return nil, &googleapi.Error{
  4382. Code: res.StatusCode,
  4383. Header: res.Header,
  4384. }
  4385. }
  4386. if err != nil {
  4387. return nil, err
  4388. }
  4389. defer googleapi.CloseBody(res)
  4390. if err := googleapi.CheckResponse(res); err != nil {
  4391. return nil, err
  4392. }
  4393. ret := &GoogleIamV1__TestIamPermissionsResponse{
  4394. ServerResponse: googleapi.ServerResponse{
  4395. Header: res.Header,
  4396. HTTPStatusCode: res.StatusCode,
  4397. },
  4398. }
  4399. target := &ret
  4400. if err := gensupport.DecodeResponse(target, res); err != nil {
  4401. return nil, err
  4402. }
  4403. return ret, nil
  4404. // {
  4405. // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
  4406. // "flatPath": "v1beta1/{v1beta1Id}:testIamPermissions",
  4407. // "httpMethod": "POST",
  4408. // "id": "servicebroker.testIamPermissions",
  4409. // "parameterOrder": [
  4410. // "resource"
  4411. // ],
  4412. // "parameters": {
  4413. // "resource": {
  4414. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  4415. // "location": "path",
  4416. // "pattern": "^.+$",
  4417. // "required": true,
  4418. // "type": "string"
  4419. // }
  4420. // },
  4421. // "path": "v1beta1/{+resource}:testIamPermissions",
  4422. // "request": {
  4423. // "$ref": "GoogleIamV1__TestIamPermissionsRequest"
  4424. // },
  4425. // "response": {
  4426. // "$ref": "GoogleIamV1__TestIamPermissionsResponse"
  4427. // },
  4428. // "scopes": [
  4429. // "https://www.googleapis.com/auth/cloud-platform"
  4430. // ]
  4431. // }
  4432. }