Debian Codegraph @

apihub/v1/apihub-gen.go

raw symbols SCIP
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package apihub provides access to the API hub API.
8 //
9 // For product documentation, see: https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/apihub/v1"
27 // ...
28 // ctx := context.Background()
29 // apihubService, err := apihub.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // To use an API key for authentication (note: some APIs do not support API
38 // keys), use [google.golang.org/api/option.WithAPIKey]:
39 //
40 // apihubService, err := apihub.NewService(ctx, option.WithAPIKey("AIza..."))
41 //
42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
43 // flow, use [google.golang.org/api/option.WithTokenSource]:
44 //
45 // config := &oauth2.Config{...}
46 // // ...
47 // token, err := config.Exchange(ctx, ...)
48 // apihubService, err := apihub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package apihub // import "google.golang.org/api/apihub/v1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "apihub:v1"
93 const apiName = "apihub"
94 const apiVersion = "v1"
95 const basePath = "https://apihub.googleapis.com/"
96 const basePathTemplate = "https://apihub.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://apihub.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
144 BasePath string // API endpoint base URL
145 UserAgent string // optional additional User-Agent fragment
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Addons = NewProjectsLocationsAddonsService(s)
172 rs.ApiHubInstances = NewProjectsLocationsApiHubInstancesService(s)
173 rs.Apis = NewProjectsLocationsApisService(s)
174 rs.Attributes = NewProjectsLocationsAttributesService(s)
175 rs.Curations = NewProjectsLocationsCurationsService(s)
176 rs.Dependencies = NewProjectsLocationsDependenciesService(s)
177 rs.Deployments = NewProjectsLocationsDeploymentsService(s)
178 rs.DiscoveredApiObservations = NewProjectsLocationsDiscoveredApiObservationsService(s)
179 rs.ExternalApis = NewProjectsLocationsExternalApisService(s)
180 rs.HostProjectRegistrations = NewProjectsLocationsHostProjectRegistrationsService(s)
181 rs.Operations = NewProjectsLocationsOperationsService(s)
182 rs.Plugins = NewProjectsLocationsPluginsService(s)
183 rs.RuntimeProjectAttachments = NewProjectsLocationsRuntimeProjectAttachmentsService(s)
184 return rs
185 }
186
187 type ProjectsLocationsService struct {
188 s *Service
189
190 Addons *ProjectsLocationsAddonsService
191
192 ApiHubInstances *ProjectsLocationsApiHubInstancesService
193
194 Apis *ProjectsLocationsApisService
195
196 Attributes *ProjectsLocationsAttributesService
197
198 Curations *ProjectsLocationsCurationsService
199
200 Dependencies *ProjectsLocationsDependenciesService
201
202 Deployments *ProjectsLocationsDeploymentsService
203
204 DiscoveredApiObservations *ProjectsLocationsDiscoveredApiObservationsService
205
206 ExternalApis *ProjectsLocationsExternalApisService
207
208 HostProjectRegistrations *ProjectsLocationsHostProjectRegistrationsService
209
210 Operations *ProjectsLocationsOperationsService
211
212 Plugins *ProjectsLocationsPluginsService
213
214 RuntimeProjectAttachments *ProjectsLocationsRuntimeProjectAttachmentsService
215 }
216
217 func NewProjectsLocationsAddonsService(s *Service) *ProjectsLocationsAddonsService {
218 rs := &ProjectsLocationsAddonsService{s: s}
219 return rs
220 }
221
222 type ProjectsLocationsAddonsService struct {
223 s *Service
224 }
225
226 func NewProjectsLocationsApiHubInstancesService(s *Service) *ProjectsLocationsApiHubInstancesService {
227 rs := &ProjectsLocationsApiHubInstancesService{s: s}
228 return rs
229 }
230
231 type ProjectsLocationsApiHubInstancesService struct {
232 s *Service
233 }
234
235 func NewProjectsLocationsApisService(s *Service) *ProjectsLocationsApisService {
236 rs := &ProjectsLocationsApisService{s: s}
237 rs.Versions = NewProjectsLocationsApisVersionsService(s)
238 return rs
239 }
240
241 type ProjectsLocationsApisService struct {
242 s *Service
243
244 Versions *ProjectsLocationsApisVersionsService
245 }
246
247 func NewProjectsLocationsApisVersionsService(s *Service) *ProjectsLocationsApisVersionsService {
248 rs := &ProjectsLocationsApisVersionsService{s: s}
249 rs.Definitions = NewProjectsLocationsApisVersionsDefinitionsService(s)
250 rs.Operations = NewProjectsLocationsApisVersionsOperationsService(s)
251 rs.Specs = NewProjectsLocationsApisVersionsSpecsService(s)
252 return rs
253 }
254
255 type ProjectsLocationsApisVersionsService struct {
256 s *Service
257
258 Definitions *ProjectsLocationsApisVersionsDefinitionsService
259
260 Operations *ProjectsLocationsApisVersionsOperationsService
261
262 Specs *ProjectsLocationsApisVersionsSpecsService
263 }
264
265 func NewProjectsLocationsApisVersionsDefinitionsService(s *Service) *ProjectsLocationsApisVersionsDefinitionsService {
266 rs := &ProjectsLocationsApisVersionsDefinitionsService{s: s}
267 return rs
268 }
269
270 type ProjectsLocationsApisVersionsDefinitionsService struct {
271 s *Service
272 }
273
274 func NewProjectsLocationsApisVersionsOperationsService(s *Service) *ProjectsLocationsApisVersionsOperationsService {
275 rs := &ProjectsLocationsApisVersionsOperationsService{s: s}
276 return rs
277 }
278
279 type ProjectsLocationsApisVersionsOperationsService struct {
280 s *Service
281 }
282
283 func NewProjectsLocationsApisVersionsSpecsService(s *Service) *ProjectsLocationsApisVersionsSpecsService {
284 rs := &ProjectsLocationsApisVersionsSpecsService{s: s}
285 return rs
286 }
287
288 type ProjectsLocationsApisVersionsSpecsService struct {
289 s *Service
290 }
291
292 func NewProjectsLocationsAttributesService(s *Service) *ProjectsLocationsAttributesService {
293 rs := &ProjectsLocationsAttributesService{s: s}
294 return rs
295 }
296
297 type ProjectsLocationsAttributesService struct {
298 s *Service
299 }
300
301 func NewProjectsLocationsCurationsService(s *Service) *ProjectsLocationsCurationsService {
302 rs := &ProjectsLocationsCurationsService{s: s}
303 return rs
304 }
305
306 type ProjectsLocationsCurationsService struct {
307 s *Service
308 }
309
310 func NewProjectsLocationsDependenciesService(s *Service) *ProjectsLocationsDependenciesService {
311 rs := &ProjectsLocationsDependenciesService{s: s}
312 return rs
313 }
314
315 type ProjectsLocationsDependenciesService struct {
316 s *Service
317 }
318
319 func NewProjectsLocationsDeploymentsService(s *Service) *ProjectsLocationsDeploymentsService {
320 rs := &ProjectsLocationsDeploymentsService{s: s}
321 return rs
322 }
323
324 type ProjectsLocationsDeploymentsService struct {
325 s *Service
326 }
327
328 func NewProjectsLocationsDiscoveredApiObservationsService(s *Service) *ProjectsLocationsDiscoveredApiObservationsService {
329 rs := &ProjectsLocationsDiscoveredApiObservationsService{s: s}
330 rs.DiscoveredApiOperations = NewProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService(s)
331 return rs
332 }
333
334 type ProjectsLocationsDiscoveredApiObservationsService struct {
335 s *Service
336
337 DiscoveredApiOperations *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService
338 }
339
340 func NewProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService(s *Service) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService {
341 rs := &ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService{s: s}
342 return rs
343 }
344
345 type ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService struct {
346 s *Service
347 }
348
349 func NewProjectsLocationsExternalApisService(s *Service) *ProjectsLocationsExternalApisService {
350 rs := &ProjectsLocationsExternalApisService{s: s}
351 return rs
352 }
353
354 type ProjectsLocationsExternalApisService struct {
355 s *Service
356 }
357
358 func NewProjectsLocationsHostProjectRegistrationsService(s *Service) *ProjectsLocationsHostProjectRegistrationsService {
359 rs := &ProjectsLocationsHostProjectRegistrationsService{s: s}
360 return rs
361 }
362
363 type ProjectsLocationsHostProjectRegistrationsService struct {
364 s *Service
365 }
366
367 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
368 rs := &ProjectsLocationsOperationsService{s: s}
369 return rs
370 }
371
372 type ProjectsLocationsOperationsService struct {
373 s *Service
374 }
375
376 func NewProjectsLocationsPluginsService(s *Service) *ProjectsLocationsPluginsService {
377 rs := &ProjectsLocationsPluginsService{s: s}
378 rs.Instances = NewProjectsLocationsPluginsInstancesService(s)
379 rs.StyleGuide = NewProjectsLocationsPluginsStyleGuideService(s)
380 return rs
381 }
382
383 type ProjectsLocationsPluginsService struct {
384 s *Service
385
386 Instances *ProjectsLocationsPluginsInstancesService
387
388 StyleGuide *ProjectsLocationsPluginsStyleGuideService
389 }
390
391 func NewProjectsLocationsPluginsInstancesService(s *Service) *ProjectsLocationsPluginsInstancesService {
392 rs := &ProjectsLocationsPluginsInstancesService{s: s}
393 return rs
394 }
395
396 type ProjectsLocationsPluginsInstancesService struct {
397 s *Service
398 }
399
400 func NewProjectsLocationsPluginsStyleGuideService(s *Service) *ProjectsLocationsPluginsStyleGuideService {
401 rs := &ProjectsLocationsPluginsStyleGuideService{s: s}
402 return rs
403 }
404
405 type ProjectsLocationsPluginsStyleGuideService struct {
406 s *Service
407 }
408
409 func NewProjectsLocationsRuntimeProjectAttachmentsService(s *Service) *ProjectsLocationsRuntimeProjectAttachmentsService {
410 rs := &ProjectsLocationsRuntimeProjectAttachmentsService{s: s}
411 return rs
412 }
413
414 type ProjectsLocationsRuntimeProjectAttachmentsService struct {
415 s *Service
416 }
417
418 // Empty: A generic empty message that you can re-use to avoid defining
419 // duplicated empty messages in your APIs. A typical example is to use it as
420 // the request or the response type of an API method. For instance: service Foo
421 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
422 type Empty struct {
423 // ServerResponse contains the HTTP response code and headers from the server.
424 googleapi.ServerResponse `json:"-"`
425 }
426
427 // GoogleCloudApihubV1APIMetadata: The API metadata.
428 type GoogleCloudApihubV1APIMetadata struct {
429 // Api: Required. The API resource to be pushed to Hub's collect layer. The ID
430 // of the API resource will be generated by Hub to ensure uniqueness across all
431 // APIs across systems.
432 Api *GoogleCloudApihubV1Api `json:"api,omitempty"`
433 // OriginalCreateTime: Optional. Timestamp indicating when the API was created
434 // at the source.
435 OriginalCreateTime string `json:"originalCreateTime,omitempty"`
436 // OriginalId: Optional. The unique identifier of the API in the system where
437 // it was originally created.
438 OriginalId string `json:"originalId,omitempty"`
439 // OriginalUpdateTime: Required. Timestamp indicating when the API was last
440 // updated at the source.
441 OriginalUpdateTime string `json:"originalUpdateTime,omitempty"`
442 // Versions: Optional. The list of versions present in an API resource.
443 Versions []*GoogleCloudApihubV1VersionMetadata `json:"versions,omitempty"`
444 // ForceSendFields is a list of field names (e.g. "Api") to unconditionally
445 // include in API requests. By default, fields with empty or default values are
446 // omitted from API requests. See
447 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
448 // details.
449 ForceSendFields []string `json:"-"`
450 // NullFields is a list of field names (e.g. "Api") to include in API requests
451 // with the JSON null value. By default, fields with empty values are omitted
452 // from API requests. See
453 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
454 NullFields []string `json:"-"`
455 }
456
457 func (s GoogleCloudApihubV1APIMetadata) MarshalJSON() ([]byte, error) {
458 type NoMethod GoogleCloudApihubV1APIMetadata
459 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
460 }
461
462 // GoogleCloudApihubV1ActionExecutionDetail: The details for the action to
463 // execute.
464 type GoogleCloudApihubV1ActionExecutionDetail struct {
465 // ActionId: Required. The action id of the plugin to execute.
466 ActionId string `json:"actionId,omitempty"`
467 // ForceSendFields is a list of field names (e.g. "ActionId") to
468 // unconditionally include in API requests. By default, fields with empty or
469 // default values are omitted from API requests. See
470 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
471 // details.
472 ForceSendFields []string `json:"-"`
473 // NullFields is a list of field names (e.g. "ActionId") to include in API
474 // requests with the JSON null value. By default, fields with empty values are
475 // omitted from API requests. See
476 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
477 NullFields []string `json:"-"`
478 }
479
480 func (s GoogleCloudApihubV1ActionExecutionDetail) MarshalJSON() ([]byte, error) {
481 type NoMethod GoogleCloudApihubV1ActionExecutionDetail
482 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
483 }
484
485 // GoogleCloudApihubV1AdditionalSpecContent: The additional spec content for
486 // the spec. This contains the metadata and the last update time for the
487 // additional spec content.
488 type GoogleCloudApihubV1AdditionalSpecContent struct {
489 // CreateTime: Output only. The time at which the spec content was created.
490 CreateTime string `json:"createTime,omitempty"`
491 // Labels: Optional. The labels of the spec content e.g. specboost addon
492 // version.
493 Labels map[string]string `json:"labels,omitempty"`
494 // SpecContentType: Required. The type of the spec content.
495 //
496 // Possible values:
497 // "SPEC_CONTENT_TYPE_UNSPECIFIED" - Unspecified spec content type. Defaults
498 // to spec content uploaded by the user.
499 // "BOOSTED_SPEC_CONTENT" - The spec content type for boosted spec.
500 // "GATEWAY_OPEN_API_SPEC" - The spec content type for OpenAPI spec. This
501 // enum is used for OpenAPI specs ingested via APIGEE X Gateway.
502 SpecContentType string `json:"specContentType,omitempty"`
503 // SpecContents: Optional. The additional spec contents.
504 SpecContents *GoogleCloudApihubV1SpecContents `json:"specContents,omitempty"`
505 // UpdateTime: Output only. The time at which the spec content was last
506 // updated.
507 UpdateTime string `json:"updateTime,omitempty"`
508 // ForceSendFields is a list of field names (e.g. "CreateTime") to
509 // unconditionally include in API requests. By default, fields with empty or
510 // default values are omitted from API requests. See
511 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
512 // details.
513 ForceSendFields []string `json:"-"`
514 // NullFields is a list of field names (e.g. "CreateTime") to include in API
515 // requests with the JSON null value. By default, fields with empty values are
516 // omitted from API requests. See
517 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
518 NullFields []string `json:"-"`
519 }
520
521 func (s GoogleCloudApihubV1AdditionalSpecContent) MarshalJSON() ([]byte, error) {
522 type NoMethod GoogleCloudApihubV1AdditionalSpecContent
523 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
524 }
525
526 // GoogleCloudApihubV1Addon: Addon resource.
527 type GoogleCloudApihubV1Addon struct {
528 // Config: Required. The configuration of the addon.
529 Config *GoogleCloudApihubV1AddonConfig `json:"config,omitempty"`
530 // CreateTime: Output only. The time at which the addon was created.
531 CreateTime string `json:"createTime,omitempty"`
532 // DataSource: Required. The data source on which the addon operates. This
533 // determines which field in the `config` oneof is used.
534 //
535 // Possible values:
536 // "DATA_SOURCE_UNSPECIFIED" - The data source of the addon is not specified.
537 // "PLUGIN_INSTANCE" - Addon operates on data collected from specific plugin
538 // instances.
539 // "ALL_DATA" - Addon operates on all data in the API hub.
540 DataSource string `json:"dataSource,omitempty"`
541 // Description: Optional. The description of the addon.
542 Description string `json:"description,omitempty"`
543 // DisplayName: Required. The display name of the addon.
544 DisplayName string `json:"displayName,omitempty"`
545 // Name: Identifier. The name of the addon to enable. Format:
546 // `projects/{project}/locations/{location}/addons/{addon}`.
547 Name string `json:"name,omitempty"`
548 // State: Output only. The state of the addon.
549 //
550 // Possible values:
551 // "ADDON_STATE_UNSPECIFIED" - The addon state is not specified.
552 // "ACTIVE" - The addon is active.
553 // "UPDATING" - The addon is being updated.
554 // "ERROR" - The addon is in error state.
555 // "INACTIVE" - The addon is inactive.
556 State string `json:"state,omitempty"`
557 // UpdateTime: Output only. The time at which the addon was last updated.
558 UpdateTime string `json:"updateTime,omitempty"`
559
560 // ServerResponse contains the HTTP response code and headers from the server.
561 googleapi.ServerResponse `json:"-"`
562 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
563 // include in API requests. By default, fields with empty or default values are
564 // omitted from API requests. See
565 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
566 // details.
567 ForceSendFields []string `json:"-"`
568 // NullFields is a list of field names (e.g. "Config") to include in API
569 // requests with the JSON null value. By default, fields with empty values are
570 // omitted from API requests. See
571 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
572 NullFields []string `json:"-"`
573 }
574
575 func (s GoogleCloudApihubV1Addon) MarshalJSON() ([]byte, error) {
576 type NoMethod GoogleCloudApihubV1Addon
577 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
578 }
579
580 // GoogleCloudApihubV1AddonConfig: Configuration for the addon.
581 type GoogleCloudApihubV1AddonConfig struct {
582 // AllDataAddonConfig: Configuration for addons which act on all data in the
583 // API hub.
584 AllDataAddonConfig *GoogleCloudApihubV1AllDataAddonConfig `json:"allDataAddonConfig,omitempty"`
585 // GatewayPluginAddonConfig: Configuration for gateway plugin addons.
586 GatewayPluginAddonConfig *GoogleCloudApihubV1GatewayPluginAddonConfig `json:"gatewayPluginAddonConfig,omitempty"`
587 // ForceSendFields is a list of field names (e.g. "AllDataAddonConfig") to
588 // unconditionally include in API requests. By default, fields with empty or
589 // default values are omitted from API requests. See
590 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
591 // details.
592 ForceSendFields []string `json:"-"`
593 // NullFields is a list of field names (e.g. "AllDataAddonConfig") to include
594 // in API requests with the JSON null value. By default, fields with empty
595 // values are omitted from API requests. See
596 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
597 NullFields []string `json:"-"`
598 }
599
600 func (s GoogleCloudApihubV1AddonConfig) MarshalJSON() ([]byte, error) {
601 type NoMethod GoogleCloudApihubV1AddonConfig
602 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
603 }
604
605 // GoogleCloudApihubV1AgentRegistrySyncConfig: The configuration for Agent
606 // Registry sync.
607 type GoogleCloudApihubV1AgentRegistrySyncConfig struct {
608 // Disabled: Optional. If true, the MCP data sync to the Agent Registry will be
609 // disabled. The default value is false.
610 Disabled bool `json:"disabled,omitempty"`
611 // ForceSendFields is a list of field names (e.g. "Disabled") to
612 // unconditionally include in API requests. By default, fields with empty or
613 // default values are omitted from API requests. See
614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
615 // details.
616 ForceSendFields []string `json:"-"`
617 // NullFields is a list of field names (e.g. "Disabled") to include in API
618 // requests with the JSON null value. By default, fields with empty values are
619 // omitted from API requests. See
620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
621 NullFields []string `json:"-"`
622 }
623
624 func (s GoogleCloudApihubV1AgentRegistrySyncConfig) MarshalJSON() ([]byte, error) {
625 type NoMethod GoogleCloudApihubV1AgentRegistrySyncConfig
626 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
627 }
628
629 // GoogleCloudApihubV1AllDataAddonConfig: Configuration for addons which act on
630 // all data in the API hub. This is used to specify if the addon is enabled for
631 // all data in the API hub.
632 type GoogleCloudApihubV1AllDataAddonConfig struct {
633 // Enabled: Required. If true, the addon is enabled for all data in the API
634 // hub.
635 Enabled bool `json:"enabled,omitempty"`
636 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
637 // include in API requests. By default, fields with empty or default values are
638 // omitted from API requests. See
639 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
640 // details.
641 ForceSendFields []string `json:"-"`
642 // NullFields is a list of field names (e.g. "Enabled") to include in API
643 // requests with the JSON null value. By default, fields with empty values are
644 // omitted from API requests. See
645 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
646 NullFields []string `json:"-"`
647 }
648
649 func (s GoogleCloudApihubV1AllDataAddonConfig) MarshalJSON() ([]byte, error) {
650 type NoMethod GoogleCloudApihubV1AllDataAddonConfig
651 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
652 }
653
654 // GoogleCloudApihubV1AllowedValue: The value that can be assigned to the
655 // attribute when the data type is enum.
656 type GoogleCloudApihubV1AllowedValue struct {
657 // Description: Optional. The detailed description of the allowed value.
658 Description string `json:"description,omitempty"`
659 // DisplayName: Required. The display name of the allowed value.
660 DisplayName string `json:"displayName,omitempty"`
661 // Id: Required. The ID of the allowed value. * If provided, the same will be
662 // used. The service will throw an error if the specified id is already used by
663 // another allowed value in the same attribute resource. * If not provided, a
664 // system generated id derived from the display name will be used. In this
665 // case, the service will handle conflict resolution by adding a system
666 // generated suffix in case of duplicates. This value should be 4-63
667 // characters, and valid characters are /a-z-/.
668 Id string `json:"id,omitempty"`
669 // Immutable: Optional. When set to true, the allowed value cannot be updated
670 // or deleted by the user. It can only be true for System defined attributes.
671 Immutable bool `json:"immutable,omitempty"`
672 // ForceSendFields is a list of field names (e.g. "Description") to
673 // unconditionally include in API requests. By default, fields with empty or
674 // default values are omitted from API requests. See
675 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
676 // details.
677 ForceSendFields []string `json:"-"`
678 // NullFields is a list of field names (e.g. "Description") to include in API
679 // requests with the JSON null value. By default, fields with empty values are
680 // omitted from API requests. See
681 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
682 NullFields []string `json:"-"`
683 }
684
685 func (s GoogleCloudApihubV1AllowedValue) MarshalJSON() ([]byte, error) {
686 type NoMethod GoogleCloudApihubV1AllowedValue
687 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
688 }
689
690 // GoogleCloudApihubV1Api: An API resource in the API Hub.
691 type GoogleCloudApihubV1Api struct {
692 // ApiFunctionalRequirements: Optional. The api functional requirements
693 // associated with the API resource. Carinality is 1 for this attribute. This
694 // maps to the following system defined attribute:
695 // `projects/{project}/locations/{location}/attributes/system-api-functional-req
696 // uirements` attribute. The value of the attribute should be a proper URI, and
697 // in case of Cloud Storage URI, it should point to a Cloud Storage object, not
698 // a directory.
699 ApiFunctionalRequirements *GoogleCloudApihubV1AttributeValues `json:"apiFunctionalRequirements,omitempty"`
700 // ApiRequirements: Optional. The api requirement doc associated with the API
701 // resource. Carinality is 1 for this attribute. This maps to the following
702 // system defined attribute:
703 // `projects/{project}/locations/{location}/attributes/system-api-requirements`
704 // attribute. The value of the attribute should be a proper URI, and in case of
705 // Cloud Storage URI, it should point to a Cloud Storage object, not a
706 // directory.
707 ApiRequirements *GoogleCloudApihubV1AttributeValues `json:"apiRequirements,omitempty"`
708 // ApiStyle: Optional. The style of the API. This maps to the following system
709 // defined attribute:
710 // `projects/{project}/locations/{location}/attributes/system-api-style`
711 // attribute. The number of values for this attribute will be based on the
712 // cardinality of the attribute. The same can be retrieved via GetAttribute
713 // API. All values should be from the list of allowed values defined for the
714 // attribute.
715 ApiStyle *GoogleCloudApihubV1AttributeValues `json:"apiStyle,omitempty"`
716 // ApiTechnicalRequirements: Optional. The api technical requirements
717 // associated with the API resource. Carinality is 1 for this attribute. This
718 // maps to the following system defined attribute:
719 // `projects/{project}/locations/{location}/attributes/system-api-technical-requ
720 // irements` attribute. The value of the attribute should be a proper URI, and
721 // in case of Cloud Storage URI, it should point to a Cloud Storage object, not
722 // a directory.
723 ApiTechnicalRequirements *GoogleCloudApihubV1AttributeValues `json:"apiTechnicalRequirements,omitempty"`
724 // Attributes: Optional. The list of user defined attributes associated with
725 // the API resource. The key is the attribute name. It will be of the format:
726 // `projects/{project}/locations/{location}/attributes/{attribute}`. The value
727 // is the attribute values associated with the resource.
728 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
729 // BusinessUnit: Optional. The business unit owning the API. This maps to the
730 // following system defined attribute:
731 // `projects/{project}/locations/{location}/attributes/system-business-unit`
732 // attribute. The number of values for this attribute will be based on the
733 // cardinality of the attribute. The same can be retrieved via GetAttribute
734 // API. All values should be from the list of allowed values defined for the
735 // attribute.
736 BusinessUnit *GoogleCloudApihubV1AttributeValues `json:"businessUnit,omitempty"`
737 // CreateTime: Output only. The time at which the API resource was created.
738 CreateTime string `json:"createTime,omitempty"`
739 // Description: Optional. The description of the API resource.
740 Description string `json:"description,omitempty"`
741 // DisplayName: Required. The display name of the API resource.
742 DisplayName string `json:"displayName,omitempty"`
743 // Documentation: Optional. The documentation for the API resource.
744 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
745 // Fingerprint: Optional. Fingerprint of the API resource. This must be unique
746 // for each API resource. It can neither be unset nor be updated to an existing
747 // fingerprint of another API resource.
748 Fingerprint string `json:"fingerprint,omitempty"`
749 // MaturityLevel: Optional. The maturity level of the API. This maps to the
750 // following system defined attribute:
751 // `projects/{project}/locations/{location}/attributes/system-maturity-level`
752 // attribute. The number of values for this attribute will be based on the
753 // cardinality of the attribute. The same can be retrieved via GetAttribute
754 // API. All values should be from the list of allowed values defined for the
755 // attribute.
756 MaturityLevel *GoogleCloudApihubV1AttributeValues `json:"maturityLevel,omitempty"`
757 // Name: Identifier. The name of the API resource in the API Hub. Format:
758 // `projects/{project}/locations/{location}/apis/{api}`
759 Name string `json:"name,omitempty"`
760 // Owner: Optional. Owner details for the API resource.
761 Owner *GoogleCloudApihubV1Owner `json:"owner,omitempty"`
762 // SelectedVersion: Optional. The selected version for an API resource. This
763 // can be used when special handling is needed on client side for particular
764 // version of the API. Format is
765 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
766 SelectedVersion string `json:"selectedVersion,omitempty"`
767 // SourceMetadata: Output only. The list of sources and metadata from the
768 // sources of the API resource.
769 SourceMetadata []*GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
770 // TargetUser: Optional. The target users for the API. This maps to the
771 // following system defined attribute:
772 // `projects/{project}/locations/{location}/attributes/system-target-user`
773 // attribute. The number of values for this attribute will be based on the
774 // cardinality of the attribute. The same can be retrieved via GetAttribute
775 // API. All values should be from the list of allowed values defined for the
776 // attribute.
777 TargetUser *GoogleCloudApihubV1AttributeValues `json:"targetUser,omitempty"`
778 // Team: Optional. The team owning the API. This maps to the following system
779 // defined attribute:
780 // `projects/{project}/locations/{location}/attributes/system-team` attribute.
781 // The number of values for this attribute will be based on the cardinality of
782 // the attribute. The same can be retrieved via GetAttribute API. All values
783 // should be from the list of allowed values defined for the attribute.
784 Team *GoogleCloudApihubV1AttributeValues `json:"team,omitempty"`
785 // UpdateTime: Output only. The time at which the API resource was last
786 // updated.
787 UpdateTime string `json:"updateTime,omitempty"`
788 // Versions: Output only. The list of versions present in an API resource.
789 // Note: An API resource can be associated with more than 1 version. Format is
790 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
791 Versions []string `json:"versions,omitempty"`
792
793 // ServerResponse contains the HTTP response code and headers from the server.
794 googleapi.ServerResponse `json:"-"`
795 // ForceSendFields is a list of field names (e.g. "ApiFunctionalRequirements")
796 // to unconditionally include in API requests. By default, fields with empty or
797 // default values are omitted from API requests. See
798 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
799 // details.
800 ForceSendFields []string `json:"-"`
801 // NullFields is a list of field names (e.g. "ApiFunctionalRequirements") to
802 // include in API requests with the JSON null value. By default, fields with
803 // empty values are omitted from API requests. See
804 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
805 NullFields []string `json:"-"`
806 }
807
808 func (s GoogleCloudApihubV1Api) MarshalJSON() ([]byte, error) {
809 type NoMethod GoogleCloudApihubV1Api
810 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
811 }
812
813 // GoogleCloudApihubV1ApiData: The API data to be collected.
814 type GoogleCloudApihubV1ApiData struct {
815 // ApiMetadataList: Optional. The list of API metadata.
816 ApiMetadataList *GoogleCloudApihubV1ApiMetadataList `json:"apiMetadataList,omitempty"`
817 // ForceSendFields is a list of field names (e.g. "ApiMetadataList") to
818 // unconditionally include in API requests. By default, fields with empty or
819 // default values are omitted from API requests. See
820 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
821 // details.
822 ForceSendFields []string `json:"-"`
823 // NullFields is a list of field names (e.g. "ApiMetadataList") to include in
824 // API requests with the JSON null value. By default, fields with empty values
825 // are omitted from API requests. See
826 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
827 NullFields []string `json:"-"`
828 }
829
830 func (s GoogleCloudApihubV1ApiData) MarshalJSON() ([]byte, error) {
831 type NoMethod GoogleCloudApihubV1ApiData
832 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
833 }
834
835 // GoogleCloudApihubV1ApiHubInstance: An ApiHubInstance represents the instance
836 // resources of the API Hub. Currently, only one ApiHub instance is allowed for
837 // each project.
838 type GoogleCloudApihubV1ApiHubInstance struct {
839 // Config: Required. Config of the ApiHub instance.
840 Config *GoogleCloudApihubV1Config `json:"config,omitempty"`
841 // CreateTime: Output only. Creation timestamp.
842 CreateTime string `json:"createTime,omitempty"`
843 // Description: Optional. Description of the ApiHub instance.
844 Description string `json:"description,omitempty"`
845 // Labels: Optional. Instance labels to represent user-provided metadata. Refer
846 // to cloud documentation on labels for more details.
847 // https://cloud.google.com/compute/docs/labeling-resources
848 Labels map[string]string `json:"labels,omitempty"`
849 // Name: Identifier. Format:
850 // `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
851 Name string `json:"name,omitempty"`
852 // State: Output only. The current state of the ApiHub instance.
853 //
854 // Possible values:
855 // "STATE_UNSPECIFIED" - The default value. This value is used if the state
856 // is omitted.
857 // "INACTIVE" - The ApiHub instance has not been initialized or has been
858 // deleted.
859 // "CREATING" - The ApiHub instance is being created.
860 // "ACTIVE" - The ApiHub instance has been created and is ready for use.
861 // "UPDATING" - The ApiHub instance is being updated.
862 // "DELETING" - The ApiHub instance is being deleted.
863 // "FAILED" - The ApiHub instance encountered an error during a state change.
864 State string `json:"state,omitempty"`
865 // StateMessage: Output only. Extra information about ApiHub instance state.
866 // Currently the message would be populated when state is `FAILED`.
867 StateMessage string `json:"stateMessage,omitempty"`
868 // UpdateTime: Output only. Last update timestamp.
869 UpdateTime string `json:"updateTime,omitempty"`
870
871 // ServerResponse contains the HTTP response code and headers from the server.
872 googleapi.ServerResponse `json:"-"`
873 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
874 // include in API requests. By default, fields with empty or default values are
875 // omitted from API requests. See
876 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
877 // details.
878 ForceSendFields []string `json:"-"`
879 // NullFields is a list of field names (e.g. "Config") to include in API
880 // requests with the JSON null value. By default, fields with empty values are
881 // omitted from API requests. See
882 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
883 NullFields []string `json:"-"`
884 }
885
886 func (s GoogleCloudApihubV1ApiHubInstance) MarshalJSON() ([]byte, error) {
887 type NoMethod GoogleCloudApihubV1ApiHubInstance
888 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
889 }
890
891 // GoogleCloudApihubV1ApiHubResource: ApiHubResource is one of the resources
892 // such as Api, Operation, Deployment, Definition, Spec and Version resources
893 // stored in API-Hub.
894 type GoogleCloudApihubV1ApiHubResource struct {
895 // Api: This represents Api resource in search results. Only name,
896 // display_name, description and owner fields are populated in search results.
897 Api *GoogleCloudApihubV1Api `json:"api,omitempty"`
898 // Definition: This represents Definition resource in search results. Only name
899 // field is populated in search results.
900 Definition *GoogleCloudApihubV1Definition `json:"definition,omitempty"`
901 // Deployment: This represents Deployment resource in search results. Only
902 // name, display_name, description, deployment_type and api_versions fields are
903 // populated in search results.
904 Deployment *GoogleCloudApihubV1Deployment `json:"deployment,omitempty"`
905 // Operation: This represents ApiOperation resource in search results. Only
906 // name, description, spec and details fields are populated in search results.
907 Operation *GoogleCloudApihubV1ApiOperation `json:"operation,omitempty"`
908 // Spec: This represents Spec resource in search results. Only name,
909 // display_name, description, spec_type and documentation fields are populated
910 // in search results.
911 Spec *GoogleCloudApihubV1Spec `json:"spec,omitempty"`
912 // Version: This represents Version resource in search results. Only name,
913 // display_name, description, lifecycle, compliance and accreditation fields
914 // are populated in search results.
915 Version *GoogleCloudApihubV1Version `json:"version,omitempty"`
916 // ForceSendFields is a list of field names (e.g. "Api") to unconditionally
917 // include in API requests. By default, fields with empty or default values are
918 // omitted from API requests. See
919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
920 // details.
921 ForceSendFields []string `json:"-"`
922 // NullFields is a list of field names (e.g. "Api") to include in API requests
923 // with the JSON null value. By default, fields with empty values are omitted
924 // from API requests. See
925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
926 NullFields []string `json:"-"`
927 }
928
929 func (s GoogleCloudApihubV1ApiHubResource) MarshalJSON() ([]byte, error) {
930 type NoMethod GoogleCloudApihubV1ApiHubResource
931 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
932 }
933
934 // GoogleCloudApihubV1ApiKeyConfig: Config for authentication with API key.
935 type GoogleCloudApihubV1ApiKeyConfig struct {
936 // ApiKey: Required. The name of the SecretManager secret version resource
937 // storing the API key. Format:
938 // `projects/{project}/secrets/{secrete}/versions/{version}`. The
939 // `secretmanager.versions.access` permission should be granted to the service
940 // account accessing the secret.
941 ApiKey *GoogleCloudApihubV1Secret `json:"apiKey,omitempty"`
942 // HttpElementLocation: Required. The location of the API key. The default
943 // value is QUERY.
944 //
945 // Possible values:
946 // "HTTP_ELEMENT_LOCATION_UNSPECIFIED" - HTTP element location not specified.
947 // "QUERY" - Element is in the HTTP request query.
948 // "HEADER" - Element is in the HTTP request header.
949 // "PATH" - Element is in the HTTP request path.
950 // "BODY" - Element is in the HTTP request body.
951 // "COOKIE" - Element is in the HTTP request cookie.
952 HttpElementLocation string `json:"httpElementLocation,omitempty"`
953 // Name: Required. The parameter name of the API key. E.g. If the API request
954 // is "https://example.com/act?api_key=", "api_key" would be the parameter
955 // name.
956 Name string `json:"name,omitempty"`
957 // ForceSendFields is a list of field names (e.g. "ApiKey") to unconditionally
958 // include in API requests. By default, fields with empty or default values are
959 // omitted from API requests. See
960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
961 // details.
962 ForceSendFields []string `json:"-"`
963 // NullFields is a list of field names (e.g. "ApiKey") to include in API
964 // requests with the JSON null value. By default, fields with empty values are
965 // omitted from API requests. See
966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
967 NullFields []string `json:"-"`
968 }
969
970 func (s GoogleCloudApihubV1ApiKeyConfig) MarshalJSON() ([]byte, error) {
971 type NoMethod GoogleCloudApihubV1ApiKeyConfig
972 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
973 }
974
975 // GoogleCloudApihubV1ApiMetadataList: The message to hold repeated API
976 // metadata.
977 type GoogleCloudApihubV1ApiMetadataList struct {
978 // ApiMetadata: Required. The list of API metadata.
979 ApiMetadata []*GoogleCloudApihubV1APIMetadata `json:"apiMetadata,omitempty"`
980 // ForceSendFields is a list of field names (e.g. "ApiMetadata") to
981 // unconditionally include in API requests. By default, fields with empty or
982 // default values are omitted from API requests. See
983 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
984 // details.
985 ForceSendFields []string `json:"-"`
986 // NullFields is a list of field names (e.g. "ApiMetadata") to include in API
987 // requests with the JSON null value. By default, fields with empty values are
988 // omitted from API requests. See
989 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
990 NullFields []string `json:"-"`
991 }
992
993 func (s GoogleCloudApihubV1ApiMetadataList) MarshalJSON() ([]byte, error) {
994 type NoMethod GoogleCloudApihubV1ApiMetadataList
995 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
996 }
997
998 // GoogleCloudApihubV1ApiOperation: Represents an operation contained in an API
999 // version in the API Hub. An operation is added/updated/deleted in an API
1000 // version when a new spec is added or an existing spec is updated/deleted in a
1001 // version. Currently, an operation will be created only corresponding to
1002 // OpenAPI spec as parsing is supported for OpenAPI spec. Alternatively
1003 // operations can be managed via create,update and delete APIs, creation of
1004 // apiOperation can be possible only for version with no parsed operations and
1005 // update/delete can be possible only for operations created via create API.
1006 type GoogleCloudApihubV1ApiOperation struct {
1007 // Attributes: Optional. The list of user defined attributes associated with
1008 // the API operation resource. The key is the attribute name. It will be of the
1009 // format: `projects/{project}/locations/{location}/attributes/{attribute}`.
1010 // The value is the attribute values associated with the resource.
1011 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
1012 // CreateTime: Output only. The time at which the operation was created.
1013 CreateTime string `json:"createTime,omitempty"`
1014 // Details: Optional. Operation details. Note: Even though this field is
1015 // optional, it is required for CreateApiOperation API and we will fail the
1016 // request if not provided.
1017 Details *GoogleCloudApihubV1OperationDetails `json:"details,omitempty"`
1018 // Name: Identifier. The name of the operation. Format:
1019 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operat
1020 // ions/{operation}`
1021 Name string `json:"name,omitempty"`
1022 // SourceMetadata: Output only. The list of sources and metadata from the
1023 // sources of the API operation.
1024 SourceMetadata []*GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
1025 // Spec: Output only. The name of the spec will be of the format:
1026 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/
1027 // {spec}` Note:The name of the spec will be empty if the operation is created
1028 // via CreateApiOperation API.
1029 Spec string `json:"spec,omitempty"`
1030 // UpdateTime: Output only. The time at which the operation was last updated.
1031 UpdateTime string `json:"updateTime,omitempty"`
1032
1033 // ServerResponse contains the HTTP response code and headers from the server.
1034 googleapi.ServerResponse `json:"-"`
1035 // ForceSendFields is a list of field names (e.g. "Attributes") to
1036 // unconditionally include in API requests. By default, fields with empty or
1037 // default values are omitted from API requests. See
1038 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1039 // details.
1040 ForceSendFields []string `json:"-"`
1041 // NullFields is a list of field names (e.g. "Attributes") to include in API
1042 // requests with the JSON null value. By default, fields with empty values are
1043 // omitted from API requests. See
1044 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1045 NullFields []string `json:"-"`
1046 }
1047
1048 func (s GoogleCloudApihubV1ApiOperation) MarshalJSON() ([]byte, error) {
1049 type NoMethod GoogleCloudApihubV1ApiOperation
1050 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1051 }
1052
1053 // GoogleCloudApihubV1ApiView: The view of an API.
1054 type GoogleCloudApihubV1ApiView struct {
1055 // McpServerView: MCP server view.
1056 McpServerView *GoogleCloudApihubV1FlattenedApiVersionDeploymentView `json:"mcpServerView,omitempty"`
1057 // McpToolView: MCP tools view.
1058 McpToolView *GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView `json:"mcpToolView,omitempty"`
1059 // ForceSendFields is a list of field names (e.g. "McpServerView") to
1060 // unconditionally include in API requests. By default, fields with empty or
1061 // default values are omitted from API requests. See
1062 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1063 // details.
1064 ForceSendFields []string `json:"-"`
1065 // NullFields is a list of field names (e.g. "McpServerView") to include in API
1066 // requests with the JSON null value. By default, fields with empty values are
1067 // omitted from API requests. See
1068 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1069 NullFields []string `json:"-"`
1070 }
1071
1072 func (s GoogleCloudApihubV1ApiView) MarshalJSON() ([]byte, error) {
1073 type NoMethod GoogleCloudApihubV1ApiView
1074 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1075 }
1076
1077 // GoogleCloudApihubV1ApigeeEdgeConfig: Configuration for Apigee Edge gateways.
1078 // Applicability of a filter is determined by the filter being provided. If
1079 // none of the filters are provided the addon will be enabled for all data
1080 // brought in by the gateway plugin instance.
1081 type GoogleCloudApihubV1ApigeeEdgeConfig struct {
1082 // EnvironmentFilter: Optional. The filter to apply on the resources managed by
1083 // the gateway plugin instance. If provided this filter applies environment
1084 // specific filtering.
1085 EnvironmentFilter *GoogleCloudApihubV1EnvironmentFilter `json:"environmentFilter,omitempty"`
1086 // ForceSendFields is a list of field names (e.g. "EnvironmentFilter") to
1087 // unconditionally include in API requests. By default, fields with empty or
1088 // default values are omitted from API requests. See
1089 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1090 // details.
1091 ForceSendFields []string `json:"-"`
1092 // NullFields is a list of field names (e.g. "EnvironmentFilter") to include in
1093 // API requests with the JSON null value. By default, fields with empty values
1094 // are omitted from API requests. See
1095 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1096 NullFields []string `json:"-"`
1097 }
1098
1099 func (s GoogleCloudApihubV1ApigeeEdgeConfig) MarshalJSON() ([]byte, error) {
1100 type NoMethod GoogleCloudApihubV1ApigeeEdgeConfig
1101 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1102 }
1103
1104 // GoogleCloudApihubV1ApigeeOPDKConfig: Configuration for Apigee OPDK gateways.
1105 // Applicability of a filter is determined by the filter being provided. If
1106 // none of the filters are provided the addon will be enabled for all data
1107 // brought in by the gateway plugin instance.
1108 type GoogleCloudApihubV1ApigeeOPDKConfig struct {
1109 // EnvironmentFilter: Optional. The filter to apply on the resources managed by
1110 // the gateway plugin instance. If provided this filter applies environment
1111 // specific filtering.
1112 EnvironmentFilter *GoogleCloudApihubV1EnvironmentFilter `json:"environmentFilter,omitempty"`
1113 // ForceSendFields is a list of field names (e.g. "EnvironmentFilter") to
1114 // unconditionally include in API requests. By default, fields with empty or
1115 // default values are omitted from API requests. See
1116 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1117 // details.
1118 ForceSendFields []string `json:"-"`
1119 // NullFields is a list of field names (e.g. "EnvironmentFilter") to include in
1120 // API requests with the JSON null value. By default, fields with empty values
1121 // are omitted from API requests. See
1122 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1123 NullFields []string `json:"-"`
1124 }
1125
1126 func (s GoogleCloudApihubV1ApigeeOPDKConfig) MarshalJSON() ([]byte, error) {
1127 type NoMethod GoogleCloudApihubV1ApigeeOPDKConfig
1128 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1129 }
1130
1131 // GoogleCloudApihubV1ApigeeXHybridConfig: Configuration for Apigee X and
1132 // Apigee Hybrid gateways. Applicability of a filter is determined by the
1133 // filter being provided. If none of the filters are provided the addon will be
1134 // enabled for all data brought in by the gateway plugin instance.
1135 type GoogleCloudApihubV1ApigeeXHybridConfig struct {
1136 // EnvironmentFilter: Optional. The filter to apply on the resources managed by
1137 // the gateway plugin instance. If provided this filter applies environment
1138 // specific filtering.
1139 EnvironmentFilter *GoogleCloudApihubV1EnvironmentFilter `json:"environmentFilter,omitempty"`
1140 // ForceSendFields is a list of field names (e.g. "EnvironmentFilter") to
1141 // unconditionally include in API requests. By default, fields with empty or
1142 // default values are omitted from API requests. See
1143 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1144 // details.
1145 ForceSendFields []string `json:"-"`
1146 // NullFields is a list of field names (e.g. "EnvironmentFilter") to include in
1147 // API requests with the JSON null value. By default, fields with empty values
1148 // are omitted from API requests. See
1149 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1150 NullFields []string `json:"-"`
1151 }
1152
1153 func (s GoogleCloudApihubV1ApigeeXHybridConfig) MarshalJSON() ([]byte, error) {
1154 type NoMethod GoogleCloudApihubV1ApigeeXHybridConfig
1155 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1156 }
1157
1158 // GoogleCloudApihubV1ApplicationIntegrationEndpointDetails: The details of the
1159 // Application Integration endpoint to be triggered for curation.
1160 type GoogleCloudApihubV1ApplicationIntegrationEndpointDetails struct {
1161 // TriggerId: Required. The API trigger ID of the Application Integration
1162 // workflow.
1163 TriggerId string `json:"triggerId,omitempty"`
1164 // Uri: Required. The endpoint URI should be a valid REST URI for triggering an
1165 // Application Integration. Format:
1166 // `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrat
1167 // ions/*}:execute` or
1168 // `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations
1169 // /*/integrations/*}:execute`
1170 Uri string `json:"uri,omitempty"`
1171 // ForceSendFields is a list of field names (e.g. "TriggerId") to
1172 // unconditionally include in API requests. By default, fields with empty or
1173 // default values are omitted from API requests. See
1174 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1175 // details.
1176 ForceSendFields []string `json:"-"`
1177 // NullFields is a list of field names (e.g. "TriggerId") to include in API
1178 // requests with the JSON null value. By default, fields with empty values are
1179 // omitted from API requests. See
1180 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1181 NullFields []string `json:"-"`
1182 }
1183
1184 func (s GoogleCloudApihubV1ApplicationIntegrationEndpointDetails) MarshalJSON() ([]byte, error) {
1185 type NoMethod GoogleCloudApihubV1ApplicationIntegrationEndpointDetails
1186 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1187 }
1188
1189 // GoogleCloudApihubV1Attribute: An attribute in the API Hub. An attribute is a
1190 // name value pair which can be attached to different resources in the API hub
1191 // based on the scope of the attribute. Attributes can either be pre-defined by
1192 // the API Hub or created by users.
1193 type GoogleCloudApihubV1Attribute struct {
1194 // AllowedValues: Optional. The list of allowed values when the attribute value
1195 // is of type enum. This is required when the data_type of the attribute is
1196 // ENUM. The maximum number of allowed values of an attribute will be 1000.
1197 AllowedValues []*GoogleCloudApihubV1AllowedValue `json:"allowedValues,omitempty"`
1198 // Cardinality: Optional. The maximum number of values that the attribute can
1199 // have when associated with an API Hub resource. Cardinality 1 would represent
1200 // a single-valued attribute. It must not be less than 1 or greater than 20. If
1201 // not specified, the cardinality would be set to 1 by default and represent a
1202 // single-valued attribute.
1203 Cardinality int64 `json:"cardinality,omitempty"`
1204 // CreateTime: Output only. The time at which the attribute was created.
1205 CreateTime string `json:"createTime,omitempty"`
1206 // DataType: Required. The type of the data of the attribute.
1207 //
1208 // Possible values:
1209 // "DATA_TYPE_UNSPECIFIED" - Attribute data type unspecified.
1210 // "ENUM" - Attribute's value is of type enum.
1211 // "JSON" - Attribute's value is of type json.
1212 // "STRING" - Attribute's value is of type string.
1213 // "URI" - Attribute's value is of type uri.
1214 DataType string `json:"dataType,omitempty"`
1215 // DefinitionType: Output only. The definition type of the attribute.
1216 //
1217 // Possible values:
1218 // "DEFINITION_TYPE_UNSPECIFIED" - Attribute definition type unspecified.
1219 // "SYSTEM_DEFINED" - The attribute is predefined by the API Hub. Note that
1220 // only the list of allowed values can be updated in this case via
1221 // UpdateAttribute method.
1222 // "USER_DEFINED" - The attribute is defined by the user.
1223 DefinitionType string `json:"definitionType,omitempty"`
1224 // Description: Optional. The description of the attribute.
1225 Description string `json:"description,omitempty"`
1226 // DisplayName: Required. The display name of the attribute.
1227 DisplayName string `json:"displayName,omitempty"`
1228 // Mandatory: Output only. When mandatory is true, the attribute is mandatory
1229 // for the resource specified in the scope. Only System defined attributes can
1230 // be mandatory.
1231 Mandatory bool `json:"mandatory,omitempty"`
1232 // Name: Identifier. The name of the attribute in the API Hub. Format:
1233 // `projects/{project}/locations/{location}/attributes/{attribute}`
1234 Name string `json:"name,omitempty"`
1235 // Scope: Required. The scope of the attribute. It represents the resource in
1236 // the API Hub to which the attribute can be linked.
1237 //
1238 // Possible values:
1239 // "SCOPE_UNSPECIFIED" - Scope Unspecified.
1240 // "API" - Attribute can be linked to an API.
1241 // "VERSION" - Attribute can be linked to an API version.
1242 // "SPEC" - Attribute can be linked to a Spec.
1243 // "API_OPERATION" - Attribute can be linked to an API Operation.
1244 // "DEPLOYMENT" - Attribute can be linked to a Deployment.
1245 // "DEPENDENCY" - Attribute can be linked to a Dependency.
1246 // "DEFINITION" - Attribute can be linked to a definition.
1247 // "EXTERNAL_API" - Attribute can be linked to a ExternalAPI.
1248 // "PLUGIN" - Attribute can be linked to a Plugin.
1249 Scope string `json:"scope,omitempty"`
1250 // UpdateTime: Output only. The time at which the attribute was last updated.
1251 UpdateTime string `json:"updateTime,omitempty"`
1252
1253 // ServerResponse contains the HTTP response code and headers from the server.
1254 googleapi.ServerResponse `json:"-"`
1255 // ForceSendFields is a list of field names (e.g. "AllowedValues") to
1256 // unconditionally include in API requests. By default, fields with empty or
1257 // default values are omitted from API requests. See
1258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1259 // details.
1260 ForceSendFields []string `json:"-"`
1261 // NullFields is a list of field names (e.g. "AllowedValues") to include in API
1262 // requests with the JSON null value. By default, fields with empty values are
1263 // omitted from API requests. See
1264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1265 NullFields []string `json:"-"`
1266 }
1267
1268 func (s GoogleCloudApihubV1Attribute) MarshalJSON() ([]byte, error) {
1269 type NoMethod GoogleCloudApihubV1Attribute
1270 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1271 }
1272
1273 // GoogleCloudApihubV1AttributeValues: The attribute values associated with
1274 // resource.
1275 type GoogleCloudApihubV1AttributeValues struct {
1276 // Attribute: Output only. The name of the attribute. Format:
1277 // projects/{project}/locations/{location}/attributes/{attribute}
1278 Attribute string `json:"attribute,omitempty"`
1279 // EnumValues: The attribute values associated with a resource in case
1280 // attribute data type is enum.
1281 EnumValues *GoogleCloudApihubV1EnumAttributeValues `json:"enumValues,omitempty"`
1282 // JsonValues: The attribute values associated with a resource in case
1283 // attribute data type is JSON.
1284 JsonValues *GoogleCloudApihubV1StringAttributeValues `json:"jsonValues,omitempty"`
1285 // StringValues: The attribute values associated with a resource in case
1286 // attribute data type is string.
1287 StringValues *GoogleCloudApihubV1StringAttributeValues `json:"stringValues,omitempty"`
1288 // UriValues: The attribute values associated with a resource in case attribute
1289 // data type is URL, URI or IP, like gs://bucket-name/object-name.
1290 UriValues *GoogleCloudApihubV1StringAttributeValues `json:"uriValues,omitempty"`
1291 // ForceSendFields is a list of field names (e.g. "Attribute") to
1292 // unconditionally include in API requests. By default, fields with empty or
1293 // default values are omitted from API requests. See
1294 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1295 // details.
1296 ForceSendFields []string `json:"-"`
1297 // NullFields is a list of field names (e.g. "Attribute") to include in API
1298 // requests with the JSON null value. By default, fields with empty values are
1299 // omitted from API requests. See
1300 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1301 NullFields []string `json:"-"`
1302 }
1303
1304 func (s GoogleCloudApihubV1AttributeValues) MarshalJSON() ([]byte, error) {
1305 type NoMethod GoogleCloudApihubV1AttributeValues
1306 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1307 }
1308
1309 // GoogleCloudApihubV1AuthConfig: AuthConfig represents the authentication
1310 // information.
1311 type GoogleCloudApihubV1AuthConfig struct {
1312 // ApiKeyConfig: Api Key Config.
1313 ApiKeyConfig *GoogleCloudApihubV1ApiKeyConfig `json:"apiKeyConfig,omitempty"`
1314 // AuthType: Required. The authentication type.
1315 //
1316 // Possible values:
1317 // "AUTH_TYPE_UNSPECIFIED" - Authentication type not specified.
1318 // "NO_AUTH" - No authentication.
1319 // "GOOGLE_SERVICE_ACCOUNT" - Google service account authentication.
1320 // "USER_PASSWORD" - Username and password authentication.
1321 // "API_KEY" - API Key authentication.
1322 // "OAUTH2_CLIENT_CREDENTIALS" - Oauth 2.0 client credentials grant
1323 // authentication.
1324 AuthType string `json:"authType,omitempty"`
1325 // GoogleServiceAccountConfig: Google Service Account.
1326 GoogleServiceAccountConfig *GoogleCloudApihubV1GoogleServiceAccountConfig `json:"googleServiceAccountConfig,omitempty"`
1327 // Oauth2ClientCredentialsConfig: Oauth2.0 Client Credentials.
1328 Oauth2ClientCredentialsConfig *GoogleCloudApihubV1Oauth2ClientCredentialsConfig `json:"oauth2ClientCredentialsConfig,omitempty"`
1329 // UserPasswordConfig: User Password.
1330 UserPasswordConfig *GoogleCloudApihubV1UserPasswordConfig `json:"userPasswordConfig,omitempty"`
1331 // ForceSendFields is a list of field names (e.g. "ApiKeyConfig") to
1332 // unconditionally include in API requests. By default, fields with empty or
1333 // default values are omitted from API requests. See
1334 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1335 // details.
1336 ForceSendFields []string `json:"-"`
1337 // NullFields is a list of field names (e.g. "ApiKeyConfig") to include in API
1338 // requests with the JSON null value. By default, fields with empty values are
1339 // omitted from API requests. See
1340 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1341 NullFields []string `json:"-"`
1342 }
1343
1344 func (s GoogleCloudApihubV1AuthConfig) MarshalJSON() ([]byte, error) {
1345 type NoMethod GoogleCloudApihubV1AuthConfig
1346 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1347 }
1348
1349 // GoogleCloudApihubV1AuthConfigTemplate: AuthConfigTemplate represents the
1350 // authentication template for a plugin.
1351 type GoogleCloudApihubV1AuthConfigTemplate struct {
1352 // ServiceAccount: Optional. The service account of the plugin hosting service.
1353 // This service account should be granted the required permissions on the Auth
1354 // Config parameters provided while creating the plugin instances corresponding
1355 // to this plugin. For example, if the plugin instance auth config requires a
1356 // secret manager secret, the service account should be granted the
1357 // secretmanager.versions.access permission on the corresponding secret, if the
1358 // plugin instance auth config contains a service account, the service account
1359 // should be granted the iam.serviceAccounts.getAccessToken permission on the
1360 // corresponding service account.
1361 ServiceAccount *GoogleCloudApihubV1GoogleServiceAccountConfig `json:"serviceAccount,omitempty"`
1362 // SupportedAuthTypes: Required. The list of authentication types supported by
1363 // the plugin.
1364 //
1365 // Possible values:
1366 // "AUTH_TYPE_UNSPECIFIED" - Authentication type not specified.
1367 // "NO_AUTH" - No authentication.
1368 // "GOOGLE_SERVICE_ACCOUNT" - Google service account authentication.
1369 // "USER_PASSWORD" - Username and password authentication.
1370 // "API_KEY" - API Key authentication.
1371 // "OAUTH2_CLIENT_CREDENTIALS" - Oauth 2.0 client credentials grant
1372 // authentication.
1373 SupportedAuthTypes []string `json:"supportedAuthTypes,omitempty"`
1374 // ForceSendFields is a list of field names (e.g. "ServiceAccount") to
1375 // unconditionally include in API requests. By default, fields with empty or
1376 // default values are omitted from API requests. See
1377 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1378 // details.
1379 ForceSendFields []string `json:"-"`
1380 // NullFields is a list of field names (e.g. "ServiceAccount") to include in
1381 // API requests with the JSON null value. By default, fields with empty values
1382 // are omitted from API requests. See
1383 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1384 NullFields []string `json:"-"`
1385 }
1386
1387 func (s GoogleCloudApihubV1AuthConfigTemplate) MarshalJSON() ([]byte, error) {
1388 type NoMethod GoogleCloudApihubV1AuthConfigTemplate
1389 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1390 }
1391
1392 // GoogleCloudApihubV1CollectApiDataRequest: The CollectApiData method's
1393 // request.
1394 type GoogleCloudApihubV1CollectApiDataRequest struct {
1395 // ActionId: Required. The action ID to be used for collecting the API data.
1396 // This should map to one of the action IDs specified in action configs in the
1397 // plugin.
1398 ActionId string `json:"actionId,omitempty"`
1399 // ApiData: Required. The API data to be collected.
1400 ApiData *GoogleCloudApihubV1ApiData `json:"apiData,omitempty"`
1401 // CollectionType: Required. The type of collection. Applies to all entries in
1402 // api_data.
1403 //
1404 // Possible values:
1405 // "COLLECTION_TYPE_UNSPECIFIED" - The default value. This value is used if
1406 // the collection type is omitted.
1407 // "COLLECTION_TYPE_UPSERT" - The collection type is upsert. This should be
1408 // used when an API is created or updated at the source.
1409 // "COLLECTION_TYPE_DELETE" - The collection type is delete. This should be
1410 // used when an API is deleted at the source.
1411 CollectionType string `json:"collectionType,omitempty"`
1412 // PluginInstance: Required. The plugin instance collecting the API data.
1413 // Format:
1414 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance
1415 // }`.
1416 PluginInstance string `json:"pluginInstance,omitempty"`
1417 // ForceSendFields is a list of field names (e.g. "ActionId") to
1418 // unconditionally include in API requests. By default, fields with empty or
1419 // default values are omitted from API requests. See
1420 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1421 // details.
1422 ForceSendFields []string `json:"-"`
1423 // NullFields is a list of field names (e.g. "ActionId") to include in API
1424 // requests with the JSON null value. By default, fields with empty values are
1425 // omitted from API requests. See
1426 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1427 NullFields []string `json:"-"`
1428 }
1429
1430 func (s GoogleCloudApihubV1CollectApiDataRequest) MarshalJSON() ([]byte, error) {
1431 type NoMethod GoogleCloudApihubV1CollectApiDataRequest
1432 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1433 }
1434
1435 // GoogleCloudApihubV1Config: Available configurations to provision an ApiHub
1436 // Instance.
1437 type GoogleCloudApihubV1Config struct {
1438 // AgentRegistrySyncConfig: Optional. The configuration for syncing MCP data in
1439 // the API Hub instance to the Agent Registry.
1440 AgentRegistrySyncConfig *GoogleCloudApihubV1AgentRegistrySyncConfig `json:"agentRegistrySyncConfig,omitempty"`
1441 // CmekKeyName: Optional. The Customer Managed Encryption Key (CMEK) used for
1442 // data encryption. The CMEK name should follow the format of
1443 // `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
1444 // where the location must match the instance location. If the CMEK is not
1445 // provided, a GMEK will be created for the instance.
1446 CmekKeyName string `json:"cmekKeyName,omitempty"`
1447 // DisableSearch: Optional. If true, the search will be disabled for the
1448 // instance. The default value is false.
1449 DisableSearch bool `json:"disableSearch,omitempty"`
1450 // EncryptionType: Optional. Encryption type for the region. If the encryption
1451 // type is CMEK, the cmek_key_name must be provided. If no encryption type is
1452 // provided, GMEK will be used.
1453 //
1454 // Possible values:
1455 // "ENCRYPTION_TYPE_UNSPECIFIED" - Encryption type unspecified.
1456 // "GMEK" - Default encryption using Google managed encryption key.
1457 // "CMEK" - Encryption using customer managed encryption key.
1458 EncryptionType string `json:"encryptionType,omitempty"`
1459 // VertexLocation: Optional. The name of the Vertex AI location where the data
1460 // store is stored.
1461 VertexLocation string `json:"vertexLocation,omitempty"`
1462 // ForceSendFields is a list of field names (e.g. "AgentRegistrySyncConfig") to
1463 // unconditionally include in API requests. By default, fields with empty or
1464 // default values are omitted from API requests. See
1465 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1466 // details.
1467 ForceSendFields []string `json:"-"`
1468 // NullFields is a list of field names (e.g. "AgentRegistrySyncConfig") to
1469 // include in API requests with the JSON null value. By default, fields with
1470 // empty values are omitted from API requests. See
1471 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1472 NullFields []string `json:"-"`
1473 }
1474
1475 func (s GoogleCloudApihubV1Config) MarshalJSON() ([]byte, error) {
1476 type NoMethod GoogleCloudApihubV1Config
1477 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1478 }
1479
1480 // GoogleCloudApihubV1ConfigTemplate: ConfigTemplate represents the
1481 // configuration template for a plugin.
1482 type GoogleCloudApihubV1ConfigTemplate struct {
1483 // AdditionalConfigTemplate: Optional. The list of additional configuration
1484 // variables for the plugin's configuration.
1485 AdditionalConfigTemplate []*GoogleCloudApihubV1ConfigVariableTemplate `json:"additionalConfigTemplate,omitempty"`
1486 // AuthConfigTemplate: Optional. The authentication template for the plugin.
1487 AuthConfigTemplate *GoogleCloudApihubV1AuthConfigTemplate `json:"authConfigTemplate,omitempty"`
1488 // ForceSendFields is a list of field names (e.g. "AdditionalConfigTemplate")
1489 // to unconditionally include in API requests. By default, fields with empty or
1490 // default values are omitted from API requests. See
1491 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1492 // details.
1493 ForceSendFields []string `json:"-"`
1494 // NullFields is a list of field names (e.g. "AdditionalConfigTemplate") to
1495 // include in API requests with the JSON null value. By default, fields with
1496 // empty values are omitted from API requests. See
1497 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1498 NullFields []string `json:"-"`
1499 }
1500
1501 func (s GoogleCloudApihubV1ConfigTemplate) MarshalJSON() ([]byte, error) {
1502 type NoMethod GoogleCloudApihubV1ConfigTemplate
1503 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1504 }
1505
1506 // GoogleCloudApihubV1ConfigValueOption: ConfigValueOption represents an option
1507 // for a config variable of type enum or multi select.
1508 type GoogleCloudApihubV1ConfigValueOption struct {
1509 // Description: Optional. Description of the option.
1510 Description string `json:"description,omitempty"`
1511 // DisplayName: Required. Display name of the option.
1512 DisplayName string `json:"displayName,omitempty"`
1513 // Id: Required. Id of the option.
1514 Id string `json:"id,omitempty"`
1515 // ForceSendFields is a list of field names (e.g. "Description") to
1516 // unconditionally include in API requests. By default, fields with empty or
1517 // default values are omitted from API requests. See
1518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1519 // details.
1520 ForceSendFields []string `json:"-"`
1521 // NullFields is a list of field names (e.g. "Description") to include in API
1522 // requests with the JSON null value. By default, fields with empty values are
1523 // omitted from API requests. See
1524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1525 NullFields []string `json:"-"`
1526 }
1527
1528 func (s GoogleCloudApihubV1ConfigValueOption) MarshalJSON() ([]byte, error) {
1529 type NoMethod GoogleCloudApihubV1ConfigValueOption
1530 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1531 }
1532
1533 // GoogleCloudApihubV1ConfigVariable: ConfigVariable represents a additional
1534 // configuration variable present in a PluginInstance Config or AuthConfig,
1535 // based on a ConfigVariableTemplate.
1536 type GoogleCloudApihubV1ConfigVariable struct {
1537 // BoolValue: Optional. The config variable value in case of config variable of
1538 // type boolean.
1539 BoolValue bool `json:"boolValue,omitempty"`
1540 // EnumValue: Optional. The config variable value in case of config variable of
1541 // type enum.
1542 EnumValue *GoogleCloudApihubV1ConfigValueOption `json:"enumValue,omitempty"`
1543 // IntValue: Optional. The config variable value in case of config variable of
1544 // type integer.
1545 IntValue int64 `json:"intValue,omitempty,string"`
1546 // Key: Output only. Key will be the id to uniquely identify the config
1547 // variable.
1548 Key string `json:"key,omitempty"`
1549 // MultiIntValues: Optional. The config variable value in case of config
1550 // variable of type multi integer.
1551 MultiIntValues *GoogleCloudApihubV1MultiIntValues `json:"multiIntValues,omitempty"`
1552 // MultiSelectValues: Optional. The config variable value in case of config
1553 // variable of type multi select.
1554 MultiSelectValues *GoogleCloudApihubV1MultiSelectValues `json:"multiSelectValues,omitempty"`
1555 // MultiStringValues: Optional. The config variable value in case of config
1556 // variable of type multi string.
1557 MultiStringValues *GoogleCloudApihubV1MultiStringValues `json:"multiStringValues,omitempty"`
1558 // SecretValue: Optional. The config variable value in case of config variable
1559 // of type secret.
1560 SecretValue *GoogleCloudApihubV1Secret `json:"secretValue,omitempty"`
1561 // StringValue: Optional. The config variable value in case of config variable
1562 // of type string.
1563 StringValue string `json:"stringValue,omitempty"`
1564 // ForceSendFields is a list of field names (e.g. "BoolValue") to
1565 // unconditionally include in API requests. By default, fields with empty or
1566 // default values are omitted from API requests. See
1567 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1568 // details.
1569 ForceSendFields []string `json:"-"`
1570 // NullFields is a list of field names (e.g. "BoolValue") to include in API
1571 // requests with the JSON null value. By default, fields with empty values are
1572 // omitted from API requests. See
1573 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1574 NullFields []string `json:"-"`
1575 }
1576
1577 func (s GoogleCloudApihubV1ConfigVariable) MarshalJSON() ([]byte, error) {
1578 type NoMethod GoogleCloudApihubV1ConfigVariable
1579 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1580 }
1581
1582 // GoogleCloudApihubV1ConfigVariableTemplate: ConfigVariableTemplate represents
1583 // a configuration variable template present in a Plugin Config.
1584 type GoogleCloudApihubV1ConfigVariableTemplate struct {
1585 // Description: Optional. Description.
1586 Description string `json:"description,omitempty"`
1587 // EnumOptions: Optional. Enum options. To be populated if `ValueType` is
1588 // `ENUM`.
1589 EnumOptions []*GoogleCloudApihubV1ConfigValueOption `json:"enumOptions,omitempty"`
1590 // Id: Required. ID of the config variable. Must be unique within the
1591 // configuration.
1592 Id string `json:"id,omitempty"`
1593 // MultiSelectOptions: Optional. Multi select options. To be populated if
1594 // `ValueType` is `MULTI_SELECT`.
1595 MultiSelectOptions []*GoogleCloudApihubV1ConfigValueOption `json:"multiSelectOptions,omitempty"`
1596 // Required: Optional. Flag represents that this `ConfigVariable` must be
1597 // provided for a PluginInstance.
1598 Required bool `json:"required,omitempty"`
1599 // ValidationRegex: Optional. Regular expression in RE2 syntax used for
1600 // validating the `value` of a `ConfigVariable`.
1601 ValidationRegex string `json:"validationRegex,omitempty"`
1602 // ValueType: Required. Type of the parameter: string, int, bool etc.
1603 //
1604 // Possible values:
1605 // "VALUE_TYPE_UNSPECIFIED" - Value type is not specified.
1606 // "STRING" - Value type is string.
1607 // "INT" - Value type is integer.
1608 // "BOOL" - Value type is boolean.
1609 // "SECRET" - Value type is secret.
1610 // "ENUM" - Value type is enum.
1611 // "MULTI_SELECT" - Value type is multi select.
1612 // "MULTI_STRING" - Value type is multi string.
1613 // "MULTI_INT" - Value type is multi int.
1614 ValueType string `json:"valueType,omitempty"`
1615 // ForceSendFields is a list of field names (e.g. "Description") to
1616 // unconditionally include in API requests. By default, fields with empty or
1617 // default values are omitted from API requests. See
1618 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1619 // details.
1620 ForceSendFields []string `json:"-"`
1621 // NullFields is a list of field names (e.g. "Description") to include in API
1622 // requests with the JSON null value. By default, fields with empty values are
1623 // omitted from API requests. See
1624 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1625 NullFields []string `json:"-"`
1626 }
1627
1628 func (s GoogleCloudApihubV1ConfigVariableTemplate) MarshalJSON() ([]byte, error) {
1629 type NoMethod GoogleCloudApihubV1ConfigVariableTemplate
1630 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1631 }
1632
1633 // GoogleCloudApihubV1Curation: A curation resource in the API Hub.
1634 type GoogleCloudApihubV1Curation struct {
1635 // CreateTime: Output only. The time at which the curation was created.
1636 CreateTime string `json:"createTime,omitempty"`
1637 // Description: Optional. The description of the curation.
1638 Description string `json:"description,omitempty"`
1639 // DisplayName: Required. The display name of the curation.
1640 DisplayName string `json:"displayName,omitempty"`
1641 // Endpoint: Required. The endpoint to be triggered for curation.
1642 Endpoint *GoogleCloudApihubV1Endpoint `json:"endpoint,omitempty"`
1643 // LastExecutionErrorCode: Output only. The error code of the last execution of
1644 // the curation. The error code is populated only when the last execution state
1645 // is failed.
1646 //
1647 // Possible values:
1648 // "ERROR_CODE_UNSPECIFIED" - Default unspecified error code.
1649 // "INTERNAL_ERROR" - The execution failed due to an internal error.
1650 // "UNAUTHORIZED" - The curation is not authorized to trigger the endpoint
1651 // uri.
1652 LastExecutionErrorCode string `json:"lastExecutionErrorCode,omitempty"`
1653 // LastExecutionErrorMessage: Output only. Error message describing the
1654 // failure, if any, during the last execution of the curation.
1655 LastExecutionErrorMessage string `json:"lastExecutionErrorMessage,omitempty"`
1656 // LastExecutionState: Output only. The last execution state of the curation.
1657 //
1658 // Possible values:
1659 // "LAST_EXECUTION_STATE_UNSPECIFIED" - Default unspecified state.
1660 // "SUCCEEDED" - The last curation execution was successful.
1661 // "FAILED" - The last curation execution failed.
1662 LastExecutionState string `json:"lastExecutionState,omitempty"`
1663 // Name: Identifier. The name of the curation. Format:
1664 // `projects/{project}/locations/{location}/curations/{curation}`
1665 Name string `json:"name,omitempty"`
1666 // PluginInstanceActions: Output only. The plugin instances and associated
1667 // actions that are using the curation. Note: A particular curation could be
1668 // used by multiple plugin instances or multiple actions in a plugin instance.
1669 PluginInstanceActions []*GoogleCloudApihubV1PluginInstanceActionID `json:"pluginInstanceActions,omitempty"`
1670 // UpdateTime: Output only. The time at which the curation was last updated.
1671 UpdateTime string `json:"updateTime,omitempty"`
1672
1673 // ServerResponse contains the HTTP response code and headers from the server.
1674 googleapi.ServerResponse `json:"-"`
1675 // ForceSendFields is a list of field names (e.g. "CreateTime") to
1676 // unconditionally include in API requests. By default, fields with empty or
1677 // default values are omitted from API requests. See
1678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1679 // details.
1680 ForceSendFields []string `json:"-"`
1681 // NullFields is a list of field names (e.g. "CreateTime") to include in API
1682 // requests with the JSON null value. By default, fields with empty values are
1683 // omitted from API requests. See
1684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1685 NullFields []string `json:"-"`
1686 }
1687
1688 func (s GoogleCloudApihubV1Curation) MarshalJSON() ([]byte, error) {
1689 type NoMethod GoogleCloudApihubV1Curation
1690 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1691 }
1692
1693 // GoogleCloudApihubV1CurationConfig: The curation information for this plugin
1694 // instance.
1695 type GoogleCloudApihubV1CurationConfig struct {
1696 // CurationType: Required. The curation type for this plugin instance.
1697 //
1698 // Possible values:
1699 // "CURATION_TYPE_UNSPECIFIED" - Default unspecified curation type.
1700 // "DEFAULT_CURATION_FOR_API_METADATA" - Default curation for API metadata
1701 // will be used.
1702 // "CUSTOM_CURATION_FOR_API_METADATA" - Custom curation for API metadata will
1703 // be used.
1704 CurationType string `json:"curationType,omitempty"`
1705 // CustomCuration: Optional. Custom curation information for this plugin
1706 // instance.
1707 CustomCuration *GoogleCloudApihubV1CustomCuration `json:"customCuration,omitempty"`
1708 // ForceSendFields is a list of field names (e.g. "CurationType") to
1709 // unconditionally include in API requests. By default, fields with empty or
1710 // default values are omitted from API requests. See
1711 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1712 // details.
1713 ForceSendFields []string `json:"-"`
1714 // NullFields is a list of field names (e.g. "CurationType") to include in API
1715 // requests with the JSON null value. By default, fields with empty values are
1716 // omitted from API requests. See
1717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1718 NullFields []string `json:"-"`
1719 }
1720
1721 func (s GoogleCloudApihubV1CurationConfig) MarshalJSON() ([]byte, error) {
1722 type NoMethod GoogleCloudApihubV1CurationConfig
1723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1724 }
1725
1726 // GoogleCloudApihubV1CustomCuration: Custom curation information for this
1727 // plugin instance.
1728 type GoogleCloudApihubV1CustomCuration struct {
1729 // Curation: Required. The unique name of the curation resource. This will be
1730 // the name of the curation resource in the format:
1731 // `projects/{project}/locations/{location}/curations/{curation}`
1732 Curation string `json:"curation,omitempty"`
1733 // ForceSendFields is a list of field names (e.g. "Curation") to
1734 // unconditionally include in API requests. By default, fields with empty or
1735 // default values are omitted from API requests. See
1736 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1737 // details.
1738 ForceSendFields []string `json:"-"`
1739 // NullFields is a list of field names (e.g. "Curation") to include in API
1740 // requests with the JSON null value. By default, fields with empty values are
1741 // omitted from API requests. See
1742 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1743 NullFields []string `json:"-"`
1744 }
1745
1746 func (s GoogleCloudApihubV1CustomCuration) MarshalJSON() ([]byte, error) {
1747 type NoMethod GoogleCloudApihubV1CustomCuration
1748 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1749 }
1750
1751 // GoogleCloudApihubV1Definition: Represents a definition for example schema,
1752 // request, response definitions contained in an API version. A definition is
1753 // added/updated/deleted in an API version when a new spec is added or an
1754 // existing spec is updated/deleted in a version. Currently, definition will be
1755 // created only corresponding to OpenAPI spec as parsing is supported for
1756 // OpenAPI spec. Also, within OpenAPI spec, only `schema` object is supported.
1757 type GoogleCloudApihubV1Definition struct {
1758 // Attributes: Optional. The list of user defined attributes associated with
1759 // the definition resource. The key is the attribute name. It will be of the
1760 // format: `projects/{project}/locations/{location}/attributes/{attribute}`.
1761 // The value is the attribute values associated with the resource.
1762 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
1763 // CreateTime: Output only. The time at which the definition was created.
1764 CreateTime string `json:"createTime,omitempty"`
1765 // Name: Identifier. The name of the definition. Format:
1766 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/defini
1767 // tions/{definition}`
1768 Name string `json:"name,omitempty"`
1769 // Schema: Output only. The value of a schema definition.
1770 Schema *GoogleCloudApihubV1Schema `json:"schema,omitempty"`
1771 // Spec: Output only. The name of the spec from where the definition was
1772 // parsed. Format is
1773 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/
1774 // {spec}`
1775 Spec string `json:"spec,omitempty"`
1776 // Type: Output only. The type of the definition.
1777 //
1778 // Possible values:
1779 // "TYPE_UNSPECIFIED" - Definition type unspecified.
1780 // "SCHEMA" - Definition type schema.
1781 Type string `json:"type,omitempty"`
1782 // UpdateTime: Output only. The time at which the definition was last updated.
1783 UpdateTime string `json:"updateTime,omitempty"`
1784
1785 // ServerResponse contains the HTTP response code and headers from the server.
1786 googleapi.ServerResponse `json:"-"`
1787 // ForceSendFields is a list of field names (e.g. "Attributes") to
1788 // unconditionally include in API requests. By default, fields with empty or
1789 // default values are omitted from API requests. See
1790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1791 // details.
1792 ForceSendFields []string `json:"-"`
1793 // NullFields is a list of field names (e.g. "Attributes") to include in API
1794 // requests with the JSON null value. By default, fields with empty values are
1795 // omitted from API requests. See
1796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1797 NullFields []string `json:"-"`
1798 }
1799
1800 func (s GoogleCloudApihubV1Definition) MarshalJSON() ([]byte, error) {
1801 type NoMethod GoogleCloudApihubV1Definition
1802 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1803 }
1804
1805 // GoogleCloudApihubV1Dependency: A dependency resource defined in the API hub
1806 // describes a dependency directed from a consumer to a supplier entity. A
1807 // dependency can be defined between two Operations or between an Operation and
1808 // External API.
1809 type GoogleCloudApihubV1Dependency struct {
1810 // Attributes: Optional. The list of user defined attributes associated with
1811 // the dependency resource. The key is the attribute name. It will be of the
1812 // format: `projects/{project}/locations/{location}/attributes/{attribute}`.
1813 // The value is the attribute values associated with the resource.
1814 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
1815 // Consumer: Required. Immutable. The entity acting as the consumer in the
1816 // dependency.
1817 Consumer *GoogleCloudApihubV1DependencyEntityReference `json:"consumer,omitempty"`
1818 // CreateTime: Output only. The time at which the dependency was created.
1819 CreateTime string `json:"createTime,omitempty"`
1820 // Description: Optional. Human readable description corresponding of the
1821 // dependency.
1822 Description string `json:"description,omitempty"`
1823 // DiscoveryMode: Output only. Discovery mode of the dependency.
1824 //
1825 // Possible values:
1826 // "DISCOVERY_MODE_UNSPECIFIED" - Default value. This value is unused.
1827 // "MANUAL" - Manual mode of discovery when the dependency is defined by the
1828 // user.
1829 DiscoveryMode string `json:"discoveryMode,omitempty"`
1830 // ErrorDetail: Output only. Error details of a dependency if the system has
1831 // detected it internally.
1832 ErrorDetail *GoogleCloudApihubV1DependencyErrorDetail `json:"errorDetail,omitempty"`
1833 // Name: Identifier. The name of the dependency in the API Hub. Format:
1834 // `projects/{project}/locations/{location}/dependencies/{dependency}`
1835 Name string `json:"name,omitempty"`
1836 // State: Output only. State of the dependency.
1837 //
1838 // Possible values:
1839 // "STATE_UNSPECIFIED" - Default value. This value is unused.
1840 // "PROPOSED" - Dependency will be in a proposed state when it is newly
1841 // identified by the API hub on its own.
1842 // "VALIDATED" - Dependency will be in a validated state when it is validated
1843 // by the admin or manually created in the API hub.
1844 State string `json:"state,omitempty"`
1845 // Supplier: Required. Immutable. The entity acting as the supplier in the
1846 // dependency.
1847 Supplier *GoogleCloudApihubV1DependencyEntityReference `json:"supplier,omitempty"`
1848 // UpdateTime: Output only. The time at which the dependency was last updated.
1849 UpdateTime string `json:"updateTime,omitempty"`
1850
1851 // ServerResponse contains the HTTP response code and headers from the server.
1852 googleapi.ServerResponse `json:"-"`
1853 // ForceSendFields is a list of field names (e.g. "Attributes") to
1854 // unconditionally include in API requests. By default, fields with empty or
1855 // default values are omitted from API requests. See
1856 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1857 // details.
1858 ForceSendFields []string `json:"-"`
1859 // NullFields is a list of field names (e.g. "Attributes") to include in API
1860 // requests with the JSON null value. By default, fields with empty values are
1861 // omitted from API requests. See
1862 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1863 NullFields []string `json:"-"`
1864 }
1865
1866 func (s GoogleCloudApihubV1Dependency) MarshalJSON() ([]byte, error) {
1867 type NoMethod GoogleCloudApihubV1Dependency
1868 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1869 }
1870
1871 // GoogleCloudApihubV1DependencyEntityReference: Reference to an entity
1872 // participating in a dependency.
1873 type GoogleCloudApihubV1DependencyEntityReference struct {
1874 // DisplayName: Output only. Display name of the entity.
1875 DisplayName string `json:"displayName,omitempty"`
1876 // ExternalApiResourceName: The resource name of an external API in the API
1877 // Hub. Format:
1878 // `projects/{project}/locations/{location}/externalApis/{external_api}`
1879 ExternalApiResourceName string `json:"externalApiResourceName,omitempty"`
1880 // OperationResourceName: The resource name of an operation in the API Hub.
1881 // Format:
1882 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operat
1883 // ions/{operation}`
1884 OperationResourceName string `json:"operationResourceName,omitempty"`
1885 // ForceSendFields is a list of field names (e.g. "DisplayName") to
1886 // unconditionally include in API requests. By default, fields with empty or
1887 // default values are omitted from API requests. See
1888 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1889 // details.
1890 ForceSendFields []string `json:"-"`
1891 // NullFields is a list of field names (e.g. "DisplayName") to include in API
1892 // requests with the JSON null value. By default, fields with empty values are
1893 // omitted from API requests. See
1894 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1895 NullFields []string `json:"-"`
1896 }
1897
1898 func (s GoogleCloudApihubV1DependencyEntityReference) MarshalJSON() ([]byte, error) {
1899 type NoMethod GoogleCloudApihubV1DependencyEntityReference
1900 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1901 }
1902
1903 // GoogleCloudApihubV1DependencyErrorDetail: Details describing error condition
1904 // of a dependency.
1905 type GoogleCloudApihubV1DependencyErrorDetail struct {
1906 // Error: Optional. Error in the dependency.
1907 //
1908 // Possible values:
1909 // "ERROR_UNSPECIFIED" - Default value used for no error in the dependency.
1910 // "SUPPLIER_NOT_FOUND" - Supplier entity has been deleted.
1911 // "SUPPLIER_RECREATED" - Supplier entity has been recreated.
1912 Error string `json:"error,omitempty"`
1913 // ErrorTime: Optional. Timestamp at which the error was found.
1914 ErrorTime string `json:"errorTime,omitempty"`
1915 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally
1916 // include in API requests. By default, fields with empty or default values are
1917 // omitted from API requests. See
1918 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1919 // details.
1920 ForceSendFields []string `json:"-"`
1921 // NullFields is a list of field names (e.g. "Error") to include in API
1922 // requests with the JSON null value. By default, fields with empty values are
1923 // omitted from API requests. See
1924 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1925 NullFields []string `json:"-"`
1926 }
1927
1928 func (s GoogleCloudApihubV1DependencyErrorDetail) MarshalJSON() ([]byte, error) {
1929 type NoMethod GoogleCloudApihubV1DependencyErrorDetail
1930 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1931 }
1932
1933 // GoogleCloudApihubV1Deployment: Details of the deployment where APIs are
1934 // hosted. A deployment could represent an Apigee proxy, API gateway, other
1935 // Google Cloud services or non-Google Cloud services as well. A deployment
1936 // entity is a root level entity in the API hub and exists independent of any
1937 // API.
1938 type GoogleCloudApihubV1Deployment struct {
1939 // ApiVersions: Output only. The API versions linked to this deployment. Note:
1940 // A particular deployment could be linked to multiple different API versions
1941 // (of same or different APIs).
1942 ApiVersions []string `json:"apiVersions,omitempty"`
1943 // Attributes: Optional. The list of user defined attributes associated with
1944 // the deployment resource. The key is the attribute name. It will be of the
1945 // format: `projects/{project}/locations/{location}/attributes/{attribute}`.
1946 // The value is the attribute values associated with the resource.
1947 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
1948 // CreateTime: Output only. The time at which the deployment was created.
1949 CreateTime string `json:"createTime,omitempty"`
1950 // DeploymentType: Required. The type of deployment. This maps to the following
1951 // system defined attribute:
1952 // `projects/{project}/locations/{location}/attributes/system-deployment-type`
1953 // attribute. The number of values for this attribute will be based on the
1954 // cardinality of the attribute. The same can be retrieved via GetAttribute
1955 // API. All values should be from the list of allowed values defined for the
1956 // attribute.
1957 DeploymentType *GoogleCloudApihubV1AttributeValues `json:"deploymentType,omitempty"`
1958 // Description: Optional. The description of the deployment.
1959 Description string `json:"description,omitempty"`
1960 // DisplayName: Required. The display name of the deployment.
1961 DisplayName string `json:"displayName,omitempty"`
1962 // Documentation: Optional. The documentation of the deployment.
1963 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
1964 // Endpoints: Required. The endpoints at which this deployment resource is
1965 // listening for API requests. This could be a list of complete URIs, hostnames
1966 // or an IP addresses.
1967 Endpoints []string `json:"endpoints,omitempty"`
1968 // Environment: Optional. The environment mapping to this deployment. This maps
1969 // to the following system defined attribute:
1970 // `projects/{project}/locations/{location}/attributes/system-environment`
1971 // attribute. The number of values for this attribute will be based on the
1972 // cardinality of the attribute. The same can be retrieved via GetAttribute
1973 // API. All values should be from the list of allowed values defined for the
1974 // attribute.
1975 Environment *GoogleCloudApihubV1AttributeValues `json:"environment,omitempty"`
1976 // ManagementUrl: Optional. The uri where users can navigate to for the
1977 // management of the deployment. This maps to the following system defined
1978 // attribute:
1979 // `projects/{project}/locations/{location}/attributes/system-management-url`
1980 // The number of values for this attribute will be based on the cardinality of
1981 // the attribute. The same can be retrieved via GetAttribute API. The value of
1982 // the attribute should be a valid URL.
1983 ManagementUrl *GoogleCloudApihubV1AttributeValues `json:"managementUrl,omitempty"`
1984 // Name: Identifier. The name of the deployment. Format:
1985 // `projects/{project}/locations/{location}/deployments/{deployment}`
1986 Name string `json:"name,omitempty"`
1987 // ResourceUri: Required. The resource URI identifies the deployment within its
1988 // gateway. For Apigee gateways, its recommended to use the format:
1989 // organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with
1990 // name `orders` is deployed in `staging` environment of `cymbal` organization,
1991 // the resource URI would be:
1992 // `organizations/cymbal/environments/staging/apis/orders`.
1993 ResourceUri string `json:"resourceUri,omitempty"`
1994 // Slo: Optional. The SLO for this deployment. This maps to the following
1995 // system defined attribute:
1996 // `projects/{project}/locations/{location}/attributes/system-slo` attribute.
1997 // The number of values for this attribute will be based on the cardinality of
1998 // the attribute. The same can be retrieved via GetAttribute API. All values
1999 // should be from the list of allowed values defined for the attribute.
2000 Slo *GoogleCloudApihubV1AttributeValues `json:"slo,omitempty"`
2001 // SourceEnvironment: Optional. The environment at source for the deployment.
2002 // For example: prod, dev, staging, etc.
2003 SourceEnvironment string `json:"sourceEnvironment,omitempty"`
2004 // SourceMetadata: Output only. The list of sources and metadata from the
2005 // sources of the deployment.
2006 SourceMetadata []*GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
2007 // SourceProject: Optional. The project to which the deployment belongs. For
2008 // Google Cloud gateways, this will refer to the project identifier. For others
2009 // like Edge/OPDK, this will refer to the org identifier.
2010 SourceProject string `json:"sourceProject,omitempty"`
2011 // SourceUri: Optional. The uri where additional source specific information
2012 // for this deployment can be found. This maps to the following system defined
2013 // attribute:
2014 // `projects/{project}/locations/{location}/attributes/system-source-uri` The
2015 // number of values for this attribute will be based on the cardinality of the
2016 // attribute. The same can be retrieved via GetAttribute API. The value of the
2017 // attribute should be a valid URI, and in case of Cloud Storage URI, it should
2018 // point to a Cloud Storage object, not a directory.
2019 SourceUri *GoogleCloudApihubV1AttributeValues `json:"sourceUri,omitempty"`
2020 // UpdateTime: Output only. The time at which the deployment was last updated.
2021 UpdateTime string `json:"updateTime,omitempty"`
2022
2023 // ServerResponse contains the HTTP response code and headers from the server.
2024 googleapi.ServerResponse `json:"-"`
2025 // ForceSendFields is a list of field names (e.g. "ApiVersions") to
2026 // unconditionally include in API requests. By default, fields with empty or
2027 // default values are omitted from API requests. See
2028 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2029 // details.
2030 ForceSendFields []string `json:"-"`
2031 // NullFields is a list of field names (e.g. "ApiVersions") to include in API
2032 // requests with the JSON null value. By default, fields with empty values are
2033 // omitted from API requests. See
2034 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2035 NullFields []string `json:"-"`
2036 }
2037
2038 func (s GoogleCloudApihubV1Deployment) MarshalJSON() ([]byte, error) {
2039 type NoMethod GoogleCloudApihubV1Deployment
2040 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2041 }
2042
2043 // GoogleCloudApihubV1DeploymentMetadata: The metadata associated with a
2044 // deployment.
2045 type GoogleCloudApihubV1DeploymentMetadata struct {
2046 // Deployment: Required. The deployment resource to be pushed to Hub's collect
2047 // layer. The ID of the deployment will be generated by Hub.
2048 Deployment *GoogleCloudApihubV1Deployment `json:"deployment,omitempty"`
2049 // OriginalCreateTime: Optional. Timestamp indicating when the deployment was
2050 // created at the source.
2051 OriginalCreateTime string `json:"originalCreateTime,omitempty"`
2052 // OriginalId: Optional. The unique identifier of the deployment in the system
2053 // where it was originally created.
2054 OriginalId string `json:"originalId,omitempty"`
2055 // OriginalUpdateTime: Required. Timestamp indicating when the deployment was
2056 // last updated at the source.
2057 OriginalUpdateTime string `json:"originalUpdateTime,omitempty"`
2058 // ForceSendFields is a list of field names (e.g. "Deployment") to
2059 // unconditionally include in API requests. By default, fields with empty or
2060 // default values are omitted from API requests. See
2061 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2062 // details.
2063 ForceSendFields []string `json:"-"`
2064 // NullFields is a list of field names (e.g. "Deployment") to include in API
2065 // requests with the JSON null value. By default, fields with empty values are
2066 // omitted from API requests. See
2067 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2068 NullFields []string `json:"-"`
2069 }
2070
2071 func (s GoogleCloudApihubV1DeploymentMetadata) MarshalJSON() ([]byte, error) {
2072 type NoMethod GoogleCloudApihubV1DeploymentMetadata
2073 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2074 }
2075
2076 // GoogleCloudApihubV1DisablePluginInstanceActionRequest: The
2077 // DisablePluginInstanceAction method's request.
2078 type GoogleCloudApihubV1DisablePluginInstanceActionRequest struct {
2079 // ActionId: Required. The action id to disable.
2080 ActionId string `json:"actionId,omitempty"`
2081 // ForceSendFields is a list of field names (e.g. "ActionId") to
2082 // unconditionally include in API requests. By default, fields with empty or
2083 // default values are omitted from API requests. See
2084 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2085 // details.
2086 ForceSendFields []string `json:"-"`
2087 // NullFields is a list of field names (e.g. "ActionId") to include in API
2088 // requests with the JSON null value. By default, fields with empty values are
2089 // omitted from API requests. See
2090 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2091 NullFields []string `json:"-"`
2092 }
2093
2094 func (s GoogleCloudApihubV1DisablePluginInstanceActionRequest) MarshalJSON() ([]byte, error) {
2095 type NoMethod GoogleCloudApihubV1DisablePluginInstanceActionRequest
2096 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2097 }
2098
2099 // GoogleCloudApihubV1DisablePluginRequest: The DisablePlugin method's request.
2100 type GoogleCloudApihubV1DisablePluginRequest struct {
2101 }
2102
2103 // GoogleCloudApihubV1DiscoveredApiObservation: Respresents an API Observation
2104 // observed in one of the sources.
2105 type GoogleCloudApihubV1DiscoveredApiObservation struct {
2106 // ApiOperationCount: Optional. The number of observed API Operations.
2107 ApiOperationCount int64 `json:"apiOperationCount,omitempty,string"`
2108 // CreateTime: Output only. Create time stamp of the observation in API Hub.
2109 CreateTime string `json:"createTime,omitempty"`
2110 // Hostname: Optional. The hostname of requests processed for this Observation.
2111 Hostname string `json:"hostname,omitempty"`
2112 // KnownOperationsCount: Output only. The number of known API Operations.
2113 KnownOperationsCount int64 `json:"knownOperationsCount,omitempty,string"`
2114 // LastEventDetectedTime: Optional. Last event detected time stamp
2115 LastEventDetectedTime string `json:"lastEventDetectedTime,omitempty"`
2116 // Name: Identifier. The name of the discovered API Observation. Format:
2117 // `projects/{project}/locations/{location}/discoveredApiObservations/{discovere
2118 // d_api_observation}`
2119 Name string `json:"name,omitempty"`
2120 // Origin: Optional. For an observation pushed from a Google Cloud resource,
2121 // this would be the Google Cloud project id.
2122 Origin string `json:"origin,omitempty"`
2123 // ServerIps: Optional. The IP address (IPv4 or IPv6) of the origin server that
2124 // the request was sent to. This field can include port information. Examples:
2125 // "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329".
2126 ServerIps []string `json:"serverIps,omitempty"`
2127 // SourceLocations: Optional. The location of the observation source.
2128 SourceLocations []string `json:"sourceLocations,omitempty"`
2129 // SourceMetadata: Output only. The metadata of the source from which the
2130 // observation was collected.
2131 SourceMetadata *GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
2132 // SourceTypes: Optional. The type of the source from which the observation was
2133 // collected.
2134 //
2135 // Possible values:
2136 // "SOURCE_TYPE_UNSPECIFIED" - Source type not specified.
2137 // "GCP_XLB" - Google Cloud external load balancer.
2138 // "GCP_ILB" - Google Cloud internal load balancer.
2139 SourceTypes []string `json:"sourceTypes,omitempty"`
2140 // Style: Optional. Style of ApiObservation
2141 //
2142 // Possible values:
2143 // "STYLE_UNSPECIFIED" - Unknown style
2144 // "REST" - Style is Rest API
2145 // "GRPC" - Style is Grpc API
2146 // "GRAPHQL" - Style is GraphQL API
2147 Style string `json:"style,omitempty"`
2148 // UnknownOperationsCount: Output only. The number of unknown API Operations.
2149 UnknownOperationsCount int64 `json:"unknownOperationsCount,omitempty,string"`
2150 // UpdateTime: Output only. Update time stamp of the observation in API Hub.
2151 UpdateTime string `json:"updateTime,omitempty"`
2152
2153 // ServerResponse contains the HTTP response code and headers from the server.
2154 googleapi.ServerResponse `json:"-"`
2155 // ForceSendFields is a list of field names (e.g. "ApiOperationCount") to
2156 // unconditionally include in API requests. By default, fields with empty or
2157 // default values are omitted from API requests. See
2158 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2159 // details.
2160 ForceSendFields []string `json:"-"`
2161 // NullFields is a list of field names (e.g. "ApiOperationCount") to include in
2162 // API requests with the JSON null value. By default, fields with empty values
2163 // are omitted from API requests. See
2164 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2165 NullFields []string `json:"-"`
2166 }
2167
2168 func (s GoogleCloudApihubV1DiscoveredApiObservation) MarshalJSON() ([]byte, error) {
2169 type NoMethod GoogleCloudApihubV1DiscoveredApiObservation
2170 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2171 }
2172
2173 // GoogleCloudApihubV1DiscoveredApiOperation: DiscoveredApiOperation represents
2174 // an API Operation observed in one of the sources.
2175 type GoogleCloudApihubV1DiscoveredApiOperation struct {
2176 // Classification: Output only. The classification of the discovered API
2177 // operation.
2178 //
2179 // Possible values:
2180 // "CLASSIFICATION_UNSPECIFIED" - Operation is not classified as known or
2181 // unknown.
2182 // "KNOWN" - Operation has a matched catalog operation.
2183 // "UNKNOWN" - Operation does not have a matched catalog operation.
2184 Classification string `json:"classification,omitempty"`
2185 // Count: Optional. The number of occurrences of this API Operation.
2186 Count int64 `json:"count,omitempty,string"`
2187 // CreateTime: Output only. Create time stamp of the discovered API operation
2188 // in API Hub.
2189 CreateTime string `json:"createTime,omitempty"`
2190 // FirstSeenTime: Optional. First seen time stamp
2191 FirstSeenTime string `json:"firstSeenTime,omitempty"`
2192 // HttpOperation: Optional. An HTTP Operation.
2193 HttpOperation *GoogleCloudApihubV1HttpOperationDetails `json:"httpOperation,omitempty"`
2194 // LastSeenTime: Optional. Last seen time stamp
2195 LastSeenTime string `json:"lastSeenTime,omitempty"`
2196 // MatchResults: Output only. The list of matched results for the discovered
2197 // API operation. This will be populated only if the classification is known.
2198 // The current usecase is for a single match. Keeping it repeated to support
2199 // multiple matches in future.
2200 MatchResults []*GoogleCloudApihubV1MatchResult `json:"matchResults,omitempty"`
2201 // Name: Identifier. The name of the discovered API Operation. Format:
2202 // `projects/{project}/locations/{location}/discoveredApiObservations/{discovere
2203 // d_api_observation}/discoveredApiOperations/{discovered_api_operation}`
2204 Name string `json:"name,omitempty"`
2205 // SourceMetadata: Output only. The metadata of the source from which the api
2206 // operation was collected.
2207 SourceMetadata *GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
2208 // UpdateTime: Output only. Update time stamp of the discovered API operation
2209 // in API Hub.
2210 UpdateTime string `json:"updateTime,omitempty"`
2211
2212 // ServerResponse contains the HTTP response code and headers from the server.
2213 googleapi.ServerResponse `json:"-"`
2214 // ForceSendFields is a list of field names (e.g. "Classification") to
2215 // unconditionally include in API requests. By default, fields with empty or
2216 // default values are omitted from API requests. See
2217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2218 // details.
2219 ForceSendFields []string `json:"-"`
2220 // NullFields is a list of field names (e.g. "Classification") to include in
2221 // API requests with the JSON null value. By default, fields with empty values
2222 // are omitted from API requests. See
2223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2224 NullFields []string `json:"-"`
2225 }
2226
2227 func (s GoogleCloudApihubV1DiscoveredApiOperation) MarshalJSON() ([]byte, error) {
2228 type NoMethod GoogleCloudApihubV1DiscoveredApiOperation
2229 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2230 }
2231
2232 // GoogleCloudApihubV1Documentation: Documentation details.
2233 type GoogleCloudApihubV1Documentation struct {
2234 // ExternalUri: Optional. The uri of the externally hosted documentation.
2235 ExternalUri string `json:"externalUri,omitempty"`
2236 // ForceSendFields is a list of field names (e.g. "ExternalUri") to
2237 // unconditionally include in API requests. By default, fields with empty or
2238 // default values are omitted from API requests. See
2239 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2240 // details.
2241 ForceSendFields []string `json:"-"`
2242 // NullFields is a list of field names (e.g. "ExternalUri") to include in API
2243 // requests with the JSON null value. By default, fields with empty values are
2244 // omitted from API requests. See
2245 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2246 NullFields []string `json:"-"`
2247 }
2248
2249 func (s GoogleCloudApihubV1Documentation) MarshalJSON() ([]byte, error) {
2250 type NoMethod GoogleCloudApihubV1Documentation
2251 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2252 }
2253
2254 // GoogleCloudApihubV1EnablePluginInstanceActionRequest: The
2255 // EnablePluginInstanceAction method's request.
2256 type GoogleCloudApihubV1EnablePluginInstanceActionRequest struct {
2257 // ActionId: Required. The action id to enable.
2258 ActionId string `json:"actionId,omitempty"`
2259 // ForceSendFields is a list of field names (e.g. "ActionId") to
2260 // unconditionally include in API requests. By default, fields with empty or
2261 // default values are omitted from API requests. See
2262 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2263 // details.
2264 ForceSendFields []string `json:"-"`
2265 // NullFields is a list of field names (e.g. "ActionId") to include in API
2266 // requests with the JSON null value. By default, fields with empty values are
2267 // omitted from API requests. See
2268 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2269 NullFields []string `json:"-"`
2270 }
2271
2272 func (s GoogleCloudApihubV1EnablePluginInstanceActionRequest) MarshalJSON() ([]byte, error) {
2273 type NoMethod GoogleCloudApihubV1EnablePluginInstanceActionRequest
2274 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2275 }
2276
2277 // GoogleCloudApihubV1EnablePluginRequest: The EnablePlugin method's request.
2278 type GoogleCloudApihubV1EnablePluginRequest struct {
2279 }
2280
2281 // GoogleCloudApihubV1Endpoint: The endpoint to be triggered for curation. The
2282 // endpoint will be invoked with a request payload containing ApiMetadata.
2283 // Response should contain curated data in the form of ApiMetadata.
2284 type GoogleCloudApihubV1Endpoint struct {
2285 // ApplicationIntegrationEndpointDetails: Required. The details of the
2286 // Application Integration endpoint to be triggered for curation.
2287 ApplicationIntegrationEndpointDetails *GoogleCloudApihubV1ApplicationIntegrationEndpointDetails `json:"applicationIntegrationEndpointDetails,omitempty"`
2288 // ForceSendFields is a list of field names (e.g.
2289 // "ApplicationIntegrationEndpointDetails") to unconditionally include in API
2290 // requests. By default, fields with empty or default values are omitted from
2291 // API requests. See
2292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2293 // details.
2294 ForceSendFields []string `json:"-"`
2295 // NullFields is a list of field names (e.g.
2296 // "ApplicationIntegrationEndpointDetails") to include in API requests with the
2297 // JSON null value. By default, fields with empty values are omitted from API
2298 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
2299 // more details.
2300 NullFields []string `json:"-"`
2301 }
2302
2303 func (s GoogleCloudApihubV1Endpoint) MarshalJSON() ([]byte, error) {
2304 type NoMethod GoogleCloudApihubV1Endpoint
2305 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2306 }
2307
2308 // GoogleCloudApihubV1EnumAttributeValues: The attribute values of data type
2309 // enum.
2310 type GoogleCloudApihubV1EnumAttributeValues struct {
2311 // Values: Required. The attribute values in case attribute data type is enum.
2312 Values []*GoogleCloudApihubV1AllowedValue `json:"values,omitempty"`
2313 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
2314 // include in API requests. By default, fields with empty or default values are
2315 // omitted from API requests. See
2316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2317 // details.
2318 ForceSendFields []string `json:"-"`
2319 // NullFields is a list of field names (e.g. "Values") to include in API
2320 // requests with the JSON null value. By default, fields with empty values are
2321 // omitted from API requests. See
2322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2323 NullFields []string `json:"-"`
2324 }
2325
2326 func (s GoogleCloudApihubV1EnumAttributeValues) MarshalJSON() ([]byte, error) {
2327 type NoMethod GoogleCloudApihubV1EnumAttributeValues
2328 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2329 }
2330
2331 // GoogleCloudApihubV1EnvironmentFilter: Filter for environments.
2332 type GoogleCloudApihubV1EnvironmentFilter struct {
2333 // AllEnvironments: Optional. Indicates if this filter should match all
2334 // environments or only a subset of environments. If set to true, all
2335 // environments are matched.
2336 AllEnvironments bool `json:"allEnvironments,omitempty"`
2337 // Environments: Optional. If provided, only environments in this list are
2338 // matched. This field is ignored if `all_environments` is true.
2339 Environments []string `json:"environments,omitempty"`
2340 // ForceSendFields is a list of field names (e.g. "AllEnvironments") to
2341 // unconditionally include in API requests. By default, fields with empty or
2342 // default values are omitted from API requests. See
2343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2344 // details.
2345 ForceSendFields []string `json:"-"`
2346 // NullFields is a list of field names (e.g. "AllEnvironments") to include in
2347 // API requests with the JSON null value. By default, fields with empty values
2348 // are omitted from API requests. See
2349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2350 NullFields []string `json:"-"`
2351 }
2352
2353 func (s GoogleCloudApihubV1EnvironmentFilter) MarshalJSON() ([]byte, error) {
2354 type NoMethod GoogleCloudApihubV1EnvironmentFilter
2355 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2356 }
2357
2358 // GoogleCloudApihubV1ExecutePluginInstanceActionRequest: The
2359 // ExecutePluginInstanceAction method's request.
2360 type GoogleCloudApihubV1ExecutePluginInstanceActionRequest struct {
2361 // ActionExecutionDetail: Required. The execution details for the action to
2362 // execute.
2363 ActionExecutionDetail *GoogleCloudApihubV1ActionExecutionDetail `json:"actionExecutionDetail,omitempty"`
2364 // ForceSendFields is a list of field names (e.g. "ActionExecutionDetail") to
2365 // unconditionally include in API requests. By default, fields with empty or
2366 // default values are omitted from API requests. See
2367 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2368 // details.
2369 ForceSendFields []string `json:"-"`
2370 // NullFields is a list of field names (e.g. "ActionExecutionDetail") to
2371 // include in API requests with the JSON null value. By default, fields with
2372 // empty values are omitted from API requests. See
2373 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2374 NullFields []string `json:"-"`
2375 }
2376
2377 func (s GoogleCloudApihubV1ExecutePluginInstanceActionRequest) MarshalJSON() ([]byte, error) {
2378 type NoMethod GoogleCloudApihubV1ExecutePluginInstanceActionRequest
2379 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2380 }
2381
2382 // GoogleCloudApihubV1ExecutionStatus: The execution status for the plugin
2383 // instance.
2384 type GoogleCloudApihubV1ExecutionStatus struct {
2385 // CurrentExecutionState: Output only. The current state of the execution.
2386 //
2387 // Possible values:
2388 // "CURRENT_EXECUTION_STATE_UNSPECIFIED" - Default unspecified execution
2389 // state.
2390 // "RUNNING" - The plugin instance is executing.
2391 // "NOT_RUNNING" - The plugin instance is not running an execution.
2392 CurrentExecutionState string `json:"currentExecutionState,omitempty"`
2393 // LastExecution: Output only. The last execution of the plugin instance.
2394 LastExecution *GoogleCloudApihubV1LastExecution `json:"lastExecution,omitempty"`
2395 // ForceSendFields is a list of field names (e.g. "CurrentExecutionState") to
2396 // unconditionally include in API requests. By default, fields with empty or
2397 // default values are omitted from API requests. See
2398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2399 // details.
2400 ForceSendFields []string `json:"-"`
2401 // NullFields is a list of field names (e.g. "CurrentExecutionState") to
2402 // include in API requests with the JSON null value. By default, fields with
2403 // empty values are omitted from API requests. See
2404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2405 NullFields []string `json:"-"`
2406 }
2407
2408 func (s GoogleCloudApihubV1ExecutionStatus) MarshalJSON() ([]byte, error) {
2409 type NoMethod GoogleCloudApihubV1ExecutionStatus
2410 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2411 }
2412
2413 // GoogleCloudApihubV1ExternalApi: An external API represents an API being
2414 // provided by external sources. This can be used to model third-party APIs and
2415 // can be used to define dependencies.
2416 type GoogleCloudApihubV1ExternalApi struct {
2417 // Attributes: Optional. The list of user defined attributes associated with
2418 // the Version resource. The key is the attribute name. It will be of the
2419 // format: `projects/{project}/locations/{location}/attributes/{attribute}`.
2420 // The value is the attribute values associated with the resource.
2421 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
2422 // CreateTime: Output only. Creation timestamp.
2423 CreateTime string `json:"createTime,omitempty"`
2424 // Description: Optional. Description of the external API. Max length is 2000
2425 // characters (Unicode Code Points).
2426 Description string `json:"description,omitempty"`
2427 // DisplayName: Required. Display name of the external API. Max length is 63
2428 // characters (Unicode Code Points).
2429 DisplayName string `json:"displayName,omitempty"`
2430 // Documentation: Optional. Documentation of the external API.
2431 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
2432 // Endpoints: Optional. List of endpoints on which this API is accessible.
2433 Endpoints []string `json:"endpoints,omitempty"`
2434 // Name: Identifier. Format:
2435 // `projects/{project}/locations/{location}/externalApi/{externalApi}`.
2436 Name string `json:"name,omitempty"`
2437 // Paths: Optional. List of paths served by this API.
2438 Paths []string `json:"paths,omitempty"`
2439 // UpdateTime: Output only. Last update timestamp.
2440 UpdateTime string `json:"updateTime,omitempty"`
2441
2442 // ServerResponse contains the HTTP response code and headers from the server.
2443 googleapi.ServerResponse `json:"-"`
2444 // ForceSendFields is a list of field names (e.g. "Attributes") to
2445 // unconditionally include in API requests. By default, fields with empty or
2446 // default values are omitted from API requests. See
2447 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2448 // details.
2449 ForceSendFields []string `json:"-"`
2450 // NullFields is a list of field names (e.g. "Attributes") to include in API
2451 // requests with the JSON null value. By default, fields with empty values are
2452 // omitted from API requests. See
2453 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2454 NullFields []string `json:"-"`
2455 }
2456
2457 func (s GoogleCloudApihubV1ExternalApi) MarshalJSON() ([]byte, error) {
2458 type NoMethod GoogleCloudApihubV1ExternalApi
2459 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2460 }
2461
2462 // GoogleCloudApihubV1FetchAdditionalSpecContentResponse: The
2463 // FetchAdditionalSpecContent method's response.
2464 type GoogleCloudApihubV1FetchAdditionalSpecContentResponse struct {
2465 // AdditionalSpecContent: The additional spec content.
2466 AdditionalSpecContent *GoogleCloudApihubV1AdditionalSpecContent `json:"additionalSpecContent,omitempty"`
2467
2468 // ServerResponse contains the HTTP response code and headers from the server.
2469 googleapi.ServerResponse `json:"-"`
2470 // ForceSendFields is a list of field names (e.g. "AdditionalSpecContent") to
2471 // unconditionally include in API requests. By default, fields with empty or
2472 // default values are omitted from API requests. See
2473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2474 // details.
2475 ForceSendFields []string `json:"-"`
2476 // NullFields is a list of field names (e.g. "AdditionalSpecContent") to
2477 // include in API requests with the JSON null value. By default, fields with
2478 // empty values are omitted from API requests. See
2479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2480 NullFields []string `json:"-"`
2481 }
2482
2483 func (s GoogleCloudApihubV1FetchAdditionalSpecContentResponse) MarshalJSON() ([]byte, error) {
2484 type NoMethod GoogleCloudApihubV1FetchAdditionalSpecContentResponse
2485 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2486 }
2487
2488 // GoogleCloudApihubV1FlattenedApiVersionDeploymentView: A flattened view of an
2489 // API, its version and one of the linked deployments.
2490 type GoogleCloudApihubV1FlattenedApiVersionDeploymentView struct {
2491 // Api: Optional. The API.
2492 Api *GoogleCloudApihubV1Api `json:"api,omitempty"`
2493 // Deployment: Optional. The deployment.
2494 Deployment *GoogleCloudApihubV1Deployment `json:"deployment,omitempty"`
2495 // Version: Optional. The version.
2496 Version *GoogleCloudApihubV1Version `json:"version,omitempty"`
2497 // ForceSendFields is a list of field names (e.g. "Api") to unconditionally
2498 // include in API requests. By default, fields with empty or default values are
2499 // omitted from API requests. See
2500 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2501 // details.
2502 ForceSendFields []string `json:"-"`
2503 // NullFields is a list of field names (e.g. "Api") to include in API requests
2504 // with the JSON null value. By default, fields with empty values are omitted
2505 // from API requests. See
2506 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2507 NullFields []string `json:"-"`
2508 }
2509
2510 func (s GoogleCloudApihubV1FlattenedApiVersionDeploymentView) MarshalJSON() ([]byte, error) {
2511 type NoMethod GoogleCloudApihubV1FlattenedApiVersionDeploymentView
2512 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2513 }
2514
2515 // GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView: A flattened
2516 // view of an API, its version, one of its operations and one of the linked
2517 // deployments. If there are no deployments linked to the operation then the
2518 // result will be empty.
2519 type GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView struct {
2520 // Api: Optional. The API.
2521 Api *GoogleCloudApihubV1Api `json:"api,omitempty"`
2522 // ApiOperation: Optional. The API operation.
2523 ApiOperation *GoogleCloudApihubV1ApiOperation `json:"apiOperation,omitempty"`
2524 // Deployment: Optional. The deployment.
2525 Deployment *GoogleCloudApihubV1Deployment `json:"deployment,omitempty"`
2526 // Version: Optional. The version.
2527 Version *GoogleCloudApihubV1Version `json:"version,omitempty"`
2528 // ForceSendFields is a list of field names (e.g. "Api") to unconditionally
2529 // include in API requests. By default, fields with empty or default values are
2530 // omitted from API requests. See
2531 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2532 // details.
2533 ForceSendFields []string `json:"-"`
2534 // NullFields is a list of field names (e.g. "Api") to include in API requests
2535 // with the JSON null value. By default, fields with empty values are omitted
2536 // from API requests. See
2537 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2538 NullFields []string `json:"-"`
2539 }
2540
2541 func (s GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView) MarshalJSON() ([]byte, error) {
2542 type NoMethod GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView
2543 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2544 }
2545
2546 // GoogleCloudApihubV1GatewayPluginAddonConfig: Configuration for gateway
2547 // plugin addons. This is used to specify the list of gateway plugin configs
2548 // for which the addon is enabled.
2549 type GoogleCloudApihubV1GatewayPluginAddonConfig struct {
2550 // GatewayPluginConfigs: Required. The list of gateway plugin configs for which
2551 // the addon is enabled. Each gateway plugin config should have a unique plugin
2552 // instance.
2553 GatewayPluginConfigs []*GoogleCloudApihubV1GatewayPluginConfig `json:"gatewayPluginConfigs,omitempty"`
2554 // ForceSendFields is a list of field names (e.g. "GatewayPluginConfigs") to
2555 // unconditionally include in API requests. By default, fields with empty or
2556 // default values are omitted from API requests. See
2557 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2558 // details.
2559 ForceSendFields []string `json:"-"`
2560 // NullFields is a list of field names (e.g. "GatewayPluginConfigs") to include
2561 // in API requests with the JSON null value. By default, fields with empty
2562 // values are omitted from API requests. See
2563 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2564 NullFields []string `json:"-"`
2565 }
2566
2567 func (s GoogleCloudApihubV1GatewayPluginAddonConfig) MarshalJSON() ([]byte, error) {
2568 type NoMethod GoogleCloudApihubV1GatewayPluginAddonConfig
2569 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2570 }
2571
2572 // GoogleCloudApihubV1GatewayPluginConfig: Configuration for a gateway plugin.
2573 // This is used to specify configs for different gateways.
2574 type GoogleCloudApihubV1GatewayPluginConfig struct {
2575 // ApigeeEdgeConfig: Configuration for Apigee Edge gateways.
2576 ApigeeEdgeConfig *GoogleCloudApihubV1ApigeeEdgeConfig `json:"apigeeEdgeConfig,omitempty"`
2577 // ApigeeOpdkConfig: Configuration for Apigee OPDK gateways.
2578 ApigeeOpdkConfig *GoogleCloudApihubV1ApigeeOPDKConfig `json:"apigeeOpdkConfig,omitempty"`
2579 // ApigeeXHybridConfig: Configuration for Apigee X and Apigee Hybrid gateways.
2580 ApigeeXHybridConfig *GoogleCloudApihubV1ApigeeXHybridConfig `json:"apigeeXHybridConfig,omitempty"`
2581 // PluginInstance: Required. The name of the gateway plugin instance for which
2582 // the config is to be specified. Format:
2583 // projects/{project}/locations/{location}/plugins/{plugin}/pluginInstances/{plu
2584 // gin_instance}
2585 PluginInstance string `json:"pluginInstance,omitempty"`
2586 // ForceSendFields is a list of field names (e.g. "ApigeeEdgeConfig") to
2587 // unconditionally include in API requests. By default, fields with empty or
2588 // default values are omitted from API requests. See
2589 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2590 // details.
2591 ForceSendFields []string `json:"-"`
2592 // NullFields is a list of field names (e.g. "ApigeeEdgeConfig") to include in
2593 // API requests with the JSON null value. By default, fields with empty values
2594 // are omitted from API requests. See
2595 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2596 NullFields []string `json:"-"`
2597 }
2598
2599 func (s GoogleCloudApihubV1GatewayPluginConfig) MarshalJSON() ([]byte, error) {
2600 type NoMethod GoogleCloudApihubV1GatewayPluginConfig
2601 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2602 }
2603
2604 // GoogleCloudApihubV1GoogleServiceAccountConfig: Config for Google service
2605 // account authentication.
2606 type GoogleCloudApihubV1GoogleServiceAccountConfig struct {
2607 // ServiceAccount: Required. The service account to be used for authenticating
2608 // request. The `iam.serviceAccounts.getAccessToken` permission should be
2609 // granted on this service account to the impersonator service account.
2610 ServiceAccount string `json:"serviceAccount,omitempty"`
2611 // ForceSendFields is a list of field names (e.g. "ServiceAccount") to
2612 // unconditionally include in API requests. By default, fields with empty or
2613 // default values are omitted from API requests. See
2614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2615 // details.
2616 ForceSendFields []string `json:"-"`
2617 // NullFields is a list of field names (e.g. "ServiceAccount") to include in
2618 // API requests with the JSON null value. By default, fields with empty values
2619 // are omitted from API requests. See
2620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2621 NullFields []string `json:"-"`
2622 }
2623
2624 func (s GoogleCloudApihubV1GoogleServiceAccountConfig) MarshalJSON() ([]byte, error) {
2625 type NoMethod GoogleCloudApihubV1GoogleServiceAccountConfig
2626 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2627 }
2628
2629 // GoogleCloudApihubV1Header: An aggregation of HTTP header occurrences.
2630 type GoogleCloudApihubV1Header struct {
2631 // Count: The number of occurrences of this Header across transactions.
2632 Count int64 `json:"count,omitempty,string"`
2633 // DataType: Data type of header
2634 //
2635 // Possible values:
2636 // "DATA_TYPE_UNSPECIFIED" - Unspecified data type
2637 // "BOOL" - Boolean data type
2638 // "INTEGER" - Integer data type
2639 // "FLOAT" - Float data type
2640 // "STRING" - String data type
2641 // "UUID" - UUID data type
2642 DataType string `json:"dataType,omitempty"`
2643 // Name: Header name.
2644 Name string `json:"name,omitempty"`
2645 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
2646 // include in API requests. By default, fields with empty or default values are
2647 // omitted from API requests. See
2648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2649 // details.
2650 ForceSendFields []string `json:"-"`
2651 // NullFields is a list of field names (e.g. "Count") to include in API
2652 // requests with the JSON null value. By default, fields with empty values are
2653 // omitted from API requests. See
2654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2655 NullFields []string `json:"-"`
2656 }
2657
2658 func (s GoogleCloudApihubV1Header) MarshalJSON() ([]byte, error) {
2659 type NoMethod GoogleCloudApihubV1Header
2660 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2661 }
2662
2663 // GoogleCloudApihubV1HostProjectRegistration: Host project registration refers
2664 // to the registration of a Google cloud project with Api Hub as a host
2665 // project. This is the project where Api Hub is provisioned. It acts as the
2666 // consumer project for the Api Hub instance provisioned. Multiple runtime
2667 // projects can be attached to the host project and these attachments define
2668 // the scope of Api Hub.
2669 type GoogleCloudApihubV1HostProjectRegistration struct {
2670 // CreateTime: Output only. The time at which the host project registration was
2671 // created.
2672 CreateTime string `json:"createTime,omitempty"`
2673 // GcpProject: Required. Immutable. Google cloud project name in the format:
2674 // "projects/abc" or "projects/123". As input, project name with either project
2675 // id or number are accepted. As output, this field will contain project
2676 // number.
2677 GcpProject string `json:"gcpProject,omitempty"`
2678 // Name: Identifier. The name of the host project registration. Format:
2679 // "projects/{project}/locations/{location}/hostProjectRegistrations/{host_proje
2680 // ct_registration}".
2681 Name string `json:"name,omitempty"`
2682
2683 // ServerResponse contains the HTTP response code and headers from the server.
2684 googleapi.ServerResponse `json:"-"`
2685 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2686 // unconditionally include in API requests. By default, fields with empty or
2687 // default values are omitted from API requests. See
2688 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2689 // details.
2690 ForceSendFields []string `json:"-"`
2691 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2692 // requests with the JSON null value. By default, fields with empty values are
2693 // omitted from API requests. See
2694 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2695 NullFields []string `json:"-"`
2696 }
2697
2698 func (s GoogleCloudApihubV1HostProjectRegistration) MarshalJSON() ([]byte, error) {
2699 type NoMethod GoogleCloudApihubV1HostProjectRegistration
2700 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2701 }
2702
2703 // GoogleCloudApihubV1HostingService: The information related to the service
2704 // implemented by the plugin developer, used to invoke the plugin's
2705 // functionality.
2706 type GoogleCloudApihubV1HostingService struct {
2707 // ServiceUri: Optional. The URI of the service implemented by the plugin
2708 // developer, used to invoke the plugin's functionality. This information is
2709 // only required for user defined plugins.
2710 ServiceUri string `json:"serviceUri,omitempty"`
2711 // ForceSendFields is a list of field names (e.g. "ServiceUri") to
2712 // unconditionally include in API requests. By default, fields with empty or
2713 // default values are omitted from API requests. See
2714 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2715 // details.
2716 ForceSendFields []string `json:"-"`
2717 // NullFields is a list of field names (e.g. "ServiceUri") to include in API
2718 // requests with the JSON null value. By default, fields with empty values are
2719 // omitted from API requests. See
2720 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2721 NullFields []string `json:"-"`
2722 }
2723
2724 func (s GoogleCloudApihubV1HostingService) MarshalJSON() ([]byte, error) {
2725 type NoMethod GoogleCloudApihubV1HostingService
2726 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2727 }
2728
2729 // GoogleCloudApihubV1HttpOperation: The HTTP Operation.
2730 type GoogleCloudApihubV1HttpOperation struct {
2731 // Method: Optional. Operation method Note: Even though this field is optional,
2732 // it is required for CreateApiOperation API and we will fail the request if
2733 // not provided.
2734 //
2735 // Possible values:
2736 // "METHOD_UNSPECIFIED" - Method unspecified.
2737 // "GET" - Get Operation type.
2738 // "PUT" - Put Operation type.
2739 // "POST" - Post Operation type.
2740 // "DELETE" - Delete Operation type.
2741 // "OPTIONS" - Options Operation type.
2742 // "HEAD" - Head Operation type.
2743 // "PATCH" - Patch Operation type.
2744 // "TRACE" - Trace Operation type.
2745 Method string `json:"method,omitempty"`
2746 // Path: Optional. The path details for the Operation. Note: Even though this
2747 // field is optional, it is required for CreateApiOperation API and we will
2748 // fail the request if not provided.
2749 Path *GoogleCloudApihubV1Path `json:"path,omitempty"`
2750 // ForceSendFields is a list of field names (e.g. "Method") to unconditionally
2751 // include in API requests. By default, fields with empty or default values are
2752 // omitted from API requests. See
2753 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2754 // details.
2755 ForceSendFields []string `json:"-"`
2756 // NullFields is a list of field names (e.g. "Method") to include in API
2757 // requests with the JSON null value. By default, fields with empty values are
2758 // omitted from API requests. See
2759 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2760 NullFields []string `json:"-"`
2761 }
2762
2763 func (s GoogleCloudApihubV1HttpOperation) MarshalJSON() ([]byte, error) {
2764 type NoMethod GoogleCloudApihubV1HttpOperation
2765 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2766 }
2767
2768 // GoogleCloudApihubV1HttpOperationDetails: An HTTP-based API Operation,
2769 // sometimes called a "REST" Operation.
2770 type GoogleCloudApihubV1HttpOperationDetails struct {
2771 // HttpOperation: Required. An HTTP Operation.
2772 HttpOperation *GoogleCloudApihubV1HttpOperation `json:"httpOperation,omitempty"`
2773 // PathParams: Optional. Path params of HttpOperation
2774 PathParams []*GoogleCloudApihubV1PathParam `json:"pathParams,omitempty"`
2775 // QueryParams: Optional. Query params of HttpOperation
2776 QueryParams map[string]GoogleCloudApihubV1QueryParam `json:"queryParams,omitempty"`
2777 // Request: Optional. Request metadata.
2778 Request *GoogleCloudApihubV1HttpRequest `json:"request,omitempty"`
2779 // Response: Optional. Response metadata.
2780 Response *GoogleCloudApihubV1HttpResponse `json:"response,omitempty"`
2781 // ForceSendFields is a list of field names (e.g. "HttpOperation") to
2782 // unconditionally include in API requests. By default, fields with empty or
2783 // default values are omitted from API requests. See
2784 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2785 // details.
2786 ForceSendFields []string `json:"-"`
2787 // NullFields is a list of field names (e.g. "HttpOperation") to include in API
2788 // requests with the JSON null value. By default, fields with empty values are
2789 // omitted from API requests. See
2790 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2791 NullFields []string `json:"-"`
2792 }
2793
2794 func (s GoogleCloudApihubV1HttpOperationDetails) MarshalJSON() ([]byte, error) {
2795 type NoMethod GoogleCloudApihubV1HttpOperationDetails
2796 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2797 }
2798
2799 // GoogleCloudApihubV1HttpRequest: An aggregation of HTTP requests.
2800 type GoogleCloudApihubV1HttpRequest struct {
2801 // Headers: Optional. Unordered map from header name to header metadata
2802 Headers map[string]GoogleCloudApihubV1Header `json:"headers,omitempty"`
2803 // ForceSendFields is a list of field names (e.g. "Headers") to unconditionally
2804 // include in API requests. By default, fields with empty or default values are
2805 // omitted from API requests. See
2806 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2807 // details.
2808 ForceSendFields []string `json:"-"`
2809 // NullFields is a list of field names (e.g. "Headers") to include in API
2810 // requests with the JSON null value. By default, fields with empty values are
2811 // omitted from API requests. See
2812 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2813 NullFields []string `json:"-"`
2814 }
2815
2816 func (s GoogleCloudApihubV1HttpRequest) MarshalJSON() ([]byte, error) {
2817 type NoMethod GoogleCloudApihubV1HttpRequest
2818 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2819 }
2820
2821 // GoogleCloudApihubV1HttpResponse: An aggregation of HTTP responses.
2822 type GoogleCloudApihubV1HttpResponse struct {
2823 // Headers: Optional. Unordered map from header name to header metadata
2824 Headers map[string]GoogleCloudApihubV1Header `json:"headers,omitempty"`
2825 // ResponseCodes: Optional. Map of status code to observed count
2826 ResponseCodes map[string]string `json:"responseCodes,omitempty"`
2827 // ForceSendFields is a list of field names (e.g. "Headers") to unconditionally
2828 // include in API requests. By default, fields with empty or default values are
2829 // omitted from API requests. See
2830 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2831 // details.
2832 ForceSendFields []string `json:"-"`
2833 // NullFields is a list of field names (e.g. "Headers") to include in API
2834 // requests with the JSON null value. By default, fields with empty values are
2835 // omitted from API requests. See
2836 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2837 NullFields []string `json:"-"`
2838 }
2839
2840 func (s GoogleCloudApihubV1HttpResponse) MarshalJSON() ([]byte, error) {
2841 type NoMethod GoogleCloudApihubV1HttpResponse
2842 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2843 }
2844
2845 // GoogleCloudApihubV1Issue: Issue contains the details of a single issue found
2846 // by the linter.
2847 type GoogleCloudApihubV1Issue struct {
2848 // Code: Required. Rule code unique to each rule defined in linter.
2849 Code string `json:"code,omitempty"`
2850 // Message: Required. Human-readable message describing the issue found by the
2851 // linter.
2852 Message string `json:"message,omitempty"`
2853 // Path: Required. An array of strings indicating the location in the analyzed
2854 // document where the rule was triggered.
2855 Path []string `json:"path,omitempty"`
2856 // Range: Required. Object describing where in the file the issue was found.
2857 Range *GoogleCloudApihubV1Range `json:"range,omitempty"`
2858 // Severity: Required. Severity level of the rule violation.
2859 //
2860 // Possible values:
2861 // "SEVERITY_UNSPECIFIED" - Severity unspecified.
2862 // "SEVERITY_ERROR" - Severity error.
2863 // "SEVERITY_WARNING" - Severity warning.
2864 // "SEVERITY_INFO" - Severity info.
2865 // "SEVERITY_HINT" - Severity hint.
2866 Severity string `json:"severity,omitempty"`
2867 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2868 // include in API requests. By default, fields with empty or default values are
2869 // omitted from API requests. See
2870 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2871 // details.
2872 ForceSendFields []string `json:"-"`
2873 // NullFields is a list of field names (e.g. "Code") to include in API requests
2874 // with the JSON null value. By default, fields with empty values are omitted
2875 // from API requests. See
2876 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2877 NullFields []string `json:"-"`
2878 }
2879
2880 func (s GoogleCloudApihubV1Issue) MarshalJSON() ([]byte, error) {
2881 type NoMethod GoogleCloudApihubV1Issue
2882 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2883 }
2884
2885 // GoogleCloudApihubV1LastExecution: The result of the last execution of the
2886 // plugin instance.
2887 type GoogleCloudApihubV1LastExecution struct {
2888 // EndTime: Output only. The last execution end time of the plugin instance.
2889 EndTime string `json:"endTime,omitempty"`
2890 // ErrorMessage: Output only. Error message describing the failure, if any,
2891 // during the last execution.
2892 ErrorMessage string `json:"errorMessage,omitempty"`
2893 // Result: Output only. The result of the last execution of the plugin
2894 // instance.
2895 //
2896 // Possible values:
2897 // "RESULT_UNSPECIFIED" - Default unspecified execution result.
2898 // "SUCCEEDED" - The plugin instance executed successfully.
2899 // "FAILED" - The plugin instance execution failed.
2900 Result string `json:"result,omitempty"`
2901 // ResultMetadata: Output only. The result metadata of the last execution of
2902 // the plugin instance. This will be a string representation of a JSON object
2903 // and will be available on successful execution.
2904 ResultMetadata string `json:"resultMetadata,omitempty"`
2905 // StartTime: Output only. The last execution start time of the plugin
2906 // instance.
2907 StartTime string `json:"startTime,omitempty"`
2908 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
2909 // include in API requests. By default, fields with empty or default values are
2910 // omitted from API requests. See
2911 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2912 // details.
2913 ForceSendFields []string `json:"-"`
2914 // NullFields is a list of field names (e.g. "EndTime") to include in API
2915 // requests with the JSON null value. By default, fields with empty values are
2916 // omitted from API requests. See
2917 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2918 NullFields []string `json:"-"`
2919 }
2920
2921 func (s GoogleCloudApihubV1LastExecution) MarshalJSON() ([]byte, error) {
2922 type NoMethod GoogleCloudApihubV1LastExecution
2923 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2924 }
2925
2926 // GoogleCloudApihubV1LintResponse: LintResponse contains the response from the
2927 // linter.
2928 type GoogleCloudApihubV1LintResponse struct {
2929 // CreateTime: Required. Timestamp when the linting response was generated.
2930 CreateTime string `json:"createTime,omitempty"`
2931 // Issues: Optional. Array of issues found in the analyzed document.
2932 Issues []*GoogleCloudApihubV1Issue `json:"issues,omitempty"`
2933 // Linter: Required. Name of the linter used.
2934 //
2935 // Possible values:
2936 // "LINTER_UNSPECIFIED" - Linter type unspecified.
2937 // "SPECTRAL" - Linter type spectral.
2938 // "OTHER" - Linter type other.
2939 Linter string `json:"linter,omitempty"`
2940 // Source: Required. Name of the linting application.
2941 Source string `json:"source,omitempty"`
2942 // State: Required. Lint state represents success or failure for linting.
2943 //
2944 // Possible values:
2945 // "LINT_STATE_UNSPECIFIED" - Lint state unspecified.
2946 // "LINT_STATE_SUCCESS" - Linting was completed successfully.
2947 // "LINT_STATE_ERROR" - Linting encountered errors.
2948 State string `json:"state,omitempty"`
2949 // Summary: Optional. Summary of all issue types and counts for each severity
2950 // level.
2951 Summary []*GoogleCloudApihubV1SummaryEntry `json:"summary,omitempty"`
2952 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2953 // unconditionally include in API requests. By default, fields with empty or
2954 // default values are omitted from API requests. See
2955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2956 // details.
2957 ForceSendFields []string `json:"-"`
2958 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2959 // requests with the JSON null value. By default, fields with empty values are
2960 // omitted from API requests. See
2961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2962 NullFields []string `json:"-"`
2963 }
2964
2965 func (s GoogleCloudApihubV1LintResponse) MarshalJSON() ([]byte, error) {
2966 type NoMethod GoogleCloudApihubV1LintResponse
2967 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2968 }
2969
2970 // GoogleCloudApihubV1LintSpecRequest: The LintSpec method's request.
2971 type GoogleCloudApihubV1LintSpecRequest struct {
2972 }
2973
2974 // GoogleCloudApihubV1ListAddonsResponse: The ListAddons method's response.
2975 type GoogleCloudApihubV1ListAddonsResponse struct {
2976 // Addons: The list of addons.
2977 Addons []*GoogleCloudApihubV1Addon `json:"addons,omitempty"`
2978 // NextPageToken: A token to retrieve the next page of results, or empty if
2979 // there are no more results in the list.
2980 NextPageToken string `json:"nextPageToken,omitempty"`
2981
2982 // ServerResponse contains the HTTP response code and headers from the server.
2983 googleapi.ServerResponse `json:"-"`
2984 // ForceSendFields is a list of field names (e.g. "Addons") to unconditionally
2985 // include in API requests. By default, fields with empty or default values are
2986 // omitted from API requests. See
2987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2988 // details.
2989 ForceSendFields []string `json:"-"`
2990 // NullFields is a list of field names (e.g. "Addons") to include in API
2991 // requests with the JSON null value. By default, fields with empty values are
2992 // omitted from API requests. See
2993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2994 NullFields []string `json:"-"`
2995 }
2996
2997 func (s GoogleCloudApihubV1ListAddonsResponse) MarshalJSON() ([]byte, error) {
2998 type NoMethod GoogleCloudApihubV1ListAddonsResponse
2999 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3000 }
3001
3002 // GoogleCloudApihubV1ListApiOperationsResponse: The ListApiOperations method's
3003 // response.
3004 type GoogleCloudApihubV1ListApiOperationsResponse struct {
3005 // ApiOperations: The operations corresponding to an API version.
3006 ApiOperations []*GoogleCloudApihubV1ApiOperation `json:"apiOperations,omitempty"`
3007 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3008 // next page. If this field is omitted, there are no subsequent pages.
3009 NextPageToken string `json:"nextPageToken,omitempty"`
3010
3011 // ServerResponse contains the HTTP response code and headers from the server.
3012 googleapi.ServerResponse `json:"-"`
3013 // ForceSendFields is a list of field names (e.g. "ApiOperations") to
3014 // unconditionally include in API requests. By default, fields with empty or
3015 // default values are omitted from API requests. See
3016 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3017 // details.
3018 ForceSendFields []string `json:"-"`
3019 // NullFields is a list of field names (e.g. "ApiOperations") to include in API
3020 // requests with the JSON null value. By default, fields with empty values are
3021 // omitted from API requests. See
3022 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3023 NullFields []string `json:"-"`
3024 }
3025
3026 func (s GoogleCloudApihubV1ListApiOperationsResponse) MarshalJSON() ([]byte, error) {
3027 type NoMethod GoogleCloudApihubV1ListApiOperationsResponse
3028 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3029 }
3030
3031 // GoogleCloudApihubV1ListApisResponse: The ListApis method's response.
3032 type GoogleCloudApihubV1ListApisResponse struct {
3033 // Apis: The API resources present in the API hub.
3034 Apis []*GoogleCloudApihubV1Api `json:"apis,omitempty"`
3035 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3036 // next page. If this field is omitted, there are no subsequent pages.
3037 NextPageToken string `json:"nextPageToken,omitempty"`
3038
3039 // ServerResponse contains the HTTP response code and headers from the server.
3040 googleapi.ServerResponse `json:"-"`
3041 // ForceSendFields is a list of field names (e.g. "Apis") to unconditionally
3042 // include in API requests. By default, fields with empty or default values are
3043 // omitted from API requests. See
3044 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3045 // details.
3046 ForceSendFields []string `json:"-"`
3047 // NullFields is a list of field names (e.g. "Apis") to include in API requests
3048 // with the JSON null value. By default, fields with empty values are omitted
3049 // from API requests. See
3050 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3051 NullFields []string `json:"-"`
3052 }
3053
3054 func (s GoogleCloudApihubV1ListApisResponse) MarshalJSON() ([]byte, error) {
3055 type NoMethod GoogleCloudApihubV1ListApisResponse
3056 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3057 }
3058
3059 // GoogleCloudApihubV1ListAttributesResponse: The ListAttributes method's
3060 // response.
3061 type GoogleCloudApihubV1ListAttributesResponse struct {
3062 // Attributes: The list of all attributes.
3063 Attributes []*GoogleCloudApihubV1Attribute `json:"attributes,omitempty"`
3064 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3065 // next page. If this field is omitted, there are no subsequent pages.
3066 NextPageToken string `json:"nextPageToken,omitempty"`
3067
3068 // ServerResponse contains the HTTP response code and headers from the server.
3069 googleapi.ServerResponse `json:"-"`
3070 // ForceSendFields is a list of field names (e.g. "Attributes") to
3071 // unconditionally include in API requests. By default, fields with empty or
3072 // default values are omitted from API requests. See
3073 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3074 // details.
3075 ForceSendFields []string `json:"-"`
3076 // NullFields is a list of field names (e.g. "Attributes") to include in API
3077 // requests with the JSON null value. By default, fields with empty values are
3078 // omitted from API requests. See
3079 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3080 NullFields []string `json:"-"`
3081 }
3082
3083 func (s GoogleCloudApihubV1ListAttributesResponse) MarshalJSON() ([]byte, error) {
3084 type NoMethod GoogleCloudApihubV1ListAttributesResponse
3085 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3086 }
3087
3088 // GoogleCloudApihubV1ListCurationsResponse: The ListCurations method's
3089 // response.
3090 type GoogleCloudApihubV1ListCurationsResponse struct {
3091 // Curations: The curation resources present in the API hub.
3092 Curations []*GoogleCloudApihubV1Curation `json:"curations,omitempty"`
3093 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3094 // next page. If this field is omitted, there are no subsequent pages.
3095 NextPageToken string `json:"nextPageToken,omitempty"`
3096
3097 // ServerResponse contains the HTTP response code and headers from the server.
3098 googleapi.ServerResponse `json:"-"`
3099 // ForceSendFields is a list of field names (e.g. "Curations") to
3100 // unconditionally include in API requests. By default, fields with empty or
3101 // default values are omitted from API requests. See
3102 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3103 // details.
3104 ForceSendFields []string `json:"-"`
3105 // NullFields is a list of field names (e.g. "Curations") to include in API
3106 // requests with the JSON null value. By default, fields with empty values are
3107 // omitted from API requests. See
3108 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3109 NullFields []string `json:"-"`
3110 }
3111
3112 func (s GoogleCloudApihubV1ListCurationsResponse) MarshalJSON() ([]byte, error) {
3113 type NoMethod GoogleCloudApihubV1ListCurationsResponse
3114 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3115 }
3116
3117 // GoogleCloudApihubV1ListDependenciesResponse: The ListDependencies method's
3118 // response.
3119 type GoogleCloudApihubV1ListDependenciesResponse struct {
3120 // Dependencies: The dependency resources present in the API hub.
3121 Dependencies []*GoogleCloudApihubV1Dependency `json:"dependencies,omitempty"`
3122 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3123 // next page. If this field is omitted, there are no subsequent pages.
3124 NextPageToken string `json:"nextPageToken,omitempty"`
3125
3126 // ServerResponse contains the HTTP response code and headers from the server.
3127 googleapi.ServerResponse `json:"-"`
3128 // ForceSendFields is a list of field names (e.g. "Dependencies") to
3129 // unconditionally include in API requests. By default, fields with empty or
3130 // default values are omitted from API requests. See
3131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3132 // details.
3133 ForceSendFields []string `json:"-"`
3134 // NullFields is a list of field names (e.g. "Dependencies") to include in API
3135 // requests with the JSON null value. By default, fields with empty values are
3136 // omitted from API requests. See
3137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3138 NullFields []string `json:"-"`
3139 }
3140
3141 func (s GoogleCloudApihubV1ListDependenciesResponse) MarshalJSON() ([]byte, error) {
3142 type NoMethod GoogleCloudApihubV1ListDependenciesResponse
3143 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3144 }
3145
3146 // GoogleCloudApihubV1ListDeploymentsResponse: The ListDeployments method's
3147 // response.
3148 type GoogleCloudApihubV1ListDeploymentsResponse struct {
3149 // Deployments: The deployment resources present in the API hub.
3150 Deployments []*GoogleCloudApihubV1Deployment `json:"deployments,omitempty"`
3151 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3152 // next page. If this field is omitted, there are no subsequent pages.
3153 NextPageToken string `json:"nextPageToken,omitempty"`
3154
3155 // ServerResponse contains the HTTP response code and headers from the server.
3156 googleapi.ServerResponse `json:"-"`
3157 // ForceSendFields is a list of field names (e.g. "Deployments") to
3158 // unconditionally include in API requests. By default, fields with empty or
3159 // default values are omitted from API requests. See
3160 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3161 // details.
3162 ForceSendFields []string `json:"-"`
3163 // NullFields is a list of field names (e.g. "Deployments") to include in API
3164 // requests with the JSON null value. By default, fields with empty values are
3165 // omitted from API requests. See
3166 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3167 NullFields []string `json:"-"`
3168 }
3169
3170 func (s GoogleCloudApihubV1ListDeploymentsResponse) MarshalJSON() ([]byte, error) {
3171 type NoMethod GoogleCloudApihubV1ListDeploymentsResponse
3172 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3173 }
3174
3175 // GoogleCloudApihubV1ListDiscoveredApiObservationsResponse: Message for
3176 // response to listing DiscoveredApiObservations
3177 type GoogleCloudApihubV1ListDiscoveredApiObservationsResponse struct {
3178 // DiscoveredApiObservations: The DiscoveredApiObservation from the specified
3179 // project and location.
3180 DiscoveredApiObservations []*GoogleCloudApihubV1DiscoveredApiObservation `json:"discoveredApiObservations,omitempty"`
3181 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3182 // next page. If this field is omitted, there are no subsequent pages.
3183 NextPageToken string `json:"nextPageToken,omitempty"`
3184
3185 // ServerResponse contains the HTTP response code and headers from the server.
3186 googleapi.ServerResponse `json:"-"`
3187 // ForceSendFields is a list of field names (e.g. "DiscoveredApiObservations")
3188 // to unconditionally include in API requests. By default, fields with empty or
3189 // default values are omitted from API requests. See
3190 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3191 // details.
3192 ForceSendFields []string `json:"-"`
3193 // NullFields is a list of field names (e.g. "DiscoveredApiObservations") to
3194 // include in API requests with the JSON null value. By default, fields with
3195 // empty values are omitted from API requests. See
3196 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3197 NullFields []string `json:"-"`
3198 }
3199
3200 func (s GoogleCloudApihubV1ListDiscoveredApiObservationsResponse) MarshalJSON() ([]byte, error) {
3201 type NoMethod GoogleCloudApihubV1ListDiscoveredApiObservationsResponse
3202 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3203 }
3204
3205 // GoogleCloudApihubV1ListDiscoveredApiOperationsResponse: Message for response
3206 // to listing DiscoveredApiOperations
3207 type GoogleCloudApihubV1ListDiscoveredApiOperationsResponse struct {
3208 // DiscoveredApiOperations: The DiscoveredApiOperations from the specified
3209 // project, location and DiscoveredApiObservation.
3210 DiscoveredApiOperations []*GoogleCloudApihubV1DiscoveredApiOperation `json:"discoveredApiOperations,omitempty"`
3211 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3212 // next page. If this field is omitted, there are no subsequent pages.
3213 NextPageToken string `json:"nextPageToken,omitempty"`
3214
3215 // ServerResponse contains the HTTP response code and headers from the server.
3216 googleapi.ServerResponse `json:"-"`
3217 // ForceSendFields is a list of field names (e.g. "DiscoveredApiOperations") to
3218 // unconditionally include in API requests. By default, fields with empty or
3219 // default values are omitted from API requests. See
3220 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3221 // details.
3222 ForceSendFields []string `json:"-"`
3223 // NullFields is a list of field names (e.g. "DiscoveredApiOperations") to
3224 // include in API requests with the JSON null value. By default, fields with
3225 // empty values are omitted from API requests. See
3226 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3227 NullFields []string `json:"-"`
3228 }
3229
3230 func (s GoogleCloudApihubV1ListDiscoveredApiOperationsResponse) MarshalJSON() ([]byte, error) {
3231 type NoMethod GoogleCloudApihubV1ListDiscoveredApiOperationsResponse
3232 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3233 }
3234
3235 // GoogleCloudApihubV1ListExternalApisResponse: The ListExternalApis method's
3236 // response.
3237 type GoogleCloudApihubV1ListExternalApisResponse struct {
3238 // ExternalApis: The External API resources present in the API hub.
3239 ExternalApis []*GoogleCloudApihubV1ExternalApi `json:"externalApis,omitempty"`
3240 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3241 // next page. If this field is omitted, there are no subsequent pages.
3242 NextPageToken string `json:"nextPageToken,omitempty"`
3243
3244 // ServerResponse contains the HTTP response code and headers from the server.
3245 googleapi.ServerResponse `json:"-"`
3246 // ForceSendFields is a list of field names (e.g. "ExternalApis") to
3247 // unconditionally include in API requests. By default, fields with empty or
3248 // default values are omitted from API requests. See
3249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3250 // details.
3251 ForceSendFields []string `json:"-"`
3252 // NullFields is a list of field names (e.g. "ExternalApis") to include in API
3253 // requests with the JSON null value. By default, fields with empty values are
3254 // omitted from API requests. See
3255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3256 NullFields []string `json:"-"`
3257 }
3258
3259 func (s GoogleCloudApihubV1ListExternalApisResponse) MarshalJSON() ([]byte, error) {
3260 type NoMethod GoogleCloudApihubV1ListExternalApisResponse
3261 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3262 }
3263
3264 // GoogleCloudApihubV1ListHostProjectRegistrationsResponse: The
3265 // ListHostProjectRegistrations method's response.
3266 type GoogleCloudApihubV1ListHostProjectRegistrationsResponse struct {
3267 // HostProjectRegistrations: The list of host project registrations.
3268 HostProjectRegistrations []*GoogleCloudApihubV1HostProjectRegistration `json:"hostProjectRegistrations,omitempty"`
3269 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3270 // next page. If this field is omitted, there are no subsequent pages.
3271 NextPageToken string `json:"nextPageToken,omitempty"`
3272
3273 // ServerResponse contains the HTTP response code and headers from the server.
3274 googleapi.ServerResponse `json:"-"`
3275 // ForceSendFields is a list of field names (e.g. "HostProjectRegistrations")
3276 // to unconditionally include in API requests. By default, fields with empty or
3277 // default values are omitted from API requests. See
3278 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3279 // details.
3280 ForceSendFields []string `json:"-"`
3281 // NullFields is a list of field names (e.g. "HostProjectRegistrations") to
3282 // include in API requests with the JSON null value. By default, fields with
3283 // empty values are omitted from API requests. See
3284 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3285 NullFields []string `json:"-"`
3286 }
3287
3288 func (s GoogleCloudApihubV1ListHostProjectRegistrationsResponse) MarshalJSON() ([]byte, error) {
3289 type NoMethod GoogleCloudApihubV1ListHostProjectRegistrationsResponse
3290 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3291 }
3292
3293 // GoogleCloudApihubV1ListPluginInstancesResponse: The ListPluginInstances
3294 // method's response.
3295 type GoogleCloudApihubV1ListPluginInstancesResponse struct {
3296 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3297 // next page. If this field is omitted, there are no subsequent pages.
3298 NextPageToken string `json:"nextPageToken,omitempty"`
3299 // PluginInstances: The plugin instances from the specified parent resource.
3300 PluginInstances []*GoogleCloudApihubV1PluginInstance `json:"pluginInstances,omitempty"`
3301
3302 // ServerResponse contains the HTTP response code and headers from the server.
3303 googleapi.ServerResponse `json:"-"`
3304 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3305 // unconditionally include in API requests. By default, fields with empty or
3306 // default values are omitted from API requests. See
3307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3308 // details.
3309 ForceSendFields []string `json:"-"`
3310 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3311 // requests with the JSON null value. By default, fields with empty values are
3312 // omitted from API requests. See
3313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3314 NullFields []string `json:"-"`
3315 }
3316
3317 func (s GoogleCloudApihubV1ListPluginInstancesResponse) MarshalJSON() ([]byte, error) {
3318 type NoMethod GoogleCloudApihubV1ListPluginInstancesResponse
3319 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3320 }
3321
3322 // GoogleCloudApihubV1ListPluginsResponse: The ListPlugins method's response.
3323 type GoogleCloudApihubV1ListPluginsResponse struct {
3324 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3325 // next page. If this field is omitted, there are no subsequent pages.
3326 NextPageToken string `json:"nextPageToken,omitempty"`
3327 // Plugins: The plugins from the specified parent resource.
3328 Plugins []*GoogleCloudApihubV1Plugin `json:"plugins,omitempty"`
3329
3330 // ServerResponse contains the HTTP response code and headers from the server.
3331 googleapi.ServerResponse `json:"-"`
3332 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3333 // unconditionally include in API requests. By default, fields with empty or
3334 // default values are omitted from API requests. See
3335 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3336 // details.
3337 ForceSendFields []string `json:"-"`
3338 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3339 // requests with the JSON null value. By default, fields with empty values are
3340 // omitted from API requests. See
3341 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3342 NullFields []string `json:"-"`
3343 }
3344
3345 func (s GoogleCloudApihubV1ListPluginsResponse) MarshalJSON() ([]byte, error) {
3346 type NoMethod GoogleCloudApihubV1ListPluginsResponse
3347 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3348 }
3349
3350 // GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse: The
3351 // ListRuntimeProjectAttachments method's response.
3352 type GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse struct {
3353 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3354 // next page. If this field is omitted, there are no subsequent pages.
3355 NextPageToken string `json:"nextPageToken,omitempty"`
3356 // RuntimeProjectAttachments: List of runtime project attachments.
3357 RuntimeProjectAttachments []*GoogleCloudApihubV1RuntimeProjectAttachment `json:"runtimeProjectAttachments,omitempty"`
3358
3359 // ServerResponse contains the HTTP response code and headers from the server.
3360 googleapi.ServerResponse `json:"-"`
3361 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3362 // unconditionally include in API requests. By default, fields with empty or
3363 // default values are omitted from API requests. See
3364 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3365 // details.
3366 ForceSendFields []string `json:"-"`
3367 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3368 // requests with the JSON null value. By default, fields with empty values are
3369 // omitted from API requests. See
3370 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3371 NullFields []string `json:"-"`
3372 }
3373
3374 func (s GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse) MarshalJSON() ([]byte, error) {
3375 type NoMethod GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse
3376 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3377 }
3378
3379 // GoogleCloudApihubV1ListSpecsResponse: The ListSpecs method's response.
3380 type GoogleCloudApihubV1ListSpecsResponse struct {
3381 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3382 // next page. If this field is omitted, there are no subsequent pages.
3383 NextPageToken string `json:"nextPageToken,omitempty"`
3384 // Specs: The specs corresponding to an API Version.
3385 Specs []*GoogleCloudApihubV1Spec `json:"specs,omitempty"`
3386
3387 // ServerResponse contains the HTTP response code and headers from the server.
3388 googleapi.ServerResponse `json:"-"`
3389 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3390 // unconditionally include in API requests. By default, fields with empty or
3391 // default values are omitted from API requests. See
3392 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3393 // details.
3394 ForceSendFields []string `json:"-"`
3395 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3396 // requests with the JSON null value. By default, fields with empty values are
3397 // omitted from API requests. See
3398 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3399 NullFields []string `json:"-"`
3400 }
3401
3402 func (s GoogleCloudApihubV1ListSpecsResponse) MarshalJSON() ([]byte, error) {
3403 type NoMethod GoogleCloudApihubV1ListSpecsResponse
3404 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3405 }
3406
3407 // GoogleCloudApihubV1ListVersionsResponse: The ListVersions method's response.
3408 type GoogleCloudApihubV1ListVersionsResponse struct {
3409 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3410 // next page. If this field is omitted, there are no subsequent pages.
3411 NextPageToken string `json:"nextPageToken,omitempty"`
3412 // Versions: The versions corresponding to an API.
3413 Versions []*GoogleCloudApihubV1Version `json:"versions,omitempty"`
3414
3415 // ServerResponse contains the HTTP response code and headers from the server.
3416 googleapi.ServerResponse `json:"-"`
3417 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3418 // unconditionally include in API requests. By default, fields with empty or
3419 // default values are omitted from API requests. See
3420 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3421 // details.
3422 ForceSendFields []string `json:"-"`
3423 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3424 // requests with the JSON null value. By default, fields with empty values are
3425 // omitted from API requests. See
3426 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3427 NullFields []string `json:"-"`
3428 }
3429
3430 func (s GoogleCloudApihubV1ListVersionsResponse) MarshalJSON() ([]byte, error) {
3431 type NoMethod GoogleCloudApihubV1ListVersionsResponse
3432 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3433 }
3434
3435 // GoogleCloudApihubV1LookupApiHubInstanceResponse: The LookupApiHubInstance
3436 // method's response.`
3437 type GoogleCloudApihubV1LookupApiHubInstanceResponse struct {
3438 // ApiHubInstance: API Hub instance for a project if it exists, empty
3439 // otherwise.
3440 ApiHubInstance *GoogleCloudApihubV1ApiHubInstance `json:"apiHubInstance,omitempty"`
3441
3442 // ServerResponse contains the HTTP response code and headers from the server.
3443 googleapi.ServerResponse `json:"-"`
3444 // ForceSendFields is a list of field names (e.g. "ApiHubInstance") to
3445 // unconditionally include in API requests. By default, fields with empty or
3446 // default values are omitted from API requests. See
3447 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3448 // details.
3449 ForceSendFields []string `json:"-"`
3450 // NullFields is a list of field names (e.g. "ApiHubInstance") to include in
3451 // API requests with the JSON null value. By default, fields with empty values
3452 // are omitted from API requests. See
3453 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3454 NullFields []string `json:"-"`
3455 }
3456
3457 func (s GoogleCloudApihubV1LookupApiHubInstanceResponse) MarshalJSON() ([]byte, error) {
3458 type NoMethod GoogleCloudApihubV1LookupApiHubInstanceResponse
3459 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3460 }
3461
3462 // GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse: The
3463 // ListRuntimeProjectAttachments method's response.
3464 type GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse struct {
3465 // RuntimeProjectAttachment: Runtime project attachment for a project if
3466 // exists, empty otherwise.
3467 RuntimeProjectAttachment *GoogleCloudApihubV1RuntimeProjectAttachment `json:"runtimeProjectAttachment,omitempty"`
3468
3469 // ServerResponse contains the HTTP response code and headers from the server.
3470 googleapi.ServerResponse `json:"-"`
3471 // ForceSendFields is a list of field names (e.g. "RuntimeProjectAttachment")
3472 // to unconditionally include in API requests. By default, fields with empty or
3473 // default values are omitted from API requests. See
3474 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3475 // details.
3476 ForceSendFields []string `json:"-"`
3477 // NullFields is a list of field names (e.g. "RuntimeProjectAttachment") to
3478 // include in API requests with the JSON null value. By default, fields with
3479 // empty values are omitted from API requests. See
3480 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3481 NullFields []string `json:"-"`
3482 }
3483
3484 func (s GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse) MarshalJSON() ([]byte, error) {
3485 type NoMethod GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse
3486 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3487 }
3488
3489 // GoogleCloudApihubV1ManageAddonConfigRequest: The ManageAddonConfig method's
3490 // request.
3491 type GoogleCloudApihubV1ManageAddonConfigRequest struct {
3492 // Config: Required. The config of the addon to be managed. This config will
3493 // replace the config present in the addon. The type of the config should match
3494 // the config type already present in the addon.
3495 Config *GoogleCloudApihubV1AddonConfig `json:"config,omitempty"`
3496 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
3497 // include in API requests. By default, fields with empty or default values are
3498 // omitted from API requests. See
3499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3500 // details.
3501 ForceSendFields []string `json:"-"`
3502 // NullFields is a list of field names (e.g. "Config") to include in API
3503 // requests with the JSON null value. By default, fields with empty values are
3504 // omitted from API requests. See
3505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3506 NullFields []string `json:"-"`
3507 }
3508
3509 func (s GoogleCloudApihubV1ManageAddonConfigRequest) MarshalJSON() ([]byte, error) {
3510 type NoMethod GoogleCloudApihubV1ManageAddonConfigRequest
3511 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3512 }
3513
3514 // GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest: The
3515 // ManagePluginInstanceSourceData method's request.
3516 type GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest struct {
3517 // Action: Required. Action to be performed.
3518 //
3519 // Possible values:
3520 // "ACTION_UNSPECIFIED" - Default unspecified action.
3521 // "UPLOAD" - Upload or upsert data.
3522 // "DELETE" - Delete data.
3523 Action string `json:"action,omitempty"`
3524 // Data: Required. Data to be managed.
3525 Data string `json:"data,omitempty"`
3526 // DataType: Required. Type of data to be managed.
3527 //
3528 // Possible values:
3529 // "DATA_TYPE_UNSPECIFIED" - Default unspecified type.
3530 // "PROXY_DEPLOYMENT_MANIFEST" - Proxy deployment manifest.
3531 // "ENVIRONMENT_MANIFEST" - Environment manifest.
3532 // "PROXY_BUNDLE" - Proxy bundle.
3533 // "SHARED_FLOW_BUNDLE" - Shared flow bundle.
3534 DataType string `json:"dataType,omitempty"`
3535 // RelativePath: Required. Relative path of data being managed for a given
3536 // plugin instance.
3537 RelativePath string `json:"relativePath,omitempty"`
3538 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally
3539 // include in API requests. By default, fields with empty or default values are
3540 // omitted from API requests. See
3541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3542 // details.
3543 ForceSendFields []string `json:"-"`
3544 // NullFields is a list of field names (e.g. "Action") to include in API
3545 // requests with the JSON null value. By default, fields with empty values are
3546 // omitted from API requests. See
3547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3548 NullFields []string `json:"-"`
3549 }
3550
3551 func (s GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest) MarshalJSON() ([]byte, error) {
3552 type NoMethod GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest
3553 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3554 }
3555
3556 // GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse: The
3557 // ManagePluginInstanceSourceData method's response.
3558 type GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse struct {
3559 // ServerResponse contains the HTTP response code and headers from the server.
3560 googleapi.ServerResponse `json:"-"`
3561 }
3562
3563 // GoogleCloudApihubV1MatchResult: MatchResult represents the result of
3564 // matching a discovered API operation with a catalog API operation.
3565 type GoogleCloudApihubV1MatchResult struct {
3566 // Name: Output only. The name of the matched API Operation. Format:
3567 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operat
3568 // ions/{operation}`
3569 Name string `json:"name,omitempty"`
3570 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
3571 // include in API requests. By default, fields with empty or default values are
3572 // omitted from API requests. See
3573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3574 // details.
3575 ForceSendFields []string `json:"-"`
3576 // NullFields is a list of field names (e.g. "Name") to include in API requests
3577 // with the JSON null value. By default, fields with empty values are omitted
3578 // from API requests. See
3579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3580 NullFields []string `json:"-"`
3581 }
3582
3583 func (s GoogleCloudApihubV1MatchResult) MarshalJSON() ([]byte, error) {
3584 type NoMethod GoogleCloudApihubV1MatchResult
3585 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3586 }
3587
3588 // GoogleCloudApihubV1McpTool: Details describing an MCP Tool.
3589 type GoogleCloudApihubV1McpTool struct {
3590 // Annotations: Optional. Optional annotations for the tool.
3591 Annotations *GoogleCloudApihubV1ToolAnnotations `json:"annotations,omitempty"`
3592 // Description: Optional. Description of what the tool does.
3593 Description string `json:"description,omitempty"`
3594 // InputSchema: Optional. Input schema for the operation. This can be parsed
3595 // only from MCP schema type.
3596 InputSchema *GoogleCloudApihubV1OperationSchema `json:"inputSchema,omitempty"`
3597 // Name: Required. The name of the tool, unique within its parent scope
3598 // (version).
3599 Name string `json:"name,omitempty"`
3600 // OutputSchema: Optional. Output schema for the operation. This can be parsed
3601 // only from MCP schema type.
3602 OutputSchema *GoogleCloudApihubV1OperationSchema `json:"outputSchema,omitempty"`
3603 // Title: Optional. Optional title for the tool.
3604 Title string `json:"title,omitempty"`
3605 // ForceSendFields is a list of field names (e.g. "Annotations") to
3606 // unconditionally include in API requests. By default, fields with empty or
3607 // default values are omitted from API requests. See
3608 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3609 // details.
3610 ForceSendFields []string `json:"-"`
3611 // NullFields is a list of field names (e.g. "Annotations") to include in API
3612 // requests with the JSON null value. By default, fields with empty values are
3613 // omitted from API requests. See
3614 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3615 NullFields []string `json:"-"`
3616 }
3617
3618 func (s GoogleCloudApihubV1McpTool) MarshalJSON() ([]byte, error) {
3619 type NoMethod GoogleCloudApihubV1McpTool
3620 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3621 }
3622
3623 // GoogleCloudApihubV1MultiIntValues: The config variable value of data type
3624 // multi int.
3625 type GoogleCloudApihubV1MultiIntValues struct {
3626 // Values: Optional. The config variable value of data type multi int.
3627 Values []int64 `json:"values,omitempty"`
3628 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
3629 // include in API requests. By default, fields with empty or default values are
3630 // omitted from API requests. See
3631 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3632 // details.
3633 ForceSendFields []string `json:"-"`
3634 // NullFields is a list of field names (e.g. "Values") to include in API
3635 // requests with the JSON null value. By default, fields with empty values are
3636 // omitted from API requests. See
3637 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3638 NullFields []string `json:"-"`
3639 }
3640
3641 func (s GoogleCloudApihubV1MultiIntValues) MarshalJSON() ([]byte, error) {
3642 type NoMethod GoogleCloudApihubV1MultiIntValues
3643 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3644 }
3645
3646 // GoogleCloudApihubV1MultiSelectValues: The config variable value of data type
3647 // multi select.
3648 type GoogleCloudApihubV1MultiSelectValues struct {
3649 // Values: Optional. The config variable value of data type multi select.
3650 Values []*GoogleCloudApihubV1ConfigValueOption `json:"values,omitempty"`
3651 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
3652 // include in API requests. By default, fields with empty or default values are
3653 // omitted from API requests. See
3654 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3655 // details.
3656 ForceSendFields []string `json:"-"`
3657 // NullFields is a list of field names (e.g. "Values") to include in API
3658 // requests with the JSON null value. By default, fields with empty values are
3659 // omitted from API requests. See
3660 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3661 NullFields []string `json:"-"`
3662 }
3663
3664 func (s GoogleCloudApihubV1MultiSelectValues) MarshalJSON() ([]byte, error) {
3665 type NoMethod GoogleCloudApihubV1MultiSelectValues
3666 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3667 }
3668
3669 // GoogleCloudApihubV1MultiStringValues: The config variable value of data type
3670 // multi string.
3671 type GoogleCloudApihubV1MultiStringValues struct {
3672 // Values: Optional. The config variable value of data type multi string.
3673 Values []string `json:"values,omitempty"`
3674 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
3675 // include in API requests. By default, fields with empty or default values are
3676 // omitted from API requests. See
3677 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3678 // details.
3679 ForceSendFields []string `json:"-"`
3680 // NullFields is a list of field names (e.g. "Values") to include in API
3681 // requests with the JSON null value. By default, fields with empty values are
3682 // omitted from API requests. See
3683 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3684 NullFields []string `json:"-"`
3685 }
3686
3687 func (s GoogleCloudApihubV1MultiStringValues) MarshalJSON() ([]byte, error) {
3688 type NoMethod GoogleCloudApihubV1MultiStringValues
3689 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3690 }
3691
3692 // GoogleCloudApihubV1Oauth2ClientCredentialsConfig: Parameters to support
3693 // Oauth 2.0 client credentials grant authentication. See
3694 // https://tools.ietf.org/html/rfc6749#section-1.3.4 for more details.
3695 type GoogleCloudApihubV1Oauth2ClientCredentialsConfig struct {
3696 // ClientId: Required. The client identifier.
3697 ClientId string `json:"clientId,omitempty"`
3698 // ClientSecret: Required. Secret version reference containing the client
3699 // secret. The `secretmanager.versions.access` permission should be granted to
3700 // the service account accessing the secret.
3701 ClientSecret *GoogleCloudApihubV1Secret `json:"clientSecret,omitempty"`
3702 // ForceSendFields is a list of field names (e.g. "ClientId") to
3703 // unconditionally include in API requests. By default, fields with empty or
3704 // default values are omitted from API requests. See
3705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3706 // details.
3707 ForceSendFields []string `json:"-"`
3708 // NullFields is a list of field names (e.g. "ClientId") to include in API
3709 // requests with the JSON null value. By default, fields with empty values are
3710 // omitted from API requests. See
3711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3712 NullFields []string `json:"-"`
3713 }
3714
3715 func (s GoogleCloudApihubV1Oauth2ClientCredentialsConfig) MarshalJSON() ([]byte, error) {
3716 type NoMethod GoogleCloudApihubV1Oauth2ClientCredentialsConfig
3717 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3718 }
3719
3720 // GoogleCloudApihubV1OpenApiSpecDetails: OpenApiSpecDetails contains the
3721 // details parsed from an OpenAPI spec in addition to the fields mentioned in
3722 // SpecDetails.
3723 type GoogleCloudApihubV1OpenApiSpecDetails struct {
3724 // Format: Output only. The format of the spec.
3725 //
3726 // Possible values:
3727 // "FORMAT_UNSPECIFIED" - SpecFile type unspecified.
3728 // "OPEN_API_SPEC_2_0" - OpenAPI Spec v2.0.
3729 // "OPEN_API_SPEC_3_0" - OpenAPI Spec v3.0.
3730 // "OPEN_API_SPEC_3_1" - OpenAPI Spec v3.1.
3731 Format string `json:"format,omitempty"`
3732 // Owner: Output only. Owner details for the spec. This maps to `info.contact`
3733 // in OpenAPI spec.
3734 Owner *GoogleCloudApihubV1Owner `json:"owner,omitempty"`
3735 // Version: Output only. The version in the spec. This maps to `info.version`
3736 // in OpenAPI spec.
3737 Version string `json:"version,omitempty"`
3738 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally
3739 // include in API requests. By default, fields with empty or default values are
3740 // omitted from API requests. See
3741 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3742 // details.
3743 ForceSendFields []string `json:"-"`
3744 // NullFields is a list of field names (e.g. "Format") to include in API
3745 // requests with the JSON null value. By default, fields with empty values are
3746 // omitted from API requests. See
3747 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3748 NullFields []string `json:"-"`
3749 }
3750
3751 func (s GoogleCloudApihubV1OpenApiSpecDetails) MarshalJSON() ([]byte, error) {
3752 type NoMethod GoogleCloudApihubV1OpenApiSpecDetails
3753 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3754 }
3755
3756 // GoogleCloudApihubV1OperationDetails: The operation details parsed from the
3757 // spec.
3758 type GoogleCloudApihubV1OperationDetails struct {
3759 // Deprecated -- Optional. For OpenAPI spec, this will be set if
3760 // `operation.deprecated`is marked as `true` in the spec.
3761 Deprecated bool `json:"deprecated,omitempty"`
3762 // Description: Optional. Description of the operation behavior. For OpenAPI
3763 // spec, this will map to `operation.description` in the spec, in case
3764 // description is empty, `operation.summary` will be used.
3765 Description string `json:"description,omitempty"`
3766 // Documentation: Optional. Additional external documentation for this
3767 // operation. For OpenAPI spec, this will map to `operation.documentation` in
3768 // the spec.
3769 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
3770 // HttpOperation: The HTTP Operation.
3771 HttpOperation *GoogleCloudApihubV1HttpOperation `json:"httpOperation,omitempty"`
3772 // McpTool: The MCP Tool Operation.
3773 McpTool *GoogleCloudApihubV1McpTool `json:"mcpTool,omitempty"`
3774 // ForceSendFields is a list of field names (e.g. "Deprecated") to
3775 // unconditionally include in API requests. By default, fields with empty or
3776 // default values are omitted from API requests. See
3777 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3778 // details.
3779 ForceSendFields []string `json:"-"`
3780 // NullFields is a list of field names (e.g. "Deprecated") to include in API
3781 // requests with the JSON null value. By default, fields with empty values are
3782 // omitted from API requests. See
3783 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3784 NullFields []string `json:"-"`
3785 }
3786
3787 func (s GoogleCloudApihubV1OperationDetails) MarshalJSON() ([]byte, error) {
3788 type NoMethod GoogleCloudApihubV1OperationDetails
3789 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3790 }
3791
3792 // GoogleCloudApihubV1OperationMetadata: Represents the metadata of the
3793 // long-running operation.
3794 type GoogleCloudApihubV1OperationMetadata struct {
3795 // ApiVersion: Output only. API version used to start the operation.
3796 ApiVersion string `json:"apiVersion,omitempty"`
3797 // CreateTime: Output only. The time the operation was created.
3798 CreateTime string `json:"createTime,omitempty"`
3799 // EndTime: Output only. The time the operation finished running.
3800 EndTime string `json:"endTime,omitempty"`
3801 // RequestedCancellation: Output only. Identifies whether the user has
3802 // requested cancellation of the operation. Operations that have been cancelled
3803 // successfully have Operation.error value with a google.rpc.Status.code of 1,
3804 // corresponding to `Code.CANCELLED`.
3805 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
3806 // StatusMessage: Output only. Human-readable status of the operation, if any.
3807 StatusMessage string `json:"statusMessage,omitempty"`
3808 // Target: Output only. Server-defined resource path for the target of the
3809 // operation.
3810 Target string `json:"target,omitempty"`
3811 // Verb: Output only. Name of the verb executed by the operation.
3812 Verb string `json:"verb,omitempty"`
3813 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
3814 // unconditionally include in API requests. By default, fields with empty or
3815 // default values are omitted from API requests. See
3816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3817 // details.
3818 ForceSendFields []string `json:"-"`
3819 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
3820 // requests with the JSON null value. By default, fields with empty values are
3821 // omitted from API requests. See
3822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3823 NullFields []string `json:"-"`
3824 }
3825
3826 func (s GoogleCloudApihubV1OperationMetadata) MarshalJSON() ([]byte, error) {
3827 type NoMethod GoogleCloudApihubV1OperationMetadata
3828 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3829 }
3830
3831 // GoogleCloudApihubV1OperationSchema: The operation schema needed for an
3832 // operation.
3833 type GoogleCloudApihubV1OperationSchema struct {
3834 // JsonSchema: The JSON schema. Only valid JSON is accepted but semantic
3835 // validation of schema is not supported right now.
3836 JsonSchema googleapi.RawMessage `json:"jsonSchema,omitempty"`
3837 // ForceSendFields is a list of field names (e.g. "JsonSchema") to
3838 // unconditionally include in API requests. By default, fields with empty or
3839 // default values are omitted from API requests. See
3840 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3841 // details.
3842 ForceSendFields []string `json:"-"`
3843 // NullFields is a list of field names (e.g. "JsonSchema") to include in API
3844 // requests with the JSON null value. By default, fields with empty values are
3845 // omitted from API requests. See
3846 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3847 NullFields []string `json:"-"`
3848 }
3849
3850 func (s GoogleCloudApihubV1OperationSchema) MarshalJSON() ([]byte, error) {
3851 type NoMethod GoogleCloudApihubV1OperationSchema
3852 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3853 }
3854
3855 // GoogleCloudApihubV1Owner: Owner details.
3856 type GoogleCloudApihubV1Owner struct {
3857 // DisplayName: Optional. The name of the owner.
3858 DisplayName string `json:"displayName,omitempty"`
3859 // Email: Required. The email of the owner.
3860 Email string `json:"email,omitempty"`
3861 // ForceSendFields is a list of field names (e.g. "DisplayName") to
3862 // unconditionally include in API requests. By default, fields with empty or
3863 // default values are omitted from API requests. See
3864 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3865 // details.
3866 ForceSendFields []string `json:"-"`
3867 // NullFields is a list of field names (e.g. "DisplayName") to include in API
3868 // requests with the JSON null value. By default, fields with empty values are
3869 // omitted from API requests. See
3870 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3871 NullFields []string `json:"-"`
3872 }
3873
3874 func (s GoogleCloudApihubV1Owner) MarshalJSON() ([]byte, error) {
3875 type NoMethod GoogleCloudApihubV1Owner
3876 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3877 }
3878
3879 // GoogleCloudApihubV1Path: The path details derived from the spec.
3880 type GoogleCloudApihubV1Path struct {
3881 // Description: Optional. A short description for the path applicable to all
3882 // operations.
3883 Description string `json:"description,omitempty"`
3884 // Path: Optional. Complete path relative to server endpoint. Note: Even though
3885 // this field is optional, it is required for CreateApiOperation API and we
3886 // will fail the request if not provided.
3887 Path string `json:"path,omitempty"`
3888 // ForceSendFields is a list of field names (e.g. "Description") to
3889 // unconditionally include in API requests. By default, fields with empty or
3890 // default values are omitted from API requests. See
3891 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3892 // details.
3893 ForceSendFields []string `json:"-"`
3894 // NullFields is a list of field names (e.g. "Description") to include in API
3895 // requests with the JSON null value. By default, fields with empty values are
3896 // omitted from API requests. See
3897 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3898 NullFields []string `json:"-"`
3899 }
3900
3901 func (s GoogleCloudApihubV1Path) MarshalJSON() ([]byte, error) {
3902 type NoMethod GoogleCloudApihubV1Path
3903 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3904 }
3905
3906 // GoogleCloudApihubV1PathParam: HTTP Path parameter.
3907 type GoogleCloudApihubV1PathParam struct {
3908 // DataType: Optional. Data type of path param
3909 //
3910 // Possible values:
3911 // "DATA_TYPE_UNSPECIFIED" - Unspecified data type
3912 // "BOOL" - Boolean data type
3913 // "INTEGER" - Integer data type
3914 // "FLOAT" - Float data type
3915 // "STRING" - String data type
3916 // "UUID" - UUID data type
3917 DataType string `json:"dataType,omitempty"`
3918 // Position: Optional. Segment location in the path, 1-indexed
3919 Position int64 `json:"position,omitempty"`
3920 // ForceSendFields is a list of field names (e.g. "DataType") to
3921 // unconditionally include in API requests. By default, fields with empty or
3922 // default values are omitted from API requests. See
3923 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3924 // details.
3925 ForceSendFields []string `json:"-"`
3926 // NullFields is a list of field names (e.g. "DataType") to include in API
3927 // requests with the JSON null value. By default, fields with empty values are
3928 // omitted from API requests. See
3929 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3930 NullFields []string `json:"-"`
3931 }
3932
3933 func (s GoogleCloudApihubV1PathParam) MarshalJSON() ([]byte, error) {
3934 type NoMethod GoogleCloudApihubV1PathParam
3935 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3936 }
3937
3938 // GoogleCloudApihubV1Plugin: A plugin resource in the API Hub.
3939 type GoogleCloudApihubV1Plugin struct {
3940 // ActionsConfig: Optional. The configuration of actions supported by the
3941 // plugin. **REQUIRED**: This field must be provided when creating or updating
3942 // a Plugin. The server will reject requests if this field is missing.
3943 ActionsConfig []*GoogleCloudApihubV1PluginActionConfig `json:"actionsConfig,omitempty"`
3944 // ConfigTemplate: Optional. The configuration template for the plugin.
3945 ConfigTemplate *GoogleCloudApihubV1ConfigTemplate `json:"configTemplate,omitempty"`
3946 // CreateTime: Output only. Timestamp indicating when the plugin was created.
3947 CreateTime string `json:"createTime,omitempty"`
3948 // Description: Optional. The plugin description. Max length is 2000 characters
3949 // (Unicode code points).
3950 Description string `json:"description,omitempty"`
3951 // DisplayName: Required. The display name of the plugin. Max length is 50
3952 // characters (Unicode code points).
3953 DisplayName string `json:"displayName,omitempty"`
3954 // Documentation: Optional. The documentation of the plugin, that explains how
3955 // to set up and use the plugin.
3956 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
3957 // GatewayType: Optional. The type of the gateway.
3958 //
3959 // Possible values:
3960 // "GATEWAY_TYPE_UNSPECIFIED" - The gateway type is not specified.
3961 // "APIGEE_X_AND_HYBRID" - The gateway type is Apigee X and Hybrid.
3962 // "APIGEE_EDGE_PUBLIC_CLOUD" - The gateway type is Apigee Edge Public Cloud.
3963 // "APIGEE_EDGE_PRIVATE_CLOUD" - The gateway type is Apigee Edge Private
3964 // Cloud.
3965 // "CLOUD_API_GATEWAY" - The gateway type is Cloud API Gateway.
3966 // "CLOUD_ENDPOINTS" - The gateway type is Cloud Endpoints.
3967 // "API_DISCOVERY" - The gateway type is API Discovery.
3968 // "OTHERS" - The gateway type for any other types of gateways.
3969 GatewayType string `json:"gatewayType,omitempty"`
3970 // HostingService: Optional. This field is optional. It is used to notify the
3971 // plugin hosting service for any lifecycle changes of the plugin instance and
3972 // trigger execution of plugin instance actions in case of API hub managed
3973 // actions. This field should be provided if the plugin instance lifecycle of
3974 // the developed plugin needs to be managed from API hub. Also, in this case
3975 // the plugin hosting service interface needs to be implemented. This field
3976 // should not be provided if the plugin wants to manage plugin instance
3977 // lifecycle events outside of hub interface and use plugin framework for only
3978 // registering of plugin and plugin instances to capture the source of data
3979 // into hub. Note, in this case the plugin hosting service interface is not
3980 // required to be implemented. Also, the plugin instance lifecycle actions will
3981 // be disabled from API hub's UI.
3982 HostingService *GoogleCloudApihubV1HostingService `json:"hostingService,omitempty"`
3983 // Name: Identifier. The name of the plugin. Format:
3984 // `projects/{project}/locations/{location}/plugins/{plugin}`
3985 Name string `json:"name,omitempty"`
3986 // OwnershipType: Output only. The type of the plugin, indicating whether it is
3987 // 'SYSTEM_OWNED' or 'USER_OWNED'.
3988 //
3989 // Possible values:
3990 // "OWNERSHIP_TYPE_UNSPECIFIED" - Default unspecified type.
3991 // "SYSTEM_OWNED" - System owned plugins are defined by API hub and are
3992 // available out of the box in API hub.
3993 // "USER_OWNED" - User owned plugins are defined by the user and need to be
3994 // explicitly added to API hub via CreatePlugin method.
3995 OwnershipType string `json:"ownershipType,omitempty"`
3996 // PluginCategory: Optional. The category of the plugin, identifying its
3997 // primary category or purpose. This field is required for all plugins.
3998 //
3999 // Possible values:
4000 // "PLUGIN_CATEGORY_UNSPECIFIED" - Default unspecified plugin type.
4001 // "API_GATEWAY" - API_GATEWAY plugins represent plugins built for API
4002 // Gateways like Apigee.
4003 // "API_PRODUCER" - API_PRODUCER plugins represent plugins built for API
4004 // Producers like Cloud Run, Application Integration etc.
4005 PluginCategory string `json:"pluginCategory,omitempty"`
4006 // State: Output only. Represents the state of the plugin. Note this field will
4007 // not be set for plugins developed via plugin framework as the state will be
4008 // managed at plugin instance level.
4009 //
4010 // Possible values:
4011 // "STATE_UNSPECIFIED" - The default value. This value is used if the state
4012 // is omitted.
4013 // "ENABLED" - The plugin is enabled.
4014 // "DISABLED" - The plugin is disabled.
4015 State string `json:"state,omitempty"`
4016 // Type: Optional. The type of the API. This maps to the following system
4017 // defined attribute:
4018 // `projects/{project}/locations/{location}/attributes/system-plugin-type`
4019 // attribute. The number of allowed values for this attribute will be based on
4020 // the cardinality of the attribute. The same can be retrieved via GetAttribute
4021 // API. All values should be from the list of allowed values defined for the
4022 // attribute. Note this field is not required for plugins developed via plugin
4023 // framework.
4024 Type *GoogleCloudApihubV1AttributeValues `json:"type,omitempty"`
4025 // UpdateTime: Output only. Timestamp indicating when the plugin was last
4026 // updated.
4027 UpdateTime string `json:"updateTime,omitempty"`
4028
4029 // ServerResponse contains the HTTP response code and headers from the server.
4030 googleapi.ServerResponse `json:"-"`
4031 // ForceSendFields is a list of field names (e.g. "ActionsConfig") to
4032 // unconditionally include in API requests. By default, fields with empty or
4033 // default values are omitted from API requests. See
4034 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4035 // details.
4036 ForceSendFields []string `json:"-"`
4037 // NullFields is a list of field names (e.g. "ActionsConfig") to include in API
4038 // requests with the JSON null value. By default, fields with empty values are
4039 // omitted from API requests. See
4040 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4041 NullFields []string `json:"-"`
4042 }
4043
4044 func (s GoogleCloudApihubV1Plugin) MarshalJSON() ([]byte, error) {
4045 type NoMethod GoogleCloudApihubV1Plugin
4046 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4047 }
4048
4049 // GoogleCloudApihubV1PluginActionConfig: PluginActionConfig represents the
4050 // configuration of an action supported by a plugin.
4051 type GoogleCloudApihubV1PluginActionConfig struct {
4052 // Description: Required. The description of the operation performed by the
4053 // action.
4054 Description string `json:"description,omitempty"`
4055 // DisplayName: Required. The display name of the action.
4056 DisplayName string `json:"displayName,omitempty"`
4057 // Id: Required. The id of the action.
4058 Id string `json:"id,omitempty"`
4059 // TriggerMode: Required. The trigger mode supported by the action.
4060 //
4061 // Possible values:
4062 // "TRIGGER_MODE_UNSPECIFIED" - Default unspecified mode.
4063 // "API_HUB_ON_DEMAND_TRIGGER" - This action can be executed by invoking
4064 // ExecutePluginInstanceAction API with the given action id. To support this,
4065 // the plugin hosting service should handle this action id as part of execute
4066 // call.
4067 // "API_HUB_SCHEDULE_TRIGGER" - This action will be executed on schedule by
4068 // invoking ExecutePluginInstanceAction API with the given action id. To set
4069 // the schedule, the user can provide the cron expression in the PluginAction
4070 // field for a given plugin instance. To support this, the plugin hosting
4071 // service should handle this action id as part of execute call. Note, on
4072 // demand execution will be supported by default in this trigger mode.
4073 // "NON_API_HUB_MANAGED" - The execution of this plugin is not handled by API
4074 // hub. In this case, the plugin hosting service need not handle this action id
4075 // as part of the execute call.
4076 TriggerMode string `json:"triggerMode,omitempty"`
4077 // ForceSendFields is a list of field names (e.g. "Description") to
4078 // unconditionally include in API requests. By default, fields with empty or
4079 // default values are omitted from API requests. See
4080 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4081 // details.
4082 ForceSendFields []string `json:"-"`
4083 // NullFields is a list of field names (e.g. "Description") to include in API
4084 // requests with the JSON null value. By default, fields with empty values are
4085 // omitted from API requests. See
4086 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4087 NullFields []string `json:"-"`
4088 }
4089
4090 func (s GoogleCloudApihubV1PluginActionConfig) MarshalJSON() ([]byte, error) {
4091 type NoMethod GoogleCloudApihubV1PluginActionConfig
4092 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4093 }
4094
4095 // GoogleCloudApihubV1PluginInstance: Represents a plugin instance resource in
4096 // the API Hub. A PluginInstance is a specific instance of a hub plugin with
4097 // its own configuration, state, and execution details.
4098 type GoogleCloudApihubV1PluginInstance struct {
4099 // Actions: Required. The action status for the plugin instance.
4100 Actions []*GoogleCloudApihubV1PluginInstanceAction `json:"actions,omitempty"`
4101 // AdditionalConfig: Optional. The additional information for this plugin
4102 // instance corresponding to the additional config template of the plugin. This
4103 // information will be sent to plugin hosting service on each call to plugin
4104 // hosted service. The key will be the config_variable_template.display_name to
4105 // uniquely identify the config variable.
4106 AdditionalConfig map[string]GoogleCloudApihubV1ConfigVariable `json:"additionalConfig,omitempty"`
4107 // AuthConfig: Optional. The authentication information for this plugin
4108 // instance.
4109 AuthConfig *GoogleCloudApihubV1AuthConfig `json:"authConfig,omitempty"`
4110 // CreateTime: Output only. Timestamp indicating when the plugin instance was
4111 // created.
4112 CreateTime string `json:"createTime,omitempty"`
4113 // DisplayName: Required. The display name for this plugin instance. Max length
4114 // is 255 characters.
4115 DisplayName string `json:"displayName,omitempty"`
4116 // ErrorMessage: Output only. Error message describing the failure, if any,
4117 // during Create, Delete or ApplyConfig operation corresponding to the plugin
4118 // instance.This field will only be populated if the plugin instance is in the
4119 // ERROR or FAILED state.
4120 ErrorMessage string `json:"errorMessage,omitempty"`
4121 // Name: Identifier. The unique name of the plugin instance resource. Format:
4122 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance
4123 // }`
4124 Name string `json:"name,omitempty"`
4125 // SourceEnvironmentsConfig: Optional. The source environment's config present
4126 // in the gateway instance linked to the plugin instance. The key is the
4127 // `source_environment` name from the SourceEnvironment message.
4128 SourceEnvironmentsConfig map[string]GoogleCloudApihubV1SourceEnvironment `json:"sourceEnvironmentsConfig,omitempty"`
4129 // SourceProjectId: Optional. The source project id of the plugin instance.
4130 // This will be the id of runtime project in case of Google Cloud based plugins
4131 // and org id in case of non-Google Cloud based plugins. This field will be a
4132 // required field for Google provided on-ramp plugins.
4133 SourceProjectId string `json:"sourceProjectId,omitempty"`
4134 // State: Output only. The current state of the plugin instance (e.g., enabled,
4135 // disabled, provisioning).
4136 //
4137 // Possible values:
4138 // "STATE_UNSPECIFIED" - Default unspecified state.
4139 // "CREATING" - The plugin instance is being created.
4140 // "ACTIVE" - The plugin instance is active and ready for executions. This is
4141 // the only state where executions can run on the plugin instance.
4142 // "APPLYING_CONFIG" - The updated config that contains additional_config and
4143 // auth_config is being applied.
4144 // "ERROR" - The ERROR state can come while applying config. Users can
4145 // retrigger ApplyPluginInstanceConfig to restore the plugin instance back to
4146 // active state. Note, In case the ERROR state happens while applying config
4147 // (auth_config, additional_config), the plugin instance will reflect the
4148 // config which was trying to be applied while error happened. In order to
4149 // overwrite, trigger ApplyConfig with a new config.
4150 // "FAILED" - The plugin instance is in a failed state. This indicates that
4151 // an unrecoverable error occurred during a previous operation (Create,
4152 // Delete).
4153 // "DELETING" - The plugin instance is being deleted. Delete is only possible
4154 // if there is no other operation running on the plugin instance and plugin
4155 // instance action.
4156 State string `json:"state,omitempty"`
4157 // UpdateTime: Output only. Timestamp indicating when the plugin instance was
4158 // last updated.
4159 UpdateTime string `json:"updateTime,omitempty"`
4160
4161 // ServerResponse contains the HTTP response code and headers from the server.
4162 googleapi.ServerResponse `json:"-"`
4163 // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally
4164 // include in API requests. By default, fields with empty or default values are
4165 // omitted from API requests. See
4166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4167 // details.
4168 ForceSendFields []string `json:"-"`
4169 // NullFields is a list of field names (e.g. "Actions") to include in API
4170 // requests with the JSON null value. By default, fields with empty values are
4171 // omitted from API requests. See
4172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4173 NullFields []string `json:"-"`
4174 }
4175
4176 func (s GoogleCloudApihubV1PluginInstance) MarshalJSON() ([]byte, error) {
4177 type NoMethod GoogleCloudApihubV1PluginInstance
4178 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4179 }
4180
4181 // GoogleCloudApihubV1PluginInstanceAction: PluginInstanceAction represents an
4182 // action which can be executed in the plugin instance.
4183 type GoogleCloudApihubV1PluginInstanceAction struct {
4184 // ActionId: Required. This should map to one of the action id specified in
4185 // actions_config in the plugin.
4186 ActionId string `json:"actionId,omitempty"`
4187 // CurationConfig: Optional. This configuration should be provided if the
4188 // plugin action is publishing data to API hub curate layer.
4189 CurationConfig *GoogleCloudApihubV1CurationConfig `json:"curationConfig,omitempty"`
4190 // HubInstanceAction: Optional. The execution information for the plugin
4191 // instance action done corresponding to an API hub instance.
4192 HubInstanceAction *GoogleCloudApihubV1ExecutionStatus `json:"hubInstanceAction,omitempty"`
4193 // ResourceConfig: Output only. The configuration of resources created for a
4194 // given plugin instance action. Note these will be returned only in case of
4195 // non-Google Cloud plugins like OPDK.
4196 ResourceConfig *GoogleCloudApihubV1ResourceConfig `json:"resourceConfig,omitempty"`
4197 // ScheduleCronExpression: Optional. The schedule for this plugin instance
4198 // action. This can only be set if the plugin supports API_HUB_SCHEDULE_TRIGGER
4199 // mode for this action.
4200 ScheduleCronExpression string `json:"scheduleCronExpression,omitempty"`
4201 // ScheduleTimeZone: Optional. The time zone for the schedule cron expression.
4202 // If not provided, UTC will be used.
4203 ScheduleTimeZone string `json:"scheduleTimeZone,omitempty"`
4204 // ServiceAccount: Optional. The service account used to publish data. Note,
4205 // the service account will only be accepted for non-Google Cloud plugins like
4206 // OPDK.
4207 ServiceAccount string `json:"serviceAccount,omitempty"`
4208 // State: Output only. The current state of the plugin action in the plugin
4209 // instance.
4210 //
4211 // Possible values:
4212 // "STATE_UNSPECIFIED" - Default unspecified state.
4213 // "ENABLED" - The action is enabled in the plugin instance i.e., executions
4214 // can be triggered for this action.
4215 // "DISABLED" - The action is disabled in the plugin instance i.e., no
4216 // executions can be triggered for this action. This state indicates that the
4217 // user explicitly disabled the instance, and no further action is needed
4218 // unless the user wants to re-enable it.
4219 // "ENABLING" - The action in the plugin instance is being enabled.
4220 // "DISABLING" - The action in the plugin instance is being disabled.
4221 // "ERROR" - The ERROR state can come while enabling/disabling plugin
4222 // instance action. Users can retrigger enable, disable via
4223 // EnablePluginInstanceAction and DisablePluginInstanceAction to restore the
4224 // action back to enabled/disabled state. Note enable/disable on actions can
4225 // only be triggered if plugin instance is in Active state.
4226 State string `json:"state,omitempty"`
4227 // ForceSendFields is a list of field names (e.g. "ActionId") to
4228 // unconditionally include in API requests. By default, fields with empty or
4229 // default values are omitted from API requests. See
4230 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4231 // details.
4232 ForceSendFields []string `json:"-"`
4233 // NullFields is a list of field names (e.g. "ActionId") to include in API
4234 // requests with the JSON null value. By default, fields with empty values are
4235 // omitted from API requests. See
4236 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4237 NullFields []string `json:"-"`
4238 }
4239
4240 func (s GoogleCloudApihubV1PluginInstanceAction) MarshalJSON() ([]byte, error) {
4241 type NoMethod GoogleCloudApihubV1PluginInstanceAction
4242 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4243 }
4244
4245 // GoogleCloudApihubV1PluginInstanceActionID: The plugin instance and
4246 // associated action that is using the curation.
4247 type GoogleCloudApihubV1PluginInstanceActionID struct {
4248 // ActionId: Output only. The action ID that is using the curation. This should
4249 // map to one of the action IDs specified in action configs in the plugin.
4250 ActionId string `json:"actionId,omitempty"`
4251 // PluginInstance: Output only. Plugin instance that is using the curation.
4252 // Format is
4253 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance
4254 // }`
4255 PluginInstance string `json:"pluginInstance,omitempty"`
4256 // ForceSendFields is a list of field names (e.g. "ActionId") to
4257 // unconditionally include in API requests. By default, fields with empty or
4258 // default values are omitted from API requests. See
4259 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4260 // details.
4261 ForceSendFields []string `json:"-"`
4262 // NullFields is a list of field names (e.g. "ActionId") to include in API
4263 // requests with the JSON null value. By default, fields with empty values are
4264 // omitted from API requests. See
4265 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4266 NullFields []string `json:"-"`
4267 }
4268
4269 func (s GoogleCloudApihubV1PluginInstanceActionID) MarshalJSON() ([]byte, error) {
4270 type NoMethod GoogleCloudApihubV1PluginInstanceActionID
4271 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4272 }
4273
4274 // GoogleCloudApihubV1PluginInstanceActionSource: PluginInstanceActionSource
4275 // represents the plugin instance action source.
4276 type GoogleCloudApihubV1PluginInstanceActionSource struct {
4277 // ActionId: Output only. The id of the plugin instance action.
4278 ActionId string `json:"actionId,omitempty"`
4279 // PluginInstance: Output only. The resource name of the source plugin
4280 // instance. Format is
4281 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance
4282 // }`
4283 PluginInstance string `json:"pluginInstance,omitempty"`
4284 // ForceSendFields is a list of field names (e.g. "ActionId") to
4285 // unconditionally include in API requests. By default, fields with empty or
4286 // default values are omitted from API requests. See
4287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4288 // details.
4289 ForceSendFields []string `json:"-"`
4290 // NullFields is a list of field names (e.g. "ActionId") to include in API
4291 // requests with the JSON null value. By default, fields with empty values are
4292 // omitted from API requests. See
4293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4294 NullFields []string `json:"-"`
4295 }
4296
4297 func (s GoogleCloudApihubV1PluginInstanceActionSource) MarshalJSON() ([]byte, error) {
4298 type NoMethod GoogleCloudApihubV1PluginInstanceActionSource
4299 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4300 }
4301
4302 // GoogleCloudApihubV1Point: Point within the file (line and character).
4303 type GoogleCloudApihubV1Point struct {
4304 // Character: Required. Character position within the line (zero-indexed).
4305 Character int64 `json:"character,omitempty"`
4306 // Line: Required. Line number (zero-indexed).
4307 Line int64 `json:"line,omitempty"`
4308 // ForceSendFields is a list of field names (e.g. "Character") to
4309 // unconditionally include in API requests. By default, fields with empty or
4310 // default values are omitted from API requests. See
4311 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4312 // details.
4313 ForceSendFields []string `json:"-"`
4314 // NullFields is a list of field names (e.g. "Character") to include in API
4315 // requests with the JSON null value. By default, fields with empty values are
4316 // omitted from API requests. See
4317 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4318 NullFields []string `json:"-"`
4319 }
4320
4321 func (s GoogleCloudApihubV1Point) MarshalJSON() ([]byte, error) {
4322 type NoMethod GoogleCloudApihubV1Point
4323 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4324 }
4325
4326 // GoogleCloudApihubV1QueryParam: An aggregation of HTTP query parameter
4327 // occurrences.
4328 type GoogleCloudApihubV1QueryParam struct {
4329 // Count: Optional. The number of occurrences of this query parameter across
4330 // transactions.
4331 Count int64 `json:"count,omitempty,string"`
4332 // DataType: Optional. Data type of path param
4333 //
4334 // Possible values:
4335 // "DATA_TYPE_UNSPECIFIED" - Unspecified data type
4336 // "BOOL" - Boolean data type
4337 // "INTEGER" - Integer data type
4338 // "FLOAT" - Float data type
4339 // "STRING" - String data type
4340 // "UUID" - UUID data type
4341 DataType string `json:"dataType,omitempty"`
4342 // Name: Required. Name of query param
4343 Name string `json:"name,omitempty"`
4344 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
4345 // include in API requests. By default, fields with empty or default values are
4346 // omitted from API requests. See
4347 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4348 // details.
4349 ForceSendFields []string `json:"-"`
4350 // NullFields is a list of field names (e.g. "Count") to include in API
4351 // requests with the JSON null value. By default, fields with empty values are
4352 // omitted from API requests. See
4353 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4354 NullFields []string `json:"-"`
4355 }
4356
4357 func (s GoogleCloudApihubV1QueryParam) MarshalJSON() ([]byte, error) {
4358 type NoMethod GoogleCloudApihubV1QueryParam
4359 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4360 }
4361
4362 // GoogleCloudApihubV1Range: Object describing where in the file the issue was
4363 // found.
4364 type GoogleCloudApihubV1Range struct {
4365 // End: Required. End of the issue.
4366 End *GoogleCloudApihubV1Point `json:"end,omitempty"`
4367 // Start: Required. Start of the issue.
4368 Start *GoogleCloudApihubV1Point `json:"start,omitempty"`
4369 // ForceSendFields is a list of field names (e.g. "End") to unconditionally
4370 // include in API requests. By default, fields with empty or default values are
4371 // omitted from API requests. See
4372 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4373 // details.
4374 ForceSendFields []string `json:"-"`
4375 // NullFields is a list of field names (e.g. "End") to include in API requests
4376 // with the JSON null value. By default, fields with empty values are omitted
4377 // from API requests. See
4378 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4379 NullFields []string `json:"-"`
4380 }
4381
4382 func (s GoogleCloudApihubV1Range) MarshalJSON() ([]byte, error) {
4383 type NoMethod GoogleCloudApihubV1Range
4384 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4385 }
4386
4387 // GoogleCloudApihubV1ResourceConfig: The configuration of resources created
4388 // for a given plugin instance action.
4389 type GoogleCloudApihubV1ResourceConfig struct {
4390 // ActionType: Output only. The type of the action.
4391 //
4392 // Possible values:
4393 // "ACTION_TYPE_UNSPECIFIED" - Default unspecified action type.
4394 // "SYNC_METADATA" - Action type for sync metadata.
4395 // "SYNC_RUNTIME_DATA" - Action type for sync runtime data.
4396 ActionType string `json:"actionType,omitempty"`
4397 // PubsubTopic: Output only. The pubsub topic to publish the data to. Format is
4398 // projects/{project}/topics/{topic}
4399 PubsubTopic string `json:"pubsubTopic,omitempty"`
4400 // ForceSendFields is a list of field names (e.g. "ActionType") to
4401 // unconditionally include in API requests. By default, fields with empty or
4402 // default values are omitted from API requests. See
4403 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4404 // details.
4405 ForceSendFields []string `json:"-"`
4406 // NullFields is a list of field names (e.g. "ActionType") to include in API
4407 // requests with the JSON null value. By default, fields with empty values are
4408 // omitted from API requests. See
4409 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4410 NullFields []string `json:"-"`
4411 }
4412
4413 func (s GoogleCloudApihubV1ResourceConfig) MarshalJSON() ([]byte, error) {
4414 type NoMethod GoogleCloudApihubV1ResourceConfig
4415 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4416 }
4417
4418 // GoogleCloudApihubV1RetrieveApiViewsResponse: The RetrieveApiViews method's
4419 // response.
4420 type GoogleCloudApihubV1RetrieveApiViewsResponse struct {
4421 // ApiViews: Output only. The list of API views.
4422 ApiViews []*GoogleCloudApihubV1ApiView `json:"apiViews,omitempty"`
4423 // NextPageToken: Next page token.
4424 NextPageToken string `json:"nextPageToken,omitempty"`
4425
4426 // ServerResponse contains the HTTP response code and headers from the server.
4427 googleapi.ServerResponse `json:"-"`
4428 // ForceSendFields is a list of field names (e.g. "ApiViews") to
4429 // unconditionally include in API requests. By default, fields with empty or
4430 // default values are omitted from API requests. See
4431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4432 // details.
4433 ForceSendFields []string `json:"-"`
4434 // NullFields is a list of field names (e.g. "ApiViews") to include in API
4435 // requests with the JSON null value. By default, fields with empty values are
4436 // omitted from API requests. See
4437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4438 NullFields []string `json:"-"`
4439 }
4440
4441 func (s GoogleCloudApihubV1RetrieveApiViewsResponse) MarshalJSON() ([]byte, error) {
4442 type NoMethod GoogleCloudApihubV1RetrieveApiViewsResponse
4443 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4444 }
4445
4446 // GoogleCloudApihubV1RuntimeProjectAttachment: Runtime project attachment
4447 // represents an attachment from the runtime project to the host project. Api
4448 // Hub looks for deployments in the attached runtime projects and creates
4449 // corresponding resources in Api Hub for the discovered deployments.
4450 type GoogleCloudApihubV1RuntimeProjectAttachment struct {
4451 // CreateTime: Output only. Create time.
4452 CreateTime string `json:"createTime,omitempty"`
4453 // Name: Identifier. The resource name of a runtime project attachment. Format:
4454 // "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_p
4455 // roject_attachment}".
4456 Name string `json:"name,omitempty"`
4457 // RuntimeProject: Required. Immutable. Google cloud project name in the
4458 // format: "projects/abc" or "projects/123". As input, project name with either
4459 // project id or number are accepted. As output, this field will contain
4460 // project number.
4461 RuntimeProject string `json:"runtimeProject,omitempty"`
4462
4463 // ServerResponse contains the HTTP response code and headers from the server.
4464 googleapi.ServerResponse `json:"-"`
4465 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4466 // unconditionally include in API requests. By default, fields with empty or
4467 // default values are omitted from API requests. See
4468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4469 // details.
4470 ForceSendFields []string `json:"-"`
4471 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4472 // requests with the JSON null value. By default, fields with empty values are
4473 // omitted from API requests. See
4474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4475 NullFields []string `json:"-"`
4476 }
4477
4478 func (s GoogleCloudApihubV1RuntimeProjectAttachment) MarshalJSON() ([]byte, error) {
4479 type NoMethod GoogleCloudApihubV1RuntimeProjectAttachment
4480 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4481 }
4482
4483 // GoogleCloudApihubV1Schema: The schema details derived from the spec.
4484 // Currently, this entity is supported for OpenAPI spec only. For OpenAPI spec,
4485 // this maps to the schema defined in the `definitions` section for OpenAPI 2.0
4486 // version and in `components.schemas` section for OpenAPI 3.0 and 3.1 version.
4487 type GoogleCloudApihubV1Schema struct {
4488 // DisplayName: Output only. The display name of the schema. This will map to
4489 // the name of the schema in the spec.
4490 DisplayName string `json:"displayName,omitempty"`
4491 // RawValue: Output only. The raw value of the schema definition corresponding
4492 // to the schema name in the spec.
4493 RawValue string `json:"rawValue,omitempty"`
4494 // ForceSendFields is a list of field names (e.g. "DisplayName") to
4495 // unconditionally include in API requests. By default, fields with empty or
4496 // default values are omitted from API requests. See
4497 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4498 // details.
4499 ForceSendFields []string `json:"-"`
4500 // NullFields is a list of field names (e.g. "DisplayName") to include in API
4501 // requests with the JSON null value. By default, fields with empty values are
4502 // omitted from API requests. See
4503 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4504 NullFields []string `json:"-"`
4505 }
4506
4507 func (s GoogleCloudApihubV1Schema) MarshalJSON() ([]byte, error) {
4508 type NoMethod GoogleCloudApihubV1Schema
4509 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4510 }
4511
4512 // GoogleCloudApihubV1SearchResourcesRequest: The SearchResources method's
4513 // request.
4514 type GoogleCloudApihubV1SearchResourcesRequest struct {
4515 // Filter: Optional. An expression that filters the list of search results. A
4516 // filter expression consists of a field name, a comparison operator, and a
4517 // value for filtering. The value must be a string, a number, or a boolean. The
4518 // comparison operator must be `=`. Filters are not case sensitive. The
4519 // following field names are eligible for filtering: * `resource_type` - The
4520 // type of resource in the search results. Must be one of the following: `Api`,
4521 // `ApiOperation`, `Deployment`, `Definition`, `Spec` or `Version`. This field
4522 // can only be specified once in the filter. Here are is an example: *
4523 // `resource_type = Api` - The resource_type is _Api_.
4524 Filter string `json:"filter,omitempty"`
4525 // PageSize: Optional. The maximum number of search results to return. The
4526 // service may return fewer than this value. If unspecified at most 10 search
4527 // results will be returned. If value is negative then `INVALID_ARGUMENT` error
4528 // is returned. The maximum value is 25; values above 25 will be coerced to 25.
4529 // While paginating, you can specify a new page size parameter for each page of
4530 // search results to be listed.
4531 PageSize int64 `json:"pageSize,omitempty"`
4532 // PageToken: Optional. A page token, received from a previous SearchResources
4533 // call. Specify this parameter to retrieve the next page of transactions. When
4534 // paginating, you must specify the `page_token` parameter and all the other
4535 // parameters except page_size should be specified with the same value which
4536 // was used in the previous call. If the other fields are set with a different
4537 // value than the previous call then `INVALID_ARGUMENT` error is returned.
4538 PageToken string `json:"pageToken,omitempty"`
4539 // Query: Required. The free text search query. This query can contain keywords
4540 // which could be related to any detail of the API-Hub resources such display
4541 // names, descriptions, attributes etc.
4542 Query string `json:"query,omitempty"`
4543 // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
4544 // include in API requests. By default, fields with empty or default values are
4545 // omitted from API requests. See
4546 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4547 // details.
4548 ForceSendFields []string `json:"-"`
4549 // NullFields is a list of field names (e.g. "Filter") to include in API
4550 // requests with the JSON null value. By default, fields with empty values are
4551 // omitted from API requests. See
4552 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4553 NullFields []string `json:"-"`
4554 }
4555
4556 func (s GoogleCloudApihubV1SearchResourcesRequest) MarshalJSON() ([]byte, error) {
4557 type NoMethod GoogleCloudApihubV1SearchResourcesRequest
4558 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4559 }
4560
4561 // GoogleCloudApihubV1SearchResourcesResponse: Response for the SearchResources
4562 // method.
4563 type GoogleCloudApihubV1SearchResourcesResponse struct {
4564 // NextPageToken: Pass this token in the SearchResourcesRequest to continue to
4565 // list results. If all results have been returned, this field is an empty
4566 // string or not present in the response.
4567 NextPageToken string `json:"nextPageToken,omitempty"`
4568 // SearchResults: List of search results according to the filter and search
4569 // query specified. The order of search results represents the ranking.
4570 SearchResults []*GoogleCloudApihubV1SearchResult `json:"searchResults,omitempty"`
4571
4572 // ServerResponse contains the HTTP response code and headers from the server.
4573 googleapi.ServerResponse `json:"-"`
4574 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4575 // unconditionally include in API requests. By default, fields with empty or
4576 // default values are omitted from API requests. See
4577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4578 // details.
4579 ForceSendFields []string `json:"-"`
4580 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4581 // requests with the JSON null value. By default, fields with empty values are
4582 // omitted from API requests. See
4583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4584 NullFields []string `json:"-"`
4585 }
4586
4587 func (s GoogleCloudApihubV1SearchResourcesResponse) MarshalJSON() ([]byte, error) {
4588 type NoMethod GoogleCloudApihubV1SearchResourcesResponse
4589 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4590 }
4591
4592 // GoogleCloudApihubV1SearchResult: Represents the search results.
4593 type GoogleCloudApihubV1SearchResult struct {
4594 // Resource: This represents the ApiHubResource. Note: Only selected fields of
4595 // the resources are populated in response.
4596 Resource *GoogleCloudApihubV1ApiHubResource `json:"resource,omitempty"`
4597 // ForceSendFields is a list of field names (e.g. "Resource") to
4598 // unconditionally include in API requests. By default, fields with empty or
4599 // default values are omitted from API requests. See
4600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4601 // details.
4602 ForceSendFields []string `json:"-"`
4603 // NullFields is a list of field names (e.g. "Resource") to include in API
4604 // requests with the JSON null value. By default, fields with empty values are
4605 // omitted from API requests. See
4606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4607 NullFields []string `json:"-"`
4608 }
4609
4610 func (s GoogleCloudApihubV1SearchResult) MarshalJSON() ([]byte, error) {
4611 type NoMethod GoogleCloudApihubV1SearchResult
4612 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4613 }
4614
4615 // GoogleCloudApihubV1Secret: Secret provides a reference to entries in Secret
4616 // Manager.
4617 type GoogleCloudApihubV1Secret struct {
4618 // SecretVersion: Required. The resource name of the secret version in the
4619 // format, format as: `projects/*/secrets/*/versions/*`.
4620 SecretVersion string `json:"secretVersion,omitempty"`
4621 // ForceSendFields is a list of field names (e.g. "SecretVersion") to
4622 // unconditionally include in API requests. By default, fields with empty or
4623 // default values are omitted from API requests. See
4624 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4625 // details.
4626 ForceSendFields []string `json:"-"`
4627 // NullFields is a list of field names (e.g. "SecretVersion") to include in API
4628 // requests with the JSON null value. By default, fields with empty values are
4629 // omitted from API requests. See
4630 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4631 NullFields []string `json:"-"`
4632 }
4633
4634 func (s GoogleCloudApihubV1Secret) MarshalJSON() ([]byte, error) {
4635 type NoMethod GoogleCloudApihubV1Secret
4636 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4637 }
4638
4639 // GoogleCloudApihubV1SourceEnvironment: Message representing the source
4640 // environment details.
4641 type GoogleCloudApihubV1SourceEnvironment struct {
4642 // CreateTime: Optional. The time at which the environment was created at the
4643 // source.
4644 CreateTime string `json:"createTime,omitempty"`
4645 // SourceEnvironment: Required. The name of the environment at the source. This
4646 // should map to Deployment.
4647 SourceEnvironment string `json:"sourceEnvironment,omitempty"`
4648 // SourceEnvironmentUri: The location where additional information about source
4649 // environments can be found. The location should be relative path of the
4650 // environment manifest with respect to a plugin instance.
4651 SourceEnvironmentUri string `json:"sourceEnvironmentUri,omitempty"`
4652 // UpdateTime: Optional. The time at which the environment was last updated at
4653 // the source.
4654 UpdateTime string `json:"updateTime,omitempty"`
4655 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4656 // unconditionally include in API requests. By default, fields with empty or
4657 // default values are omitted from API requests. See
4658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4659 // details.
4660 ForceSendFields []string `json:"-"`
4661 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4662 // requests with the JSON null value. By default, fields with empty values are
4663 // omitted from API requests. See
4664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4665 NullFields []string `json:"-"`
4666 }
4667
4668 func (s GoogleCloudApihubV1SourceEnvironment) MarshalJSON() ([]byte, error) {
4669 type NoMethod GoogleCloudApihubV1SourceEnvironment
4670 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4671 }
4672
4673 // GoogleCloudApihubV1SourceMetadata: SourceMetadata represents the metadata
4674 // for a resource at the source.
4675 type GoogleCloudApihubV1SourceMetadata struct {
4676 // OriginalResourceCreateTime: Output only. The time at which the resource was
4677 // created at the source.
4678 OriginalResourceCreateTime string `json:"originalResourceCreateTime,omitempty"`
4679 // OriginalResourceId: Output only. The unique identifier of the resource at
4680 // the source.
4681 OriginalResourceId string `json:"originalResourceId,omitempty"`
4682 // OriginalResourceUpdateTime: Output only. The time at which the resource was
4683 // last updated at the source.
4684 OriginalResourceUpdateTime string `json:"originalResourceUpdateTime,omitempty"`
4685 // PluginInstanceActionSource: Output only. The source of the resource is a
4686 // plugin instance action.
4687 PluginInstanceActionSource *GoogleCloudApihubV1PluginInstanceActionSource `json:"pluginInstanceActionSource,omitempty"`
4688 // SourceType: Output only. The type of the source.
4689 //
4690 // Possible values:
4691 // "SOURCE_TYPE_UNSPECIFIED" - Source type not specified.
4692 // "PLUGIN" - Source type plugin.
4693 SourceType string `json:"sourceType,omitempty"`
4694 // ForceSendFields is a list of field names (e.g. "OriginalResourceCreateTime")
4695 // to unconditionally include in API requests. By default, fields with empty or
4696 // default values are omitted from API requests. See
4697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4698 // details.
4699 ForceSendFields []string `json:"-"`
4700 // NullFields is a list of field names (e.g. "OriginalResourceCreateTime") to
4701 // include in API requests with the JSON null value. By default, fields with
4702 // empty values are omitted from API requests. See
4703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4704 NullFields []string `json:"-"`
4705 }
4706
4707 func (s GoogleCloudApihubV1SourceMetadata) MarshalJSON() ([]byte, error) {
4708 type NoMethod GoogleCloudApihubV1SourceMetadata
4709 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4710 }
4711
4712 // GoogleCloudApihubV1Spec: Represents a spec associated with an API version in
4713 // the API Hub. Note that specs of various types can be uploaded, however
4714 // parsing of details is supported for OpenAPI spec currently.
4715 type GoogleCloudApihubV1Spec struct {
4716 // AdditionalSpecContents: Output only. The additional spec contents for the
4717 // spec.
4718 AdditionalSpecContents []*GoogleCloudApihubV1AdditionalSpecContent `json:"additionalSpecContents,omitempty"`
4719 // Attributes: Optional. The list of user defined attributes associated with
4720 // the spec. The key is the attribute name. It will be of the format:
4721 // `projects/{project}/locations/{location}/attributes/{attribute}`. The value
4722 // is the attribute values associated with the resource.
4723 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
4724 // Contents: Optional. Input only. The contents of the uploaded spec.
4725 Contents *GoogleCloudApihubV1SpecContents `json:"contents,omitempty"`
4726 // CreateTime: Output only. The time at which the spec was created.
4727 CreateTime string `json:"createTime,omitempty"`
4728 // Details: Output only. Details parsed from the spec.
4729 Details *GoogleCloudApihubV1SpecDetails `json:"details,omitempty"`
4730 // DisplayName: Required. The display name of the spec. This can contain the
4731 // file name of the spec.
4732 DisplayName string `json:"displayName,omitempty"`
4733 // Documentation: Optional. The documentation of the spec. For OpenAPI spec,
4734 // this will be populated from `externalDocs` in OpenAPI spec.
4735 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
4736 // LintResponse: Optional. The lint response for the spec.
4737 LintResponse *GoogleCloudApihubV1LintResponse `json:"lintResponse,omitempty"`
4738 // Name: Identifier. The name of the spec. Format:
4739 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/
4740 // {spec}`
4741 Name string `json:"name,omitempty"`
4742 // ParsingMode: Optional. Input only. Enum specifying the parsing mode for
4743 // OpenAPI Specification (OAS) parsing.
4744 //
4745 // Possible values:
4746 // "PARSING_MODE_UNSPECIFIED" - Defaults to `RELAXED`.
4747 // "RELAXED" - Parsing of the Spec on create and update is relaxed, meaning
4748 // that parsing errors the spec contents will not fail the API call.
4749 // "STRICT" - Parsing of the Spec on create and update is strict, meaning
4750 // that parsing errors in the spec contents will fail the API call.
4751 ParsingMode string `json:"parsingMode,omitempty"`
4752 // SourceMetadata: Output only. The list of sources and metadata from the
4753 // sources of the spec.
4754 SourceMetadata []*GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
4755 // SourceUri: Optional. The URI of the spec source in case file is uploaded
4756 // from an external version control system.
4757 SourceUri string `json:"sourceUri,omitempty"`
4758 // SpecType: Required. The type of spec. The value should be one of the allowed
4759 // values defined for
4760 // `projects/{project}/locations/{location}/attributes/system-spec-type`
4761 // attribute. The number of values for this attribute will be based on the
4762 // cardinality of the attribute. The same can be retrieved via GetAttribute
4763 // API. Note, this field is mandatory if content is provided.
4764 SpecType *GoogleCloudApihubV1AttributeValues `json:"specType,omitempty"`
4765 // UpdateTime: Output only. The time at which the spec was last updated.
4766 UpdateTime string `json:"updateTime,omitempty"`
4767
4768 // ServerResponse contains the HTTP response code and headers from the server.
4769 googleapi.ServerResponse `json:"-"`
4770 // ForceSendFields is a list of field names (e.g. "AdditionalSpecContents") to
4771 // unconditionally include in API requests. By default, fields with empty or
4772 // default values are omitted from API requests. See
4773 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4774 // details.
4775 ForceSendFields []string `json:"-"`
4776 // NullFields is a list of field names (e.g. "AdditionalSpecContents") to
4777 // include in API requests with the JSON null value. By default, fields with
4778 // empty values are omitted from API requests. See
4779 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4780 NullFields []string `json:"-"`
4781 }
4782
4783 func (s GoogleCloudApihubV1Spec) MarshalJSON() ([]byte, error) {
4784 type NoMethod GoogleCloudApihubV1Spec
4785 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4786 }
4787
4788 // GoogleCloudApihubV1SpecContents: The spec contents.
4789 type GoogleCloudApihubV1SpecContents struct {
4790 // Contents: Required. The contents of the spec.
4791 Contents string `json:"contents,omitempty"`
4792 // MimeType: Required. The mime type of the content for example
4793 // application/json, application/yaml, application/wsdl etc.
4794 MimeType string `json:"mimeType,omitempty"`
4795
4796 // ServerResponse contains the HTTP response code and headers from the server.
4797 googleapi.ServerResponse `json:"-"`
4798 // ForceSendFields is a list of field names (e.g. "Contents") to
4799 // unconditionally include in API requests. By default, fields with empty or
4800 // default values are omitted from API requests. See
4801 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4802 // details.
4803 ForceSendFields []string `json:"-"`
4804 // NullFields is a list of field names (e.g. "Contents") to include in API
4805 // requests with the JSON null value. By default, fields with empty values are
4806 // omitted from API requests. See
4807 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4808 NullFields []string `json:"-"`
4809 }
4810
4811 func (s GoogleCloudApihubV1SpecContents) MarshalJSON() ([]byte, error) {
4812 type NoMethod GoogleCloudApihubV1SpecContents
4813 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4814 }
4815
4816 // GoogleCloudApihubV1SpecDetails: SpecDetails contains the details parsed from
4817 // supported spec types.
4818 type GoogleCloudApihubV1SpecDetails struct {
4819 // Description: Output only. The description of the spec.
4820 Description string `json:"description,omitempty"`
4821 // OpenApiSpecDetails: Output only. Additional details apart from
4822 // `OperationDetails` parsed from an OpenAPI spec. The OperationDetails parsed
4823 // from the spec can be obtained by using ListAPIOperations method.
4824 OpenApiSpecDetails *GoogleCloudApihubV1OpenApiSpecDetails `json:"openApiSpecDetails,omitempty"`
4825 // ForceSendFields is a list of field names (e.g. "Description") to
4826 // unconditionally include in API requests. By default, fields with empty or
4827 // default values are omitted from API requests. See
4828 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4829 // details.
4830 ForceSendFields []string `json:"-"`
4831 // NullFields is a list of field names (e.g. "Description") to include in API
4832 // requests with the JSON null value. By default, fields with empty values are
4833 // omitted from API requests. See
4834 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4835 NullFields []string `json:"-"`
4836 }
4837
4838 func (s GoogleCloudApihubV1SpecDetails) MarshalJSON() ([]byte, error) {
4839 type NoMethod GoogleCloudApihubV1SpecDetails
4840 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4841 }
4842
4843 // GoogleCloudApihubV1SpecMetadata: The metadata associated with a spec of the
4844 // API version.
4845 type GoogleCloudApihubV1SpecMetadata struct {
4846 // OriginalCreateTime: Optional. Timestamp indicating when the spec was created
4847 // at the source.
4848 OriginalCreateTime string `json:"originalCreateTime,omitempty"`
4849 // OriginalId: Optional. The unique identifier of the spec in the system where
4850 // it was originally created.
4851 OriginalId string `json:"originalId,omitempty"`
4852 // OriginalUpdateTime: Required. Timestamp indicating when the spec was last
4853 // updated at the source.
4854 OriginalUpdateTime string `json:"originalUpdateTime,omitempty"`
4855 // Spec: Required. The spec resource to be pushed to Hub's collect layer. The
4856 // ID of the spec will be generated by Hub.
4857 Spec *GoogleCloudApihubV1Spec `json:"spec,omitempty"`
4858 // ForceSendFields is a list of field names (e.g. "OriginalCreateTime") to
4859 // unconditionally include in API requests. By default, fields with empty or
4860 // default values are omitted from API requests. See
4861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4862 // details.
4863 ForceSendFields []string `json:"-"`
4864 // NullFields is a list of field names (e.g. "OriginalCreateTime") to include
4865 // in API requests with the JSON null value. By default, fields with empty
4866 // values are omitted from API requests. See
4867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4868 NullFields []string `json:"-"`
4869 }
4870
4871 func (s GoogleCloudApihubV1SpecMetadata) MarshalJSON() ([]byte, error) {
4872 type NoMethod GoogleCloudApihubV1SpecMetadata
4873 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4874 }
4875
4876 // GoogleCloudApihubV1StringAttributeValues: The attribute values of data type
4877 // string or JSON.
4878 type GoogleCloudApihubV1StringAttributeValues struct {
4879 // Values: Required. The attribute values in case attribute data type is string
4880 // or JSON.
4881 Values []string `json:"values,omitempty"`
4882 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally
4883 // include in API requests. By default, fields with empty or default values are
4884 // omitted from API requests. See
4885 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4886 // details.
4887 ForceSendFields []string `json:"-"`
4888 // NullFields is a list of field names (e.g. "Values") to include in API
4889 // requests with the JSON null value. By default, fields with empty values are
4890 // omitted from API requests. See
4891 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4892 NullFields []string `json:"-"`
4893 }
4894
4895 func (s GoogleCloudApihubV1StringAttributeValues) MarshalJSON() ([]byte, error) {
4896 type NoMethod GoogleCloudApihubV1StringAttributeValues
4897 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4898 }
4899
4900 // GoogleCloudApihubV1StyleGuide: Represents a singleton style guide resource
4901 // to be used for linting Open API specs.
4902 type GoogleCloudApihubV1StyleGuide struct {
4903 // Contents: Required. Input only. The contents of the uploaded style guide.
4904 Contents *GoogleCloudApihubV1StyleGuideContents `json:"contents,omitempty"`
4905 // Linter: Required. Target linter for the style guide.
4906 //
4907 // Possible values:
4908 // "LINTER_UNSPECIFIED" - Linter type unspecified.
4909 // "SPECTRAL" - Linter type spectral.
4910 // "OTHER" - Linter type other.
4911 Linter string `json:"linter,omitempty"`
4912 // Name: Identifier. The name of the style guide. Format:
4913 // `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`
4914 Name string `json:"name,omitempty"`
4915
4916 // ServerResponse contains the HTTP response code and headers from the server.
4917 googleapi.ServerResponse `json:"-"`
4918 // ForceSendFields is a list of field names (e.g. "Contents") to
4919 // unconditionally include in API requests. By default, fields with empty or
4920 // default values are omitted from API requests. See
4921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4922 // details.
4923 ForceSendFields []string `json:"-"`
4924 // NullFields is a list of field names (e.g. "Contents") to include in API
4925 // requests with the JSON null value. By default, fields with empty values are
4926 // omitted from API requests. See
4927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4928 NullFields []string `json:"-"`
4929 }
4930
4931 func (s GoogleCloudApihubV1StyleGuide) MarshalJSON() ([]byte, error) {
4932 type NoMethod GoogleCloudApihubV1StyleGuide
4933 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4934 }
4935
4936 // GoogleCloudApihubV1StyleGuideContents: The style guide contents.
4937 type GoogleCloudApihubV1StyleGuideContents struct {
4938 // Contents: Required. The contents of the style guide.
4939 Contents string `json:"contents,omitempty"`
4940 // MimeType: Required. The mime type of the content.
4941 MimeType string `json:"mimeType,omitempty"`
4942
4943 // ServerResponse contains the HTTP response code and headers from the server.
4944 googleapi.ServerResponse `json:"-"`
4945 // ForceSendFields is a list of field names (e.g. "Contents") to
4946 // unconditionally include in API requests. By default, fields with empty or
4947 // default values are omitted from API requests. See
4948 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4949 // details.
4950 ForceSendFields []string `json:"-"`
4951 // NullFields is a list of field names (e.g. "Contents") to include in API
4952 // requests with the JSON null value. By default, fields with empty values are
4953 // omitted from API requests. See
4954 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4955 NullFields []string `json:"-"`
4956 }
4957
4958 func (s GoogleCloudApihubV1StyleGuideContents) MarshalJSON() ([]byte, error) {
4959 type NoMethod GoogleCloudApihubV1StyleGuideContents
4960 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4961 }
4962
4963 // GoogleCloudApihubV1SummaryEntry: Count of issues with a given severity.
4964 type GoogleCloudApihubV1SummaryEntry struct {
4965 // Count: Required. Count of issues with the given severity.
4966 Count int64 `json:"count,omitempty"`
4967 // Severity: Required. Severity of the issue.
4968 //
4969 // Possible values:
4970 // "SEVERITY_UNSPECIFIED" - Severity unspecified.
4971 // "SEVERITY_ERROR" - Severity error.
4972 // "SEVERITY_WARNING" - Severity warning.
4973 // "SEVERITY_INFO" - Severity info.
4974 // "SEVERITY_HINT" - Severity hint.
4975 Severity string `json:"severity,omitempty"`
4976 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
4977 // include in API requests. By default, fields with empty or default values are
4978 // omitted from API requests. See
4979 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4980 // details.
4981 ForceSendFields []string `json:"-"`
4982 // NullFields is a list of field names (e.g. "Count") to include in API
4983 // requests with the JSON null value. By default, fields with empty values are
4984 // omitted from API requests. See
4985 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4986 NullFields []string `json:"-"`
4987 }
4988
4989 func (s GoogleCloudApihubV1SummaryEntry) MarshalJSON() ([]byte, error) {
4990 type NoMethod GoogleCloudApihubV1SummaryEntry
4991 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4992 }
4993
4994 // GoogleCloudApihubV1ToolAnnotations: Annotations for a Tool.
4995 type GoogleCloudApihubV1ToolAnnotations struct {
4996 // AdditionalHints: Optional. Additional hints which may help tools and not
4997 // covered in defaults.
4998 AdditionalHints map[string]string `json:"additionalHints,omitempty"`
4999 // DestructiveHint: Optional. Hint indicating if the tool may have destructive
5000 // side effects.
5001 DestructiveHint bool `json:"destructiveHint,omitempty"`
5002 // IdempotentHint: Optional. Hint indicating if the tool is idempotent.
5003 IdempotentHint bool `json:"idempotentHint,omitempty"`
5004 // OpenWorldHint: Optional. Hint indicating if the tool interacts with the open
5005 // world (e.g., internet).
5006 OpenWorldHint bool `json:"openWorldHint,omitempty"`
5007 // ReadOnlyHint: Optional. Hint indicating if the tool is read-only.
5008 ReadOnlyHint bool `json:"readOnlyHint,omitempty"`
5009 // Title: Optional. A human-readable title for the tool (if different from
5010 // Tool.title).
5011 Title string `json:"title,omitempty"`
5012 // ForceSendFields is a list of field names (e.g. "AdditionalHints") to
5013 // unconditionally include in API requests. By default, fields with empty or
5014 // default values are omitted from API requests. See
5015 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5016 // details.
5017 ForceSendFields []string `json:"-"`
5018 // NullFields is a list of field names (e.g. "AdditionalHints") to include in
5019 // API requests with the JSON null value. By default, fields with empty values
5020 // are omitted from API requests. See
5021 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5022 NullFields []string `json:"-"`
5023 }
5024
5025 func (s GoogleCloudApihubV1ToolAnnotations) MarshalJSON() ([]byte, error) {
5026 type NoMethod GoogleCloudApihubV1ToolAnnotations
5027 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5028 }
5029
5030 // GoogleCloudApihubV1UserPasswordConfig: Parameters to support Username and
5031 // Password Authentication.
5032 type GoogleCloudApihubV1UserPasswordConfig struct {
5033 // Password: Required. Secret version reference containing the password. The
5034 // `secretmanager.versions.access` permission should be granted to the service
5035 // account accessing the secret.
5036 Password *GoogleCloudApihubV1Secret `json:"password,omitempty"`
5037 // Username: Required. Username.
5038 Username string `json:"username,omitempty"`
5039 // ForceSendFields is a list of field names (e.g. "Password") to
5040 // unconditionally include in API requests. By default, fields with empty or
5041 // default values are omitted from API requests. See
5042 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5043 // details.
5044 ForceSendFields []string `json:"-"`
5045 // NullFields is a list of field names (e.g. "Password") to include in API
5046 // requests with the JSON null value. By default, fields with empty values are
5047 // omitted from API requests. See
5048 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5049 NullFields []string `json:"-"`
5050 }
5051
5052 func (s GoogleCloudApihubV1UserPasswordConfig) MarshalJSON() ([]byte, error) {
5053 type NoMethod GoogleCloudApihubV1UserPasswordConfig
5054 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5055 }
5056
5057 // GoogleCloudApihubV1Version: Represents a version of the API resource in API
5058 // hub. This is also referred to as the API version.
5059 type GoogleCloudApihubV1Version struct {
5060 // Accreditation: Optional. The accreditations associated with the API version.
5061 // This maps to the following system defined attribute:
5062 // `projects/{project}/locations/{location}/attributes/system-accreditation`
5063 // attribute. The number of values for this attribute will be based on the
5064 // cardinality of the attribute. The same can be retrieved via GetAttribute
5065 // API. All values should be from the list of allowed values defined for the
5066 // attribute.
5067 Accreditation *GoogleCloudApihubV1AttributeValues `json:"accreditation,omitempty"`
5068 // ApiOperations: Output only. The operations contained in the API version.
5069 // These operations will be added to the version when a new spec is added or
5070 // when an existing spec is updated. Format is
5071 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operat
5072 // ions/{operation}`
5073 ApiOperations []string `json:"apiOperations,omitempty"`
5074 // Attributes: Optional. The list of user defined attributes associated with
5075 // the Version resource. The key is the attribute name. It will be of the
5076 // format: `projects/{project}/locations/{location}/attributes/{attribute}`.
5077 // The value is the attribute values associated with the resource.
5078 Attributes map[string]GoogleCloudApihubV1AttributeValues `json:"attributes,omitempty"`
5079 // Compliance: Optional. The compliance associated with the API version. This
5080 // maps to the following system defined attribute:
5081 // `projects/{project}/locations/{location}/attributes/system-compliance`
5082 // attribute. The number of values for this attribute will be based on the
5083 // cardinality of the attribute. The same can be retrieved via GetAttribute
5084 // API. All values should be from the list of allowed values defined for the
5085 // attribute.
5086 Compliance *GoogleCloudApihubV1AttributeValues `json:"compliance,omitempty"`
5087 // CreateTime: Output only. The time at which the version was created.
5088 CreateTime string `json:"createTime,omitempty"`
5089 // Definitions: Output only. The definitions contained in the API version.
5090 // These definitions will be added to the version when a new spec is added or
5091 // when an existing spec is updated. Format is
5092 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/defini
5093 // tions/{definition}`
5094 Definitions []string `json:"definitions,omitempty"`
5095 // Deployments: Optional. The deployments linked to this API version. Note: A
5096 // particular API version could be deployed to multiple deployments (for dev
5097 // deployment, UAT deployment, etc) Format is
5098 // `projects/{project}/locations/{location}/deployments/{deployment}`
5099 Deployments []string `json:"deployments,omitempty"`
5100 // Description: Optional. The description of the version.
5101 Description string `json:"description,omitempty"`
5102 // DisplayName: Required. The display name of the version.
5103 DisplayName string `json:"displayName,omitempty"`
5104 // Documentation: Optional. The documentation of the version.
5105 Documentation *GoogleCloudApihubV1Documentation `json:"documentation,omitempty"`
5106 // Lifecycle: Optional. The lifecycle of the API version. This maps to the
5107 // following system defined attribute:
5108 // `projects/{project}/locations/{location}/attributes/system-lifecycle`
5109 // attribute. The number of values for this attribute will be based on the
5110 // cardinality of the attribute. The same can be retrieved via GetAttribute
5111 // API. All values should be from the list of allowed values defined for the
5112 // attribute.
5113 Lifecycle *GoogleCloudApihubV1AttributeValues `json:"lifecycle,omitempty"`
5114 // Name: Identifier. The name of the version. Format:
5115 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
5116 Name string `json:"name,omitempty"`
5117 // SelectedDeployment: Optional. The selected deployment for a Version
5118 // resource. This can be used when special handling is needed on client side
5119 // for a particular deployment linked to the version. Format is
5120 // `projects/{project}/locations/{location}/deployments/{deployment}`
5121 SelectedDeployment string `json:"selectedDeployment,omitempty"`
5122 // SourceMetadata: Output only. The list of sources and metadata from the
5123 // sources of the version.
5124 SourceMetadata []*GoogleCloudApihubV1SourceMetadata `json:"sourceMetadata,omitempty"`
5125 // Specs: Output only. The specs associated with this version. Note that an API
5126 // version can be associated with multiple specs. Format is
5127 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/
5128 // {spec}`
5129 Specs []string `json:"specs,omitempty"`
5130 // UpdateTime: Output only. The time at which the version was last updated.
5131 UpdateTime string `json:"updateTime,omitempty"`
5132
5133 // ServerResponse contains the HTTP response code and headers from the server.
5134 googleapi.ServerResponse `json:"-"`
5135 // ForceSendFields is a list of field names (e.g. "Accreditation") to
5136 // unconditionally include in API requests. By default, fields with empty or
5137 // default values are omitted from API requests. See
5138 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5139 // details.
5140 ForceSendFields []string `json:"-"`
5141 // NullFields is a list of field names (e.g. "Accreditation") to include in API
5142 // requests with the JSON null value. By default, fields with empty values are
5143 // omitted from API requests. See
5144 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5145 NullFields []string `json:"-"`
5146 }
5147
5148 func (s GoogleCloudApihubV1Version) MarshalJSON() ([]byte, error) {
5149 type NoMethod GoogleCloudApihubV1Version
5150 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5151 }
5152
5153 // GoogleCloudApihubV1VersionMetadata: The metadata associated with a version
5154 // of the API resource.
5155 type GoogleCloudApihubV1VersionMetadata struct {
5156 // Deployments: Optional. The deployments linked to this API version. Note: A
5157 // particular API version could be deployed to multiple deployments (for dev
5158 // deployment, UAT deployment, etc.)
5159 Deployments []*GoogleCloudApihubV1DeploymentMetadata `json:"deployments,omitempty"`
5160 // OriginalCreateTime: Optional. Timestamp indicating when the version was
5161 // created at the source.
5162 OriginalCreateTime string `json:"originalCreateTime,omitempty"`
5163 // OriginalId: Optional. The unique identifier of the version in the system
5164 // where it was originally created.
5165 OriginalId string `json:"originalId,omitempty"`
5166 // OriginalUpdateTime: Required. Timestamp indicating when the version was last
5167 // updated at the source.
5168 OriginalUpdateTime string `json:"originalUpdateTime,omitempty"`
5169 // Specs: Optional. The specs associated with this version. Note that an API
5170 // version can be associated with multiple specs.
5171 Specs []*GoogleCloudApihubV1SpecMetadata `json:"specs,omitempty"`
5172 // Version: Required. Represents a version of the API resource in API hub. The
5173 // ID of the version will be generated by Hub.
5174 Version *GoogleCloudApihubV1Version `json:"version,omitempty"`
5175 // ForceSendFields is a list of field names (e.g. "Deployments") to
5176 // unconditionally include in API requests. By default, fields with empty or
5177 // default values are omitted from API requests. See
5178 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5179 // details.
5180 ForceSendFields []string `json:"-"`
5181 // NullFields is a list of field names (e.g. "Deployments") to include in API
5182 // requests with the JSON null value. By default, fields with empty values are
5183 // omitted from API requests. See
5184 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5185 NullFields []string `json:"-"`
5186 }
5187
5188 func (s GoogleCloudApihubV1VersionMetadata) MarshalJSON() ([]byte, error) {
5189 type NoMethod GoogleCloudApihubV1VersionMetadata
5190 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5191 }
5192
5193 // GoogleCloudCommonOperationMetadata: Represents the metadata of the
5194 // long-running operation.
5195 type GoogleCloudCommonOperationMetadata struct {
5196 // ApiVersion: Output only. API version used to start the operation.
5197 ApiVersion string `json:"apiVersion,omitempty"`
5198 // CancelRequested: Output only. Identifies whether the user has requested
5199 // cancellation of the operation. Operations that have been cancelled
5200 // successfully have google.longrunning.Operation.error value with a
5201 // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
5202 CancelRequested bool `json:"cancelRequested,omitempty"`
5203 // CreateTime: Output only. The time the operation was created.
5204 CreateTime string `json:"createTime,omitempty"`
5205 // EndTime: Output only. The time the operation finished running.
5206 EndTime string `json:"endTime,omitempty"`
5207 // StatusDetail: Output only. Human-readable status of the operation, if any.
5208 StatusDetail string `json:"statusDetail,omitempty"`
5209 // Target: Output only. Server-defined resource path for the target of the
5210 // operation.
5211 Target string `json:"target,omitempty"`
5212 // Verb: Output only. Name of the verb executed by the operation.
5213 Verb string `json:"verb,omitempty"`
5214 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
5215 // unconditionally include in API requests. By default, fields with empty or
5216 // default values are omitted from API requests. See
5217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5218 // details.
5219 ForceSendFields []string `json:"-"`
5220 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
5221 // requests with the JSON null value. By default, fields with empty values are
5222 // omitted from API requests. See
5223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5224 NullFields []string `json:"-"`
5225 }
5226
5227 func (s GoogleCloudCommonOperationMetadata) MarshalJSON() ([]byte, error) {
5228 type NoMethod GoogleCloudCommonOperationMetadata
5229 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5230 }
5231
5232 // GoogleCloudLocationListLocationsResponse: The response message for
5233 // Locations.ListLocations.
5234 type GoogleCloudLocationListLocationsResponse struct {
5235 // Locations: A list of locations that matches the specified filter in the
5236 // request.
5237 Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"`
5238 // NextPageToken: The standard List next-page token.
5239 NextPageToken string `json:"nextPageToken,omitempty"`
5240
5241 // ServerResponse contains the HTTP response code and headers from the server.
5242 googleapi.ServerResponse `json:"-"`
5243 // ForceSendFields is a list of field names (e.g. "Locations") to
5244 // unconditionally include in API requests. By default, fields with empty or
5245 // default values are omitted from API requests. See
5246 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5247 // details.
5248 ForceSendFields []string `json:"-"`
5249 // NullFields is a list of field names (e.g. "Locations") to include in API
5250 // requests with the JSON null value. By default, fields with empty values are
5251 // omitted from API requests. See
5252 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5253 NullFields []string `json:"-"`
5254 }
5255
5256 func (s GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) {
5257 type NoMethod GoogleCloudLocationListLocationsResponse
5258 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5259 }
5260
5261 // GoogleCloudLocationLocation: A resource that represents a Google Cloud
5262 // location.
5263 type GoogleCloudLocationLocation struct {
5264 // DisplayName: The friendly name for this location, typically a nearby city
5265 // name. For example, "Tokyo".
5266 DisplayName string `json:"displayName,omitempty"`
5267 // Labels: Cross-service attributes for the location. For example
5268 // {"cloud.googleapis.com/region": "us-east1"}
5269 Labels map[string]string `json:"labels,omitempty"`
5270 // LocationId: The canonical id for this location. For example: "us-east1".
5271 LocationId string `json:"locationId,omitempty"`
5272 // Metadata: Service-specific metadata. For example the available capacity at
5273 // the given location.
5274 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5275 // Name: Resource name for the location, which may vary between
5276 // implementations. For example:
5277 // "projects/example-project/locations/us-east1"
5278 Name string `json:"name,omitempty"`
5279
5280 // ServerResponse contains the HTTP response code and headers from the server.
5281 googleapi.ServerResponse `json:"-"`
5282 // ForceSendFields is a list of field names (e.g. "DisplayName") to
5283 // unconditionally include in API requests. By default, fields with empty or
5284 // default values are omitted from API requests. See
5285 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5286 // details.
5287 ForceSendFields []string `json:"-"`
5288 // NullFields is a list of field names (e.g. "DisplayName") to include in API
5289 // requests with the JSON null value. By default, fields with empty values are
5290 // omitted from API requests. See
5291 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5292 NullFields []string `json:"-"`
5293 }
5294
5295 func (s GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) {
5296 type NoMethod GoogleCloudLocationLocation
5297 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5298 }
5299
5300 // GoogleLongrunningCancelOperationRequest: The request message for
5301 // Operations.CancelOperation.
5302 type GoogleLongrunningCancelOperationRequest struct {
5303 }
5304
5305 // GoogleLongrunningListOperationsResponse: The response message for
5306 // Operations.ListOperations.
5307 type GoogleLongrunningListOperationsResponse struct {
5308 // NextPageToken: The standard List next-page token.
5309 NextPageToken string `json:"nextPageToken,omitempty"`
5310 // Operations: A list of operations that matches the specified filter in the
5311 // request.
5312 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
5313 // Unreachable: Unordered list. Unreachable resources. Populated when the
5314 // request sets `ListOperationsRequest.return_partial_success` and reads across
5315 // collections. For example, when attempting to list all resources across all
5316 // supported locations.
5317 Unreachable []string `json:"unreachable,omitempty"`
5318
5319 // ServerResponse contains the HTTP response code and headers from the server.
5320 googleapi.ServerResponse `json:"-"`
5321 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
5322 // unconditionally include in API requests. By default, fields with empty or
5323 // default values are omitted from API requests. See
5324 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5325 // details.
5326 ForceSendFields []string `json:"-"`
5327 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
5328 // requests with the JSON null value. By default, fields with empty values are
5329 // omitted from API requests. See
5330 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5331 NullFields []string `json:"-"`
5332 }
5333
5334 func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
5335 type NoMethod GoogleLongrunningListOperationsResponse
5336 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5337 }
5338
5339 // GoogleLongrunningOperation: This resource represents a long-running
5340 // operation that is the result of a network API call.
5341 type GoogleLongrunningOperation struct {
5342 // Done: If the value is `false`, it means the operation is still in progress.
5343 // If `true`, the operation is completed, and either `error` or `response` is
5344 // available.
5345 Done bool `json:"done,omitempty"`
5346 // Error: The error result of the operation in case of failure or cancellation.
5347 Error *GoogleRpcStatus `json:"error,omitempty"`
5348 // Metadata: Service-specific metadata associated with the operation. It
5349 // typically contains progress information and common metadata such as create
5350 // time. Some services might not provide such metadata. Any method that returns
5351 // a long-running operation should document the metadata type, if any.
5352 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5353 // Name: The server-assigned name, which is only unique within the same service
5354 // that originally returns it. If you use the default HTTP mapping, the `name`
5355 // should be a resource name ending with `operations/{unique_id}`.
5356 Name string `json:"name,omitempty"`
5357 // Response: The normal, successful response of the operation. If the original
5358 // method returns no data on success, such as `Delete`, the response is
5359 // `google.protobuf.Empty`. If the original method is standard
5360 // `Get`/`Create`/`Update`, the response should be the resource. For other
5361 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
5362 // original method name. For example, if the original method name is
5363 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
5364 Response googleapi.RawMessage `json:"response,omitempty"`
5365
5366 // ServerResponse contains the HTTP response code and headers from the server.
5367 googleapi.ServerResponse `json:"-"`
5368 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
5369 // include in API requests. By default, fields with empty or default values are
5370 // omitted from API requests. See
5371 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5372 // details.
5373 ForceSendFields []string `json:"-"`
5374 // NullFields is a list of field names (e.g. "Done") to include in API requests
5375 // with the JSON null value. By default, fields with empty values are omitted
5376 // from API requests. See
5377 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5378 NullFields []string `json:"-"`
5379 }
5380
5381 func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
5382 type NoMethod GoogleLongrunningOperation
5383 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5384 }
5385
5386 // GoogleRpcStatus: The `Status` type defines a logical error model that is
5387 // suitable for different programming environments, including REST APIs and RPC
5388 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
5389 // contains three pieces of data: error code, error message, and error details.
5390 // You can find out more about this error model and how to work with it in the
5391 // API Design Guide (https://cloud.google.com/apis/design/errors).
5392 type GoogleRpcStatus struct {
5393 // Code: The status code, which should be an enum value of google.rpc.Code.
5394 Code int64 `json:"code,omitempty"`
5395 // Details: A list of messages that carry the error details. There is a common
5396 // set of message types for APIs to use.
5397 Details []googleapi.RawMessage `json:"details,omitempty"`
5398 // Message: A developer-facing error message, which should be in English. Any
5399 // user-facing error message should be localized and sent in the
5400 // google.rpc.Status.details field, or localized by the client.
5401 Message string `json:"message,omitempty"`
5402 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5403 // include in API requests. By default, fields with empty or default values are
5404 // omitted from API requests. See
5405 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5406 // details.
5407 ForceSendFields []string `json:"-"`
5408 // NullFields is a list of field names (e.g. "Code") to include in API requests
5409 // with the JSON null value. By default, fields with empty values are omitted
5410 // from API requests. See
5411 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5412 NullFields []string `json:"-"`
5413 }
5414
5415 func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) {
5416 type NoMethod GoogleRpcStatus
5417 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5418 }
5419
5420 type ProjectsLocationsCollectApiDataCall struct {
5421 s *Service
5422 location string
5423 googlecloudapihubv1collectapidatarequest *GoogleCloudApihubV1CollectApiDataRequest
5424 urlParams_ gensupport.URLParams
5425 ctx_ context.Context
5426 header_ http.Header
5427 }
5428
5429 // CollectApiData: Collect API data from a source and push it to Hub's collect
5430 // layer.
5431 //
5432 // - location: The regional location of the API hub instance and its resources.
5433 // Format: `projects/{project}/locations/{location}`.
5434 func (r *ProjectsLocationsService) CollectApiData(location string, googlecloudapihubv1collectapidatarequest *GoogleCloudApihubV1CollectApiDataRequest) *ProjectsLocationsCollectApiDataCall {
5435 c := &ProjectsLocationsCollectApiDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5436 c.location = location
5437 c.googlecloudapihubv1collectapidatarequest = googlecloudapihubv1collectapidatarequest
5438 return c
5439 }
5440
5441 // Fields allows partial responses to be retrieved. See
5442 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5443 // details.
5444 func (c *ProjectsLocationsCollectApiDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectApiDataCall {
5445 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5446 return c
5447 }
5448
5449 // Context sets the context to be used in this call's Do method.
5450 func (c *ProjectsLocationsCollectApiDataCall) Context(ctx context.Context) *ProjectsLocationsCollectApiDataCall {
5451 c.ctx_ = ctx
5452 return c
5453 }
5454
5455 // Header returns a http.Header that can be modified by the caller to add
5456 // headers to the request.
5457 func (c *ProjectsLocationsCollectApiDataCall) Header() http.Header {
5458 if c.header_ == nil {
5459 c.header_ = make(http.Header)
5460 }
5461 return c.header_
5462 }
5463
5464 func (c *ProjectsLocationsCollectApiDataCall) doRequest(alt string) (*http.Response, error) {
5465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5466 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1collectapidatarequest)
5467 if err != nil {
5468 return nil, err
5469 }
5470 c.urlParams_.Set("alt", alt)
5471 c.urlParams_.Set("prettyPrint", "false")
5472 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:collectApiData")
5473 urls += "?" + c.urlParams_.Encode()
5474 req, err := http.NewRequest("POST", urls, body)
5475 if err != nil {
5476 return nil, err
5477 }
5478 req.Header = reqHeaders
5479 googleapi.Expand(req.URL, map[string]string{
5480 "location": c.location,
5481 })
5482 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.collectApiData", "request", internallog.HTTPRequest(req, body.Bytes()))
5483 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5484 }
5485
5486 // Do executes the "apihub.projects.locations.collectApiData" call.
5487 // Any non-2xx status code is an error. Response headers are in either
5488 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
5489 // returned at all) in error.(*googleapi.Error).Header. Use
5490 // googleapi.IsNotModified to check whether the returned error was because
5491 // http.StatusNotModified was returned.
5492 func (c *ProjectsLocationsCollectApiDataCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5493 gensupport.SetOptions(c.urlParams_, opts...)
5494 res, err := c.doRequest("json")
5495 if res != nil && res.StatusCode == http.StatusNotModified {
5496 if res.Body != nil {
5497 res.Body.Close()
5498 }
5499 return nil, gensupport.WrapError(&googleapi.Error{
5500 Code: res.StatusCode,
5501 Header: res.Header,
5502 })
5503 }
5504 if err != nil {
5505 return nil, err
5506 }
5507 defer googleapi.CloseBody(res)
5508 if err := googleapi.CheckResponse(res); err != nil {
5509 return nil, gensupport.WrapError(err)
5510 }
5511 ret := &GoogleLongrunningOperation{
5512 ServerResponse: googleapi.ServerResponse{
5513 Header: res.Header,
5514 HTTPStatusCode: res.StatusCode,
5515 },
5516 }
5517 target := &ret
5518 b, err := gensupport.DecodeResponseBytes(target, res)
5519 if err != nil {
5520 return nil, err
5521 }
5522 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.collectApiData", "response", internallog.HTTPResponse(res, b))
5523 return ret, nil
5524 }
5525
5526 type ProjectsLocationsGetCall struct {
5527 s *Service
5528 name string
5529 urlParams_ gensupport.URLParams
5530 ifNoneMatch_ string
5531 ctx_ context.Context
5532 header_ http.Header
5533 }
5534
5535 // Get: Gets information about a location.
5536 //
5537 // - name: Resource name for the location.
5538 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
5539 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5540 c.name = name
5541 return c
5542 }
5543
5544 // Fields allows partial responses to be retrieved. See
5545 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5546 // details.
5547 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
5548 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5549 return c
5550 }
5551
5552 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5553 // object's ETag matches the given value. This is useful for getting updates
5554 // only after the object has changed since the last request.
5555 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
5556 c.ifNoneMatch_ = entityTag
5557 return c
5558 }
5559
5560 // Context sets the context to be used in this call's Do method.
5561 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
5562 c.ctx_ = ctx
5563 return c
5564 }
5565
5566 // Header returns a http.Header that can be modified by the caller to add
5567 // headers to the request.
5568 func (c *ProjectsLocationsGetCall) Header() http.Header {
5569 if c.header_ == nil {
5570 c.header_ = make(http.Header)
5571 }
5572 return c.header_
5573 }
5574
5575 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
5576 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5577 if c.ifNoneMatch_ != "" {
5578 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5579 }
5580 c.urlParams_.Set("alt", alt)
5581 c.urlParams_.Set("prettyPrint", "false")
5582 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5583 urls += "?" + c.urlParams_.Encode()
5584 req, err := http.NewRequest("GET", urls, nil)
5585 if err != nil {
5586 return nil, err
5587 }
5588 req.Header = reqHeaders
5589 googleapi.Expand(req.URL, map[string]string{
5590 "name": c.name,
5591 })
5592 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
5593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5594 }
5595
5596 // Do executes the "apihub.projects.locations.get" call.
5597 // Any non-2xx status code is an error. Response headers are in either
5598 // *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was
5599 // returned at all) in error.(*googleapi.Error).Header. Use
5600 // googleapi.IsNotModified to check whether the returned error was because
5601 // http.StatusNotModified was returned.
5602 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) {
5603 gensupport.SetOptions(c.urlParams_, opts...)
5604 res, err := c.doRequest("json")
5605 if res != nil && res.StatusCode == http.StatusNotModified {
5606 if res.Body != nil {
5607 res.Body.Close()
5608 }
5609 return nil, gensupport.WrapError(&googleapi.Error{
5610 Code: res.StatusCode,
5611 Header: res.Header,
5612 })
5613 }
5614 if err != nil {
5615 return nil, err
5616 }
5617 defer googleapi.CloseBody(res)
5618 if err := googleapi.CheckResponse(res); err != nil {
5619 return nil, gensupport.WrapError(err)
5620 }
5621 ret := &GoogleCloudLocationLocation{
5622 ServerResponse: googleapi.ServerResponse{
5623 Header: res.Header,
5624 HTTPStatusCode: res.StatusCode,
5625 },
5626 }
5627 target := &ret
5628 b, err := gensupport.DecodeResponseBytes(target, res)
5629 if err != nil {
5630 return nil, err
5631 }
5632 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.get", "response", internallog.HTTPResponse(res, b))
5633 return ret, nil
5634 }
5635
5636 type ProjectsLocationsListCall struct {
5637 s *Service
5638 name string
5639 urlParams_ gensupport.URLParams
5640 ifNoneMatch_ string
5641 ctx_ context.Context
5642 header_ http.Header
5643 }
5644
5645 // List: Lists information about the supported locations for this service. This
5646 // method lists locations based on the resource scope provided in the
5647 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
5648 // empty, the method lists the public locations available to all projects. *
5649 // **Project-specific locations**: If `name` follows the format
5650 // `projects/{project}`, the method lists locations visible to that specific
5651 // project. This includes public, private, or other project-specific locations
5652 // enabled for the project. For gRPC and client library implementations, the
5653 // resource name is passed as the `name` field. For direct service calls, the
5654 // resource name is incorporated into the request path based on the specific
5655 // service implementation and version.
5656 //
5657 // - name: The resource that owns the locations collection, if applicable.
5658 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
5659 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5660 c.name = name
5661 return c
5662 }
5663
5664 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
5665 // use this field. It is unsupported and is ignored unless explicitly
5666 // documented otherwise. This is primarily for internal usage.
5667 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
5668 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
5669 return c
5670 }
5671
5672 // Filter sets the optional parameter "filter": A filter to narrow down results
5673 // to a preferred subset. The filtering language accepts strings like
5674 // "displayName=tokyo", and is documented in more detail in AIP-160
5675 // (https://google.aip.dev/160).
5676 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
5677 c.urlParams_.Set("filter", filter)
5678 return c
5679 }
5680
5681 // PageSize sets the optional parameter "pageSize": The maximum number of
5682 // results to return. If not set, the service selects a default.
5683 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
5684 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5685 return c
5686 }
5687
5688 // PageToken sets the optional parameter "pageToken": A page token received
5689 // from the `next_page_token` field in the response. Send that page token to
5690 // receive the subsequent page.
5691 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
5692 c.urlParams_.Set("pageToken", pageToken)
5693 return c
5694 }
5695
5696 // Fields allows partial responses to be retrieved. See
5697 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5698 // details.
5699 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
5700 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5701 return c
5702 }
5703
5704 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5705 // object's ETag matches the given value. This is useful for getting updates
5706 // only after the object has changed since the last request.
5707 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
5708 c.ifNoneMatch_ = entityTag
5709 return c
5710 }
5711
5712 // Context sets the context to be used in this call's Do method.
5713 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
5714 c.ctx_ = ctx
5715 return c
5716 }
5717
5718 // Header returns a http.Header that can be modified by the caller to add
5719 // headers to the request.
5720 func (c *ProjectsLocationsListCall) Header() http.Header {
5721 if c.header_ == nil {
5722 c.header_ = make(http.Header)
5723 }
5724 return c.header_
5725 }
5726
5727 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
5728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5729 if c.ifNoneMatch_ != "" {
5730 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5731 }
5732 c.urlParams_.Set("alt", alt)
5733 c.urlParams_.Set("prettyPrint", "false")
5734 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
5735 urls += "?" + c.urlParams_.Encode()
5736 req, err := http.NewRequest("GET", urls, nil)
5737 if err != nil {
5738 return nil, err
5739 }
5740 req.Header = reqHeaders
5741 googleapi.Expand(req.URL, map[string]string{
5742 "name": c.name,
5743 })
5744 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
5745 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5746 }
5747
5748 // Do executes the "apihub.projects.locations.list" call.
5749 // Any non-2xx status code is an error. Response headers are in either
5750 // *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a
5751 // response was returned at all) in error.(*googleapi.Error).Header. Use
5752 // googleapi.IsNotModified to check whether the returned error was because
5753 // http.StatusNotModified was returned.
5754 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) {
5755 gensupport.SetOptions(c.urlParams_, opts...)
5756 res, err := c.doRequest("json")
5757 if res != nil && res.StatusCode == http.StatusNotModified {
5758 if res.Body != nil {
5759 res.Body.Close()
5760 }
5761 return nil, gensupport.WrapError(&googleapi.Error{
5762 Code: res.StatusCode,
5763 Header: res.Header,
5764 })
5765 }
5766 if err != nil {
5767 return nil, err
5768 }
5769 defer googleapi.CloseBody(res)
5770 if err := googleapi.CheckResponse(res); err != nil {
5771 return nil, gensupport.WrapError(err)
5772 }
5773 ret := &GoogleCloudLocationListLocationsResponse{
5774 ServerResponse: googleapi.ServerResponse{
5775 Header: res.Header,
5776 HTTPStatusCode: res.StatusCode,
5777 },
5778 }
5779 target := &ret
5780 b, err := gensupport.DecodeResponseBytes(target, res)
5781 if err != nil {
5782 return nil, err
5783 }
5784 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.list", "response", internallog.HTTPResponse(res, b))
5785 return ret, nil
5786 }
5787
5788 // Pages invokes f for each page of results.
5789 // A non-nil error returned from f will halt the iteration.
5790 // The provided context supersedes any context provided to the Context method.
5791 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error {
5792 c.ctx_ = ctx
5793 defer c.PageToken(c.urlParams_.Get("pageToken"))
5794 for {
5795 x, err := c.Do()
5796 if err != nil {
5797 return err
5798 }
5799 if err := f(x); err != nil {
5800 return err
5801 }
5802 if x.NextPageToken == "" {
5803 return nil
5804 }
5805 c.PageToken(x.NextPageToken)
5806 }
5807 }
5808
5809 type ProjectsLocationsLookupRuntimeProjectAttachmentCall struct {
5810 s *Service
5811 name string
5812 urlParams_ gensupport.URLParams
5813 ifNoneMatch_ string
5814 ctx_ context.Context
5815 header_ http.Header
5816 }
5817
5818 // LookupRuntimeProjectAttachment: Look up a runtime project attachment. This
5819 // API can be called in the context of any project.
5820 //
5821 // - name: Runtime project ID to look up runtime project attachment for. Lookup
5822 // happens across all regions. Expected format:
5823 // `projects/{project}/locations/{location}`.
5824 func (r *ProjectsLocationsService) LookupRuntimeProjectAttachment(name string) *ProjectsLocationsLookupRuntimeProjectAttachmentCall {
5825 c := &ProjectsLocationsLookupRuntimeProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5826 c.name = name
5827 return c
5828 }
5829
5830 // Fields allows partial responses to be retrieved. See
5831 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5832 // details.
5833 func (c *ProjectsLocationsLookupRuntimeProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupRuntimeProjectAttachmentCall {
5834 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5835 return c
5836 }
5837
5838 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5839 // object's ETag matches the given value. This is useful for getting updates
5840 // only after the object has changed since the last request.
5841 func (c *ProjectsLocationsLookupRuntimeProjectAttachmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupRuntimeProjectAttachmentCall {
5842 c.ifNoneMatch_ = entityTag
5843 return c
5844 }
5845
5846 // Context sets the context to be used in this call's Do method.
5847 func (c *ProjectsLocationsLookupRuntimeProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsLookupRuntimeProjectAttachmentCall {
5848 c.ctx_ = ctx
5849 return c
5850 }
5851
5852 // Header returns a http.Header that can be modified by the caller to add
5853 // headers to the request.
5854 func (c *ProjectsLocationsLookupRuntimeProjectAttachmentCall) Header() http.Header {
5855 if c.header_ == nil {
5856 c.header_ = make(http.Header)
5857 }
5858 return c.header_
5859 }
5860
5861 func (c *ProjectsLocationsLookupRuntimeProjectAttachmentCall) doRequest(alt string) (*http.Response, error) {
5862 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5863 if c.ifNoneMatch_ != "" {
5864 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5865 }
5866 c.urlParams_.Set("alt", alt)
5867 c.urlParams_.Set("prettyPrint", "false")
5868 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupRuntimeProjectAttachment")
5869 urls += "?" + c.urlParams_.Encode()
5870 req, err := http.NewRequest("GET", urls, nil)
5871 if err != nil {
5872 return nil, err
5873 }
5874 req.Header = reqHeaders
5875 googleapi.Expand(req.URL, map[string]string{
5876 "name": c.name,
5877 })
5878 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.lookupRuntimeProjectAttachment", "request", internallog.HTTPRequest(req, nil))
5879 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5880 }
5881
5882 // Do executes the "apihub.projects.locations.lookupRuntimeProjectAttachment" call.
5883 // Any non-2xx status code is an error. Response headers are in either
5884 // *GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse.ServerResponse.Hea
5885 // der or (if a response was returned at all) in
5886 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5887 // whether the returned error was because http.StatusNotModified was returned.
5888 func (c *ProjectsLocationsLookupRuntimeProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse, error) {
5889 gensupport.SetOptions(c.urlParams_, opts...)
5890 res, err := c.doRequest("json")
5891 if res != nil && res.StatusCode == http.StatusNotModified {
5892 if res.Body != nil {
5893 res.Body.Close()
5894 }
5895 return nil, gensupport.WrapError(&googleapi.Error{
5896 Code: res.StatusCode,
5897 Header: res.Header,
5898 })
5899 }
5900 if err != nil {
5901 return nil, err
5902 }
5903 defer googleapi.CloseBody(res)
5904 if err := googleapi.CheckResponse(res); err != nil {
5905 return nil, gensupport.WrapError(err)
5906 }
5907 ret := &GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse{
5908 ServerResponse: googleapi.ServerResponse{
5909 Header: res.Header,
5910 HTTPStatusCode: res.StatusCode,
5911 },
5912 }
5913 target := &ret
5914 b, err := gensupport.DecodeResponseBytes(target, res)
5915 if err != nil {
5916 return nil, err
5917 }
5918 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.lookupRuntimeProjectAttachment", "response", internallog.HTTPResponse(res, b))
5919 return ret, nil
5920 }
5921
5922 type ProjectsLocationsRetrieveApiViewsCall struct {
5923 s *Service
5924 parent string
5925 urlParams_ gensupport.URLParams
5926 ifNoneMatch_ string
5927 ctx_ context.Context
5928 header_ http.Header
5929 }
5930
5931 // RetrieveApiViews: Retrieve API views.
5932 //
5933 // - parent: The parent resource name. Format:
5934 // `projects/{project}/locations/{location}`.
5935 func (r *ProjectsLocationsService) RetrieveApiViews(parent string) *ProjectsLocationsRetrieveApiViewsCall {
5936 c := &ProjectsLocationsRetrieveApiViewsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5937 c.parent = parent
5938 return c
5939 }
5940
5941 // Filter sets the optional parameter "filter": The filter expression.
5942 func (c *ProjectsLocationsRetrieveApiViewsCall) Filter(filter string) *ProjectsLocationsRetrieveApiViewsCall {
5943 c.urlParams_.Set("filter", filter)
5944 return c
5945 }
5946
5947 // PageSize sets the optional parameter "pageSize": The maximum number of
5948 // results to return. Default to 100.
5949 func (c *ProjectsLocationsRetrieveApiViewsCall) PageSize(pageSize int64) *ProjectsLocationsRetrieveApiViewsCall {
5950 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5951 return c
5952 }
5953
5954 // PageToken sets the optional parameter "pageToken": A page token, received
5955 // from a previous `RetrieveApiViews` call. Provide this to retrieve the
5956 // subsequent page.
5957 func (c *ProjectsLocationsRetrieveApiViewsCall) PageToken(pageToken string) *ProjectsLocationsRetrieveApiViewsCall {
5958 c.urlParams_.Set("pageToken", pageToken)
5959 return c
5960 }
5961
5962 // View sets the optional parameter "view": Required. The view type to return.
5963 //
5964 // Possible values:
5965 //
5966 // "API_VIEW_TYPE_UNSPECIFIED" - The default view type.
5967 // "MCP_SERVER" - The MCP server view in API hub.
5968 // "MCP_TOOL" - The MCP tool view in API hub.
5969 func (c *ProjectsLocationsRetrieveApiViewsCall) View(view string) *ProjectsLocationsRetrieveApiViewsCall {
5970 c.urlParams_.Set("view", view)
5971 return c
5972 }
5973
5974 // Fields allows partial responses to be retrieved. See
5975 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5976 // details.
5977 func (c *ProjectsLocationsRetrieveApiViewsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRetrieveApiViewsCall {
5978 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5979 return c
5980 }
5981
5982 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5983 // object's ETag matches the given value. This is useful for getting updates
5984 // only after the object has changed since the last request.
5985 func (c *ProjectsLocationsRetrieveApiViewsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRetrieveApiViewsCall {
5986 c.ifNoneMatch_ = entityTag
5987 return c
5988 }
5989
5990 // Context sets the context to be used in this call's Do method.
5991 func (c *ProjectsLocationsRetrieveApiViewsCall) Context(ctx context.Context) *ProjectsLocationsRetrieveApiViewsCall {
5992 c.ctx_ = ctx
5993 return c
5994 }
5995
5996 // Header returns a http.Header that can be modified by the caller to add
5997 // headers to the request.
5998 func (c *ProjectsLocationsRetrieveApiViewsCall) Header() http.Header {
5999 if c.header_ == nil {
6000 c.header_ = make(http.Header)
6001 }
6002 return c.header_
6003 }
6004
6005 func (c *ProjectsLocationsRetrieveApiViewsCall) doRequest(alt string) (*http.Response, error) {
6006 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6007 if c.ifNoneMatch_ != "" {
6008 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6009 }
6010 c.urlParams_.Set("alt", alt)
6011 c.urlParams_.Set("prettyPrint", "false")
6012 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:retrieveApiViews")
6013 urls += "?" + c.urlParams_.Encode()
6014 req, err := http.NewRequest("GET", urls, nil)
6015 if err != nil {
6016 return nil, err
6017 }
6018 req.Header = reqHeaders
6019 googleapi.Expand(req.URL, map[string]string{
6020 "parent": c.parent,
6021 })
6022 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.retrieveApiViews", "request", internallog.HTTPRequest(req, nil))
6023 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6024 }
6025
6026 // Do executes the "apihub.projects.locations.retrieveApiViews" call.
6027 // Any non-2xx status code is an error. Response headers are in either
6028 // *GoogleCloudApihubV1RetrieveApiViewsResponse.ServerResponse.Header or (if a
6029 // response was returned at all) in error.(*googleapi.Error).Header. Use
6030 // googleapi.IsNotModified to check whether the returned error was because
6031 // http.StatusNotModified was returned.
6032 func (c *ProjectsLocationsRetrieveApiViewsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1RetrieveApiViewsResponse, error) {
6033 gensupport.SetOptions(c.urlParams_, opts...)
6034 res, err := c.doRequest("json")
6035 if res != nil && res.StatusCode == http.StatusNotModified {
6036 if res.Body != nil {
6037 res.Body.Close()
6038 }
6039 return nil, gensupport.WrapError(&googleapi.Error{
6040 Code: res.StatusCode,
6041 Header: res.Header,
6042 })
6043 }
6044 if err != nil {
6045 return nil, err
6046 }
6047 defer googleapi.CloseBody(res)
6048 if err := googleapi.CheckResponse(res); err != nil {
6049 return nil, gensupport.WrapError(err)
6050 }
6051 ret := &GoogleCloudApihubV1RetrieveApiViewsResponse{
6052 ServerResponse: googleapi.ServerResponse{
6053 Header: res.Header,
6054 HTTPStatusCode: res.StatusCode,
6055 },
6056 }
6057 target := &ret
6058 b, err := gensupport.DecodeResponseBytes(target, res)
6059 if err != nil {
6060 return nil, err
6061 }
6062 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.retrieveApiViews", "response", internallog.HTTPResponse(res, b))
6063 return ret, nil
6064 }
6065
6066 // Pages invokes f for each page of results.
6067 // A non-nil error returned from f will halt the iteration.
6068 // The provided context supersedes any context provided to the Context method.
6069 func (c *ProjectsLocationsRetrieveApiViewsCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1RetrieveApiViewsResponse) error) error {
6070 c.ctx_ = ctx
6071 defer c.PageToken(c.urlParams_.Get("pageToken"))
6072 for {
6073 x, err := c.Do()
6074 if err != nil {
6075 return err
6076 }
6077 if err := f(x); err != nil {
6078 return err
6079 }
6080 if x.NextPageToken == "" {
6081 return nil
6082 }
6083 c.PageToken(x.NextPageToken)
6084 }
6085 }
6086
6087 type ProjectsLocationsSearchResourcesCall struct {
6088 s *Service
6089 location string
6090 googlecloudapihubv1searchresourcesrequest *GoogleCloudApihubV1SearchResourcesRequest
6091 urlParams_ gensupport.URLParams
6092 ctx_ context.Context
6093 header_ http.Header
6094 }
6095
6096 // SearchResources: Search across API-Hub resources.
6097 //
6098 // - location: The resource name of the location which will be of the type
6099 // `projects/{project_id}/locations/{location_id}`. This field is used to
6100 // identify the instance of API-Hub in which resources should be searched.
6101 func (r *ProjectsLocationsService) SearchResources(location string, googlecloudapihubv1searchresourcesrequest *GoogleCloudApihubV1SearchResourcesRequest) *ProjectsLocationsSearchResourcesCall {
6102 c := &ProjectsLocationsSearchResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6103 c.location = location
6104 c.googlecloudapihubv1searchresourcesrequest = googlecloudapihubv1searchresourcesrequest
6105 return c
6106 }
6107
6108 // Fields allows partial responses to be retrieved. See
6109 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6110 // details.
6111 func (c *ProjectsLocationsSearchResourcesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchResourcesCall {
6112 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6113 return c
6114 }
6115
6116 // Context sets the context to be used in this call's Do method.
6117 func (c *ProjectsLocationsSearchResourcesCall) Context(ctx context.Context) *ProjectsLocationsSearchResourcesCall {
6118 c.ctx_ = ctx
6119 return c
6120 }
6121
6122 // Header returns a http.Header that can be modified by the caller to add
6123 // headers to the request.
6124 func (c *ProjectsLocationsSearchResourcesCall) Header() http.Header {
6125 if c.header_ == nil {
6126 c.header_ = make(http.Header)
6127 }
6128 return c.header_
6129 }
6130
6131 func (c *ProjectsLocationsSearchResourcesCall) doRequest(alt string) (*http.Response, error) {
6132 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6133 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1searchresourcesrequest)
6134 if err != nil {
6135 return nil, err
6136 }
6137 c.urlParams_.Set("alt", alt)
6138 c.urlParams_.Set("prettyPrint", "false")
6139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:searchResources")
6140 urls += "?" + c.urlParams_.Encode()
6141 req, err := http.NewRequest("POST", urls, body)
6142 if err != nil {
6143 return nil, err
6144 }
6145 req.Header = reqHeaders
6146 googleapi.Expand(req.URL, map[string]string{
6147 "location": c.location,
6148 })
6149 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.searchResources", "request", internallog.HTTPRequest(req, body.Bytes()))
6150 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6151 }
6152
6153 // Do executes the "apihub.projects.locations.searchResources" call.
6154 // Any non-2xx status code is an error. Response headers are in either
6155 // *GoogleCloudApihubV1SearchResourcesResponse.ServerResponse.Header or (if a
6156 // response was returned at all) in error.(*googleapi.Error).Header. Use
6157 // googleapi.IsNotModified to check whether the returned error was because
6158 // http.StatusNotModified was returned.
6159 func (c *ProjectsLocationsSearchResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1SearchResourcesResponse, error) {
6160 gensupport.SetOptions(c.urlParams_, opts...)
6161 res, err := c.doRequest("json")
6162 if res != nil && res.StatusCode == http.StatusNotModified {
6163 if res.Body != nil {
6164 res.Body.Close()
6165 }
6166 return nil, gensupport.WrapError(&googleapi.Error{
6167 Code: res.StatusCode,
6168 Header: res.Header,
6169 })
6170 }
6171 if err != nil {
6172 return nil, err
6173 }
6174 defer googleapi.CloseBody(res)
6175 if err := googleapi.CheckResponse(res); err != nil {
6176 return nil, gensupport.WrapError(err)
6177 }
6178 ret := &GoogleCloudApihubV1SearchResourcesResponse{
6179 ServerResponse: googleapi.ServerResponse{
6180 Header: res.Header,
6181 HTTPStatusCode: res.StatusCode,
6182 },
6183 }
6184 target := &ret
6185 b, err := gensupport.DecodeResponseBytes(target, res)
6186 if err != nil {
6187 return nil, err
6188 }
6189 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.searchResources", "response", internallog.HTTPResponse(res, b))
6190 return ret, nil
6191 }
6192
6193 // Pages invokes f for each page of results.
6194 // A non-nil error returned from f will halt the iteration.
6195 // The provided context supersedes any context provided to the Context method.
6196 func (c *ProjectsLocationsSearchResourcesCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1SearchResourcesResponse) error) error {
6197 c.ctx_ = ctx
6198 defer func(pt string) { c.googlecloudapihubv1searchresourcesrequest.PageToken = pt }(c.googlecloudapihubv1searchresourcesrequest.PageToken)
6199 for {
6200 x, err := c.Do()
6201 if err != nil {
6202 return err
6203 }
6204 if err := f(x); err != nil {
6205 return err
6206 }
6207 if x.NextPageToken == "" {
6208 return nil
6209 }
6210 c.googlecloudapihubv1searchresourcesrequest.PageToken = x.NextPageToken
6211 }
6212 }
6213
6214 type ProjectsLocationsAddonsGetCall struct {
6215 s *Service
6216 name string
6217 urlParams_ gensupport.URLParams
6218 ifNoneMatch_ string
6219 ctx_ context.Context
6220 header_ http.Header
6221 }
6222
6223 // Get: Get an addon.
6224 //
6225 // - name: The name of the addon to get. Format:
6226 // `projects/{project}/locations/{location}/addons/{addon}`.
6227 func (r *ProjectsLocationsAddonsService) Get(name string) *ProjectsLocationsAddonsGetCall {
6228 c := &ProjectsLocationsAddonsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6229 c.name = name
6230 return c
6231 }
6232
6233 // Fields allows partial responses to be retrieved. See
6234 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6235 // details.
6236 func (c *ProjectsLocationsAddonsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddonsGetCall {
6237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6238 return c
6239 }
6240
6241 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6242 // object's ETag matches the given value. This is useful for getting updates
6243 // only after the object has changed since the last request.
6244 func (c *ProjectsLocationsAddonsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddonsGetCall {
6245 c.ifNoneMatch_ = entityTag
6246 return c
6247 }
6248
6249 // Context sets the context to be used in this call's Do method.
6250 func (c *ProjectsLocationsAddonsGetCall) Context(ctx context.Context) *ProjectsLocationsAddonsGetCall {
6251 c.ctx_ = ctx
6252 return c
6253 }
6254
6255 // Header returns a http.Header that can be modified by the caller to add
6256 // headers to the request.
6257 func (c *ProjectsLocationsAddonsGetCall) Header() http.Header {
6258 if c.header_ == nil {
6259 c.header_ = make(http.Header)
6260 }
6261 return c.header_
6262 }
6263
6264 func (c *ProjectsLocationsAddonsGetCall) doRequest(alt string) (*http.Response, error) {
6265 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6266 if c.ifNoneMatch_ != "" {
6267 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6268 }
6269 c.urlParams_.Set("alt", alt)
6270 c.urlParams_.Set("prettyPrint", "false")
6271 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6272 urls += "?" + c.urlParams_.Encode()
6273 req, err := http.NewRequest("GET", urls, nil)
6274 if err != nil {
6275 return nil, err
6276 }
6277 req.Header = reqHeaders
6278 googleapi.Expand(req.URL, map[string]string{
6279 "name": c.name,
6280 })
6281 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.get", "request", internallog.HTTPRequest(req, nil))
6282 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6283 }
6284
6285 // Do executes the "apihub.projects.locations.addons.get" call.
6286 // Any non-2xx status code is an error. Response headers are in either
6287 // *GoogleCloudApihubV1Addon.ServerResponse.Header or (if a response was
6288 // returned at all) in error.(*googleapi.Error).Header. Use
6289 // googleapi.IsNotModified to check whether the returned error was because
6290 // http.StatusNotModified was returned.
6291 func (c *ProjectsLocationsAddonsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Addon, error) {
6292 gensupport.SetOptions(c.urlParams_, opts...)
6293 res, err := c.doRequest("json")
6294 if res != nil && res.StatusCode == http.StatusNotModified {
6295 if res.Body != nil {
6296 res.Body.Close()
6297 }
6298 return nil, gensupport.WrapError(&googleapi.Error{
6299 Code: res.StatusCode,
6300 Header: res.Header,
6301 })
6302 }
6303 if err != nil {
6304 return nil, err
6305 }
6306 defer googleapi.CloseBody(res)
6307 if err := googleapi.CheckResponse(res); err != nil {
6308 return nil, gensupport.WrapError(err)
6309 }
6310 ret := &GoogleCloudApihubV1Addon{
6311 ServerResponse: googleapi.ServerResponse{
6312 Header: res.Header,
6313 HTTPStatusCode: res.StatusCode,
6314 },
6315 }
6316 target := &ret
6317 b, err := gensupport.DecodeResponseBytes(target, res)
6318 if err != nil {
6319 return nil, err
6320 }
6321 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.get", "response", internallog.HTTPResponse(res, b))
6322 return ret, nil
6323 }
6324
6325 type ProjectsLocationsAddonsListCall struct {
6326 s *Service
6327 parent string
6328 urlParams_ gensupport.URLParams
6329 ifNoneMatch_ string
6330 ctx_ context.Context
6331 header_ http.Header
6332 }
6333
6334 // List: List addons.
6335 //
6336 // - parent: The parent resource where this addon will be created. Format:
6337 // `projects/{project}/locations/{location}`.
6338 func (r *ProjectsLocationsAddonsService) List(parent string) *ProjectsLocationsAddonsListCall {
6339 c := &ProjectsLocationsAddonsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6340 c.parent = parent
6341 return c
6342 }
6343
6344 // Filter sets the optional parameter "filter": An expression that filters the
6345 // list of addons. The only supported filter is `plugin_instance_name`. It can
6346 // be used to filter addons that are enabled for a given plugin instance. The
6347 // format of the filter is `plugin_instance_name =
6348 // "projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance
6349 // }".
6350 func (c *ProjectsLocationsAddonsListCall) Filter(filter string) *ProjectsLocationsAddonsListCall {
6351 c.urlParams_.Set("filter", filter)
6352 return c
6353 }
6354
6355 // PageSize sets the optional parameter "pageSize": The maximum number of hub
6356 // addons to return. The service may return fewer than this value. If
6357 // unspecified, at most 50 hub addons will be returned. The maximum value is
6358 // 1000; values above 1000 will be coerced to 1000.
6359 func (c *ProjectsLocationsAddonsListCall) PageSize(pageSize int64) *ProjectsLocationsAddonsListCall {
6360 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6361 return c
6362 }
6363
6364 // PageToken sets the optional parameter "pageToken": A page token, received
6365 // from a previous `ListAddons` call. Provide this to retrieve the subsequent
6366 // page. When paginating, all other parameters (except page_size) provided to
6367 // `ListAddons` must match the call that provided the page token.
6368 func (c *ProjectsLocationsAddonsListCall) PageToken(pageToken string) *ProjectsLocationsAddonsListCall {
6369 c.urlParams_.Set("pageToken", pageToken)
6370 return c
6371 }
6372
6373 // Fields allows partial responses to be retrieved. See
6374 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6375 // details.
6376 func (c *ProjectsLocationsAddonsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddonsListCall {
6377 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6378 return c
6379 }
6380
6381 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6382 // object's ETag matches the given value. This is useful for getting updates
6383 // only after the object has changed since the last request.
6384 func (c *ProjectsLocationsAddonsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddonsListCall {
6385 c.ifNoneMatch_ = entityTag
6386 return c
6387 }
6388
6389 // Context sets the context to be used in this call's Do method.
6390 func (c *ProjectsLocationsAddonsListCall) Context(ctx context.Context) *ProjectsLocationsAddonsListCall {
6391 c.ctx_ = ctx
6392 return c
6393 }
6394
6395 // Header returns a http.Header that can be modified by the caller to add
6396 // headers to the request.
6397 func (c *ProjectsLocationsAddonsListCall) Header() http.Header {
6398 if c.header_ == nil {
6399 c.header_ = make(http.Header)
6400 }
6401 return c.header_
6402 }
6403
6404 func (c *ProjectsLocationsAddonsListCall) doRequest(alt string) (*http.Response, error) {
6405 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6406 if c.ifNoneMatch_ != "" {
6407 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6408 }
6409 c.urlParams_.Set("alt", alt)
6410 c.urlParams_.Set("prettyPrint", "false")
6411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/addons")
6412 urls += "?" + c.urlParams_.Encode()
6413 req, err := http.NewRequest("GET", urls, nil)
6414 if err != nil {
6415 return nil, err
6416 }
6417 req.Header = reqHeaders
6418 googleapi.Expand(req.URL, map[string]string{
6419 "parent": c.parent,
6420 })
6421 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.list", "request", internallog.HTTPRequest(req, nil))
6422 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6423 }
6424
6425 // Do executes the "apihub.projects.locations.addons.list" call.
6426 // Any non-2xx status code is an error. Response headers are in either
6427 // *GoogleCloudApihubV1ListAddonsResponse.ServerResponse.Header or (if a
6428 // response was returned at all) in error.(*googleapi.Error).Header. Use
6429 // googleapi.IsNotModified to check whether the returned error was because
6430 // http.StatusNotModified was returned.
6431 func (c *ProjectsLocationsAddonsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListAddonsResponse, error) {
6432 gensupport.SetOptions(c.urlParams_, opts...)
6433 res, err := c.doRequest("json")
6434 if res != nil && res.StatusCode == http.StatusNotModified {
6435 if res.Body != nil {
6436 res.Body.Close()
6437 }
6438 return nil, gensupport.WrapError(&googleapi.Error{
6439 Code: res.StatusCode,
6440 Header: res.Header,
6441 })
6442 }
6443 if err != nil {
6444 return nil, err
6445 }
6446 defer googleapi.CloseBody(res)
6447 if err := googleapi.CheckResponse(res); err != nil {
6448 return nil, gensupport.WrapError(err)
6449 }
6450 ret := &GoogleCloudApihubV1ListAddonsResponse{
6451 ServerResponse: googleapi.ServerResponse{
6452 Header: res.Header,
6453 HTTPStatusCode: res.StatusCode,
6454 },
6455 }
6456 target := &ret
6457 b, err := gensupport.DecodeResponseBytes(target, res)
6458 if err != nil {
6459 return nil, err
6460 }
6461 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.list", "response", internallog.HTTPResponse(res, b))
6462 return ret, nil
6463 }
6464
6465 // Pages invokes f for each page of results.
6466 // A non-nil error returned from f will halt the iteration.
6467 // The provided context supersedes any context provided to the Context method.
6468 func (c *ProjectsLocationsAddonsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListAddonsResponse) error) error {
6469 c.ctx_ = ctx
6470 defer c.PageToken(c.urlParams_.Get("pageToken"))
6471 for {
6472 x, err := c.Do()
6473 if err != nil {
6474 return err
6475 }
6476 if err := f(x); err != nil {
6477 return err
6478 }
6479 if x.NextPageToken == "" {
6480 return nil
6481 }
6482 c.PageToken(x.NextPageToken)
6483 }
6484 }
6485
6486 type ProjectsLocationsAddonsManageConfigCall struct {
6487 s *Service
6488 name string
6489 googlecloudapihubv1manageaddonconfigrequest *GoogleCloudApihubV1ManageAddonConfigRequest
6490 urlParams_ gensupport.URLParams
6491 ctx_ context.Context
6492 header_ http.Header
6493 }
6494
6495 // ManageConfig: Manage addon config. This RPC is used for managing the config
6496 // of the addon. Calling this RPC moves the addon into an updating state until
6497 // the long-running operation succeeds.
6498 //
6499 // - name: The name of the addon for which the config is to be managed. Format:
6500 // `projects/{project}/locations/{location}/addons/{addon}`.
6501 func (r *ProjectsLocationsAddonsService) ManageConfig(name string, googlecloudapihubv1manageaddonconfigrequest *GoogleCloudApihubV1ManageAddonConfigRequest) *ProjectsLocationsAddonsManageConfigCall {
6502 c := &ProjectsLocationsAddonsManageConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6503 c.name = name
6504 c.googlecloudapihubv1manageaddonconfigrequest = googlecloudapihubv1manageaddonconfigrequest
6505 return c
6506 }
6507
6508 // Fields allows partial responses to be retrieved. See
6509 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6510 // details.
6511 func (c *ProjectsLocationsAddonsManageConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddonsManageConfigCall {
6512 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6513 return c
6514 }
6515
6516 // Context sets the context to be used in this call's Do method.
6517 func (c *ProjectsLocationsAddonsManageConfigCall) Context(ctx context.Context) *ProjectsLocationsAddonsManageConfigCall {
6518 c.ctx_ = ctx
6519 return c
6520 }
6521
6522 // Header returns a http.Header that can be modified by the caller to add
6523 // headers to the request.
6524 func (c *ProjectsLocationsAddonsManageConfigCall) Header() http.Header {
6525 if c.header_ == nil {
6526 c.header_ = make(http.Header)
6527 }
6528 return c.header_
6529 }
6530
6531 func (c *ProjectsLocationsAddonsManageConfigCall) doRequest(alt string) (*http.Response, error) {
6532 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6533 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1manageaddonconfigrequest)
6534 if err != nil {
6535 return nil, err
6536 }
6537 c.urlParams_.Set("alt", alt)
6538 c.urlParams_.Set("prettyPrint", "false")
6539 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:manageConfig")
6540 urls += "?" + c.urlParams_.Encode()
6541 req, err := http.NewRequest("POST", urls, body)
6542 if err != nil {
6543 return nil, err
6544 }
6545 req.Header = reqHeaders
6546 googleapi.Expand(req.URL, map[string]string{
6547 "name": c.name,
6548 })
6549 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.manageConfig", "request", internallog.HTTPRequest(req, body.Bytes()))
6550 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6551 }
6552
6553 // Do executes the "apihub.projects.locations.addons.manageConfig" call.
6554 // Any non-2xx status code is an error. Response headers are in either
6555 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
6556 // returned at all) in error.(*googleapi.Error).Header. Use
6557 // googleapi.IsNotModified to check whether the returned error was because
6558 // http.StatusNotModified was returned.
6559 func (c *ProjectsLocationsAddonsManageConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
6560 gensupport.SetOptions(c.urlParams_, opts...)
6561 res, err := c.doRequest("json")
6562 if res != nil && res.StatusCode == http.StatusNotModified {
6563 if res.Body != nil {
6564 res.Body.Close()
6565 }
6566 return nil, gensupport.WrapError(&googleapi.Error{
6567 Code: res.StatusCode,
6568 Header: res.Header,
6569 })
6570 }
6571 if err != nil {
6572 return nil, err
6573 }
6574 defer googleapi.CloseBody(res)
6575 if err := googleapi.CheckResponse(res); err != nil {
6576 return nil, gensupport.WrapError(err)
6577 }
6578 ret := &GoogleLongrunningOperation{
6579 ServerResponse: googleapi.ServerResponse{
6580 Header: res.Header,
6581 HTTPStatusCode: res.StatusCode,
6582 },
6583 }
6584 target := &ret
6585 b, err := gensupport.DecodeResponseBytes(target, res)
6586 if err != nil {
6587 return nil, err
6588 }
6589 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.addons.manageConfig", "response", internallog.HTTPResponse(res, b))
6590 return ret, nil
6591 }
6592
6593 type ProjectsLocationsApiHubInstancesCreateCall struct {
6594 s *Service
6595 parent string
6596 googlecloudapihubv1apihubinstance *GoogleCloudApihubV1ApiHubInstance
6597 urlParams_ gensupport.URLParams
6598 ctx_ context.Context
6599 header_ http.Header
6600 }
6601
6602 // Create: Provisions instance resources for the API Hub.
6603 //
6604 // - parent: The parent resource for the Api Hub instance resource. Format:
6605 // `projects/{project}/locations/{location}`.
6606 func (r *ProjectsLocationsApiHubInstancesService) Create(parent string, googlecloudapihubv1apihubinstance *GoogleCloudApihubV1ApiHubInstance) *ProjectsLocationsApiHubInstancesCreateCall {
6607 c := &ProjectsLocationsApiHubInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6608 c.parent = parent
6609 c.googlecloudapihubv1apihubinstance = googlecloudapihubv1apihubinstance
6610 return c
6611 }
6612
6613 // ApiHubInstanceId sets the optional parameter "apiHubInstanceId": Identifier
6614 // to assign to the Api Hub instance. Must be unique within scope of the parent
6615 // resource. If the field is not provided, system generated id will be used.
6616 // This value should be 4-40 characters, and valid characters are
6617 // `/a-z[0-9]-_/`.
6618 func (c *ProjectsLocationsApiHubInstancesCreateCall) ApiHubInstanceId(apiHubInstanceId string) *ProjectsLocationsApiHubInstancesCreateCall {
6619 c.urlParams_.Set("apiHubInstanceId", apiHubInstanceId)
6620 return c
6621 }
6622
6623 // Fields allows partial responses to be retrieved. See
6624 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6625 // details.
6626 func (c *ProjectsLocationsApiHubInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApiHubInstancesCreateCall {
6627 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6628 return c
6629 }
6630
6631 // Context sets the context to be used in this call's Do method.
6632 func (c *ProjectsLocationsApiHubInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsApiHubInstancesCreateCall {
6633 c.ctx_ = ctx
6634 return c
6635 }
6636
6637 // Header returns a http.Header that can be modified by the caller to add
6638 // headers to the request.
6639 func (c *ProjectsLocationsApiHubInstancesCreateCall) Header() http.Header {
6640 if c.header_ == nil {
6641 c.header_ = make(http.Header)
6642 }
6643 return c.header_
6644 }
6645
6646 func (c *ProjectsLocationsApiHubInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
6647 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6648 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1apihubinstance)
6649 if err != nil {
6650 return nil, err
6651 }
6652 c.urlParams_.Set("alt", alt)
6653 c.urlParams_.Set("prettyPrint", "false")
6654 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apiHubInstances")
6655 urls += "?" + c.urlParams_.Encode()
6656 req, err := http.NewRequest("POST", urls, body)
6657 if err != nil {
6658 return nil, err
6659 }
6660 req.Header = reqHeaders
6661 googleapi.Expand(req.URL, map[string]string{
6662 "parent": c.parent,
6663 })
6664 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.create", "request", internallog.HTTPRequest(req, body.Bytes()))
6665 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6666 }
6667
6668 // Do executes the "apihub.projects.locations.apiHubInstances.create" call.
6669 // Any non-2xx status code is an error. Response headers are in either
6670 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
6671 // returned at all) in error.(*googleapi.Error).Header. Use
6672 // googleapi.IsNotModified to check whether the returned error was because
6673 // http.StatusNotModified was returned.
6674 func (c *ProjectsLocationsApiHubInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
6675 gensupport.SetOptions(c.urlParams_, opts...)
6676 res, err := c.doRequest("json")
6677 if res != nil && res.StatusCode == http.StatusNotModified {
6678 if res.Body != nil {
6679 res.Body.Close()
6680 }
6681 return nil, gensupport.WrapError(&googleapi.Error{
6682 Code: res.StatusCode,
6683 Header: res.Header,
6684 })
6685 }
6686 if err != nil {
6687 return nil, err
6688 }
6689 defer googleapi.CloseBody(res)
6690 if err := googleapi.CheckResponse(res); err != nil {
6691 return nil, gensupport.WrapError(err)
6692 }
6693 ret := &GoogleLongrunningOperation{
6694 ServerResponse: googleapi.ServerResponse{
6695 Header: res.Header,
6696 HTTPStatusCode: res.StatusCode,
6697 },
6698 }
6699 target := &ret
6700 b, err := gensupport.DecodeResponseBytes(target, res)
6701 if err != nil {
6702 return nil, err
6703 }
6704 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.create", "response", internallog.HTTPResponse(res, b))
6705 return ret, nil
6706 }
6707
6708 type ProjectsLocationsApiHubInstancesDeleteCall struct {
6709 s *Service
6710 name string
6711 urlParams_ gensupport.URLParams
6712 ctx_ context.Context
6713 header_ http.Header
6714 }
6715
6716 // Delete: Deletes the API hub instance. Deleting the API hub instance will
6717 // also result in the removal of all associated runtime project attachments and
6718 // the host project registration.
6719 //
6720 // - name: The name of the Api Hub instance to delete. Format:
6721 // `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
6722 func (r *ProjectsLocationsApiHubInstancesService) Delete(name string) *ProjectsLocationsApiHubInstancesDeleteCall {
6723 c := &ProjectsLocationsApiHubInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6724 c.name = name
6725 return c
6726 }
6727
6728 // Fields allows partial responses to be retrieved. See
6729 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6730 // details.
6731 func (c *ProjectsLocationsApiHubInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApiHubInstancesDeleteCall {
6732 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6733 return c
6734 }
6735
6736 // Context sets the context to be used in this call's Do method.
6737 func (c *ProjectsLocationsApiHubInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApiHubInstancesDeleteCall {
6738 c.ctx_ = ctx
6739 return c
6740 }
6741
6742 // Header returns a http.Header that can be modified by the caller to add
6743 // headers to the request.
6744 func (c *ProjectsLocationsApiHubInstancesDeleteCall) Header() http.Header {
6745 if c.header_ == nil {
6746 c.header_ = make(http.Header)
6747 }
6748 return c.header_
6749 }
6750
6751 func (c *ProjectsLocationsApiHubInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
6752 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6753 c.urlParams_.Set("alt", alt)
6754 c.urlParams_.Set("prettyPrint", "false")
6755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6756 urls += "?" + c.urlParams_.Encode()
6757 req, err := http.NewRequest("DELETE", urls, nil)
6758 if err != nil {
6759 return nil, err
6760 }
6761 req.Header = reqHeaders
6762 googleapi.Expand(req.URL, map[string]string{
6763 "name": c.name,
6764 })
6765 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.delete", "request", internallog.HTTPRequest(req, nil))
6766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6767 }
6768
6769 // Do executes the "apihub.projects.locations.apiHubInstances.delete" call.
6770 // Any non-2xx status code is an error. Response headers are in either
6771 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
6772 // returned at all) in error.(*googleapi.Error).Header. Use
6773 // googleapi.IsNotModified to check whether the returned error was because
6774 // http.StatusNotModified was returned.
6775 func (c *ProjectsLocationsApiHubInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
6776 gensupport.SetOptions(c.urlParams_, opts...)
6777 res, err := c.doRequest("json")
6778 if res != nil && res.StatusCode == http.StatusNotModified {
6779 if res.Body != nil {
6780 res.Body.Close()
6781 }
6782 return nil, gensupport.WrapError(&googleapi.Error{
6783 Code: res.StatusCode,
6784 Header: res.Header,
6785 })
6786 }
6787 if err != nil {
6788 return nil, err
6789 }
6790 defer googleapi.CloseBody(res)
6791 if err := googleapi.CheckResponse(res); err != nil {
6792 return nil, gensupport.WrapError(err)
6793 }
6794 ret := &GoogleLongrunningOperation{
6795 ServerResponse: googleapi.ServerResponse{
6796 Header: res.Header,
6797 HTTPStatusCode: res.StatusCode,
6798 },
6799 }
6800 target := &ret
6801 b, err := gensupport.DecodeResponseBytes(target, res)
6802 if err != nil {
6803 return nil, err
6804 }
6805 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.delete", "response", internallog.HTTPResponse(res, b))
6806 return ret, nil
6807 }
6808
6809 type ProjectsLocationsApiHubInstancesGetCall struct {
6810 s *Service
6811 name string
6812 urlParams_ gensupport.URLParams
6813 ifNoneMatch_ string
6814 ctx_ context.Context
6815 header_ http.Header
6816 }
6817
6818 // Get: Gets details of a single API Hub instance.
6819 //
6820 // - name: The name of the Api Hub instance to retrieve. Format:
6821 // `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
6822 func (r *ProjectsLocationsApiHubInstancesService) Get(name string) *ProjectsLocationsApiHubInstancesGetCall {
6823 c := &ProjectsLocationsApiHubInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6824 c.name = name
6825 return c
6826 }
6827
6828 // Fields allows partial responses to be retrieved. See
6829 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6830 // details.
6831 func (c *ProjectsLocationsApiHubInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApiHubInstancesGetCall {
6832 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6833 return c
6834 }
6835
6836 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6837 // object's ETag matches the given value. This is useful for getting updates
6838 // only after the object has changed since the last request.
6839 func (c *ProjectsLocationsApiHubInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApiHubInstancesGetCall {
6840 c.ifNoneMatch_ = entityTag
6841 return c
6842 }
6843
6844 // Context sets the context to be used in this call's Do method.
6845 func (c *ProjectsLocationsApiHubInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsApiHubInstancesGetCall {
6846 c.ctx_ = ctx
6847 return c
6848 }
6849
6850 // Header returns a http.Header that can be modified by the caller to add
6851 // headers to the request.
6852 func (c *ProjectsLocationsApiHubInstancesGetCall) Header() http.Header {
6853 if c.header_ == nil {
6854 c.header_ = make(http.Header)
6855 }
6856 return c.header_
6857 }
6858
6859 func (c *ProjectsLocationsApiHubInstancesGetCall) doRequest(alt string) (*http.Response, error) {
6860 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6861 if c.ifNoneMatch_ != "" {
6862 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6863 }
6864 c.urlParams_.Set("alt", alt)
6865 c.urlParams_.Set("prettyPrint", "false")
6866 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6867 urls += "?" + c.urlParams_.Encode()
6868 req, err := http.NewRequest("GET", urls, nil)
6869 if err != nil {
6870 return nil, err
6871 }
6872 req.Header = reqHeaders
6873 googleapi.Expand(req.URL, map[string]string{
6874 "name": c.name,
6875 })
6876 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.get", "request", internallog.HTTPRequest(req, nil))
6877 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6878 }
6879
6880 // Do executes the "apihub.projects.locations.apiHubInstances.get" call.
6881 // Any non-2xx status code is an error. Response headers are in either
6882 // *GoogleCloudApihubV1ApiHubInstance.ServerResponse.Header or (if a response
6883 // was returned at all) in error.(*googleapi.Error).Header. Use
6884 // googleapi.IsNotModified to check whether the returned error was because
6885 // http.StatusNotModified was returned.
6886 func (c *ProjectsLocationsApiHubInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ApiHubInstance, error) {
6887 gensupport.SetOptions(c.urlParams_, opts...)
6888 res, err := c.doRequest("json")
6889 if res != nil && res.StatusCode == http.StatusNotModified {
6890 if res.Body != nil {
6891 res.Body.Close()
6892 }
6893 return nil, gensupport.WrapError(&googleapi.Error{
6894 Code: res.StatusCode,
6895 Header: res.Header,
6896 })
6897 }
6898 if err != nil {
6899 return nil, err
6900 }
6901 defer googleapi.CloseBody(res)
6902 if err := googleapi.CheckResponse(res); err != nil {
6903 return nil, gensupport.WrapError(err)
6904 }
6905 ret := &GoogleCloudApihubV1ApiHubInstance{
6906 ServerResponse: googleapi.ServerResponse{
6907 Header: res.Header,
6908 HTTPStatusCode: res.StatusCode,
6909 },
6910 }
6911 target := &ret
6912 b, err := gensupport.DecodeResponseBytes(target, res)
6913 if err != nil {
6914 return nil, err
6915 }
6916 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.get", "response", internallog.HTTPResponse(res, b))
6917 return ret, nil
6918 }
6919
6920 type ProjectsLocationsApiHubInstancesLookupCall struct {
6921 s *Service
6922 parent string
6923 urlParams_ gensupport.URLParams
6924 ifNoneMatch_ string
6925 ctx_ context.Context
6926 header_ http.Header
6927 }
6928
6929 // Lookup: Looks up an Api Hub instance in a given Google Cloud project. There
6930 // will always be only one Api Hub instance for a Google Cloud project across
6931 // all locations.
6932 //
6933 // - parent: There will always be only one Api Hub instance for a Google Cloud
6934 // project across all locations. The parent resource for the Api Hub instance
6935 // resource. Format: `projects/{project}/locations/{location}`.
6936 func (r *ProjectsLocationsApiHubInstancesService) Lookup(parent string) *ProjectsLocationsApiHubInstancesLookupCall {
6937 c := &ProjectsLocationsApiHubInstancesLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6938 c.parent = parent
6939 return c
6940 }
6941
6942 // Fields allows partial responses to be retrieved. See
6943 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6944 // details.
6945 func (c *ProjectsLocationsApiHubInstancesLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsApiHubInstancesLookupCall {
6946 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6947 return c
6948 }
6949
6950 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6951 // object's ETag matches the given value. This is useful for getting updates
6952 // only after the object has changed since the last request.
6953 func (c *ProjectsLocationsApiHubInstancesLookupCall) IfNoneMatch(entityTag string) *ProjectsLocationsApiHubInstancesLookupCall {
6954 c.ifNoneMatch_ = entityTag
6955 return c
6956 }
6957
6958 // Context sets the context to be used in this call's Do method.
6959 func (c *ProjectsLocationsApiHubInstancesLookupCall) Context(ctx context.Context) *ProjectsLocationsApiHubInstancesLookupCall {
6960 c.ctx_ = ctx
6961 return c
6962 }
6963
6964 // Header returns a http.Header that can be modified by the caller to add
6965 // headers to the request.
6966 func (c *ProjectsLocationsApiHubInstancesLookupCall) Header() http.Header {
6967 if c.header_ == nil {
6968 c.header_ = make(http.Header)
6969 }
6970 return c.header_
6971 }
6972
6973 func (c *ProjectsLocationsApiHubInstancesLookupCall) doRequest(alt string) (*http.Response, error) {
6974 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6975 if c.ifNoneMatch_ != "" {
6976 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6977 }
6978 c.urlParams_.Set("alt", alt)
6979 c.urlParams_.Set("prettyPrint", "false")
6980 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apiHubInstances:lookup")
6981 urls += "?" + c.urlParams_.Encode()
6982 req, err := http.NewRequest("GET", urls, nil)
6983 if err != nil {
6984 return nil, err
6985 }
6986 req.Header = reqHeaders
6987 googleapi.Expand(req.URL, map[string]string{
6988 "parent": c.parent,
6989 })
6990 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.lookup", "request", internallog.HTTPRequest(req, nil))
6991 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6992 }
6993
6994 // Do executes the "apihub.projects.locations.apiHubInstances.lookup" call.
6995 // Any non-2xx status code is an error. Response headers are in either
6996 // *GoogleCloudApihubV1LookupApiHubInstanceResponse.ServerResponse.Header or
6997 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
6998 // googleapi.IsNotModified to check whether the returned error was because
6999 // http.StatusNotModified was returned.
7000 func (c *ProjectsLocationsApiHubInstancesLookupCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1LookupApiHubInstanceResponse, error) {
7001 gensupport.SetOptions(c.urlParams_, opts...)
7002 res, err := c.doRequest("json")
7003 if res != nil && res.StatusCode == http.StatusNotModified {
7004 if res.Body != nil {
7005 res.Body.Close()
7006 }
7007 return nil, gensupport.WrapError(&googleapi.Error{
7008 Code: res.StatusCode,
7009 Header: res.Header,
7010 })
7011 }
7012 if err != nil {
7013 return nil, err
7014 }
7015 defer googleapi.CloseBody(res)
7016 if err := googleapi.CheckResponse(res); err != nil {
7017 return nil, gensupport.WrapError(err)
7018 }
7019 ret := &GoogleCloudApihubV1LookupApiHubInstanceResponse{
7020 ServerResponse: googleapi.ServerResponse{
7021 Header: res.Header,
7022 HTTPStatusCode: res.StatusCode,
7023 },
7024 }
7025 target := &ret
7026 b, err := gensupport.DecodeResponseBytes(target, res)
7027 if err != nil {
7028 return nil, err
7029 }
7030 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.lookup", "response", internallog.HTTPResponse(res, b))
7031 return ret, nil
7032 }
7033
7034 type ProjectsLocationsApiHubInstancesPatchCall struct {
7035 s *Service
7036 name string
7037 googlecloudapihubv1apihubinstance *GoogleCloudApihubV1ApiHubInstance
7038 urlParams_ gensupport.URLParams
7039 ctx_ context.Context
7040 header_ http.Header
7041 }
7042
7043 // Patch: Update an Api Hub instance. The following fields in the
7044 // ApiHubInstance can be updated: * disable_search * vertex_location *
7045 // agent_registry_sync_config The update_mask should be used to specify the
7046 // fields being updated.
7047 //
7048 // - name: Identifier. Format:
7049 // `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
7050 func (r *ProjectsLocationsApiHubInstancesService) Patch(name string, googlecloudapihubv1apihubinstance *GoogleCloudApihubV1ApiHubInstance) *ProjectsLocationsApiHubInstancesPatchCall {
7051 c := &ProjectsLocationsApiHubInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7052 c.name = name
7053 c.googlecloudapihubv1apihubinstance = googlecloudapihubv1apihubinstance
7054 return c
7055 }
7056
7057 // UpdateMask sets the optional parameter "updateMask": The list of fields to
7058 // update.
7059 func (c *ProjectsLocationsApiHubInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApiHubInstancesPatchCall {
7060 c.urlParams_.Set("updateMask", updateMask)
7061 return c
7062 }
7063
7064 // Fields allows partial responses to be retrieved. See
7065 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7066 // details.
7067 func (c *ProjectsLocationsApiHubInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApiHubInstancesPatchCall {
7068 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7069 return c
7070 }
7071
7072 // Context sets the context to be used in this call's Do method.
7073 func (c *ProjectsLocationsApiHubInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsApiHubInstancesPatchCall {
7074 c.ctx_ = ctx
7075 return c
7076 }
7077
7078 // Header returns a http.Header that can be modified by the caller to add
7079 // headers to the request.
7080 func (c *ProjectsLocationsApiHubInstancesPatchCall) Header() http.Header {
7081 if c.header_ == nil {
7082 c.header_ = make(http.Header)
7083 }
7084 return c.header_
7085 }
7086
7087 func (c *ProjectsLocationsApiHubInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
7088 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7089 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1apihubinstance)
7090 if err != nil {
7091 return nil, err
7092 }
7093 c.urlParams_.Set("alt", alt)
7094 c.urlParams_.Set("prettyPrint", "false")
7095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7096 urls += "?" + c.urlParams_.Encode()
7097 req, err := http.NewRequest("PATCH", urls, body)
7098 if err != nil {
7099 return nil, err
7100 }
7101 req.Header = reqHeaders
7102 googleapi.Expand(req.URL, map[string]string{
7103 "name": c.name,
7104 })
7105 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
7106 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7107 }
7108
7109 // Do executes the "apihub.projects.locations.apiHubInstances.patch" call.
7110 // Any non-2xx status code is an error. Response headers are in either
7111 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
7112 // returned at all) in error.(*googleapi.Error).Header. Use
7113 // googleapi.IsNotModified to check whether the returned error was because
7114 // http.StatusNotModified was returned.
7115 func (c *ProjectsLocationsApiHubInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
7116 gensupport.SetOptions(c.urlParams_, opts...)
7117 res, err := c.doRequest("json")
7118 if res != nil && res.StatusCode == http.StatusNotModified {
7119 if res.Body != nil {
7120 res.Body.Close()
7121 }
7122 return nil, gensupport.WrapError(&googleapi.Error{
7123 Code: res.StatusCode,
7124 Header: res.Header,
7125 })
7126 }
7127 if err != nil {
7128 return nil, err
7129 }
7130 defer googleapi.CloseBody(res)
7131 if err := googleapi.CheckResponse(res); err != nil {
7132 return nil, gensupport.WrapError(err)
7133 }
7134 ret := &GoogleLongrunningOperation{
7135 ServerResponse: googleapi.ServerResponse{
7136 Header: res.Header,
7137 HTTPStatusCode: res.StatusCode,
7138 },
7139 }
7140 target := &ret
7141 b, err := gensupport.DecodeResponseBytes(target, res)
7142 if err != nil {
7143 return nil, err
7144 }
7145 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apiHubInstances.patch", "response", internallog.HTTPResponse(res, b))
7146 return ret, nil
7147 }
7148
7149 type ProjectsLocationsApisCreateCall struct {
7150 s *Service
7151 parent string
7152 googlecloudapihubv1api *GoogleCloudApihubV1Api
7153 urlParams_ gensupport.URLParams
7154 ctx_ context.Context
7155 header_ http.Header
7156 }
7157
7158 // Create: Create an API resource in the API hub. Once an API resource is
7159 // created, versions can be added to it.
7160 //
7161 // - parent: The parent resource for the API resource. Format:
7162 // `projects/{project}/locations/{location}`.
7163 func (r *ProjectsLocationsApisService) Create(parent string, googlecloudapihubv1api *GoogleCloudApihubV1Api) *ProjectsLocationsApisCreateCall {
7164 c := &ProjectsLocationsApisCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7165 c.parent = parent
7166 c.googlecloudapihubv1api = googlecloudapihubv1api
7167 return c
7168 }
7169
7170 // ApiId sets the optional parameter "apiId": The ID to use for the API
7171 // resource, which will become the final component of the API's resource name.
7172 // This field is optional. * If provided, the same will be used. The service
7173 // will throw an error if the specified id is already used by another API
7174 // resource in the API hub. * If not provided, a system generated id will be
7175 // used. This value should be 4-500 characters, and valid characters are
7176 // /a-z[0-9]-_/.
7177 func (c *ProjectsLocationsApisCreateCall) ApiId(apiId string) *ProjectsLocationsApisCreateCall {
7178 c.urlParams_.Set("apiId", apiId)
7179 return c
7180 }
7181
7182 // Fields allows partial responses to be retrieved. See
7183 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7184 // details.
7185 func (c *ProjectsLocationsApisCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisCreateCall {
7186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7187 return c
7188 }
7189
7190 // Context sets the context to be used in this call's Do method.
7191 func (c *ProjectsLocationsApisCreateCall) Context(ctx context.Context) *ProjectsLocationsApisCreateCall {
7192 c.ctx_ = ctx
7193 return c
7194 }
7195
7196 // Header returns a http.Header that can be modified by the caller to add
7197 // headers to the request.
7198 func (c *ProjectsLocationsApisCreateCall) Header() http.Header {
7199 if c.header_ == nil {
7200 c.header_ = make(http.Header)
7201 }
7202 return c.header_
7203 }
7204
7205 func (c *ProjectsLocationsApisCreateCall) doRequest(alt string) (*http.Response, error) {
7206 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7207 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1api)
7208 if err != nil {
7209 return nil, err
7210 }
7211 c.urlParams_.Set("alt", alt)
7212 c.urlParams_.Set("prettyPrint", "false")
7213 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis")
7214 urls += "?" + c.urlParams_.Encode()
7215 req, err := http.NewRequest("POST", urls, body)
7216 if err != nil {
7217 return nil, err
7218 }
7219 req.Header = reqHeaders
7220 googleapi.Expand(req.URL, map[string]string{
7221 "parent": c.parent,
7222 })
7223 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.create", "request", internallog.HTTPRequest(req, body.Bytes()))
7224 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7225 }
7226
7227 // Do executes the "apihub.projects.locations.apis.create" call.
7228 // Any non-2xx status code is an error. Response headers are in either
7229 // *GoogleCloudApihubV1Api.ServerResponse.Header or (if a response was returned
7230 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7231 // check whether the returned error was because http.StatusNotModified was
7232 // returned.
7233 func (c *ProjectsLocationsApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Api, error) {
7234 gensupport.SetOptions(c.urlParams_, opts...)
7235 res, err := c.doRequest("json")
7236 if res != nil && res.StatusCode == http.StatusNotModified {
7237 if res.Body != nil {
7238 res.Body.Close()
7239 }
7240 return nil, gensupport.WrapError(&googleapi.Error{
7241 Code: res.StatusCode,
7242 Header: res.Header,
7243 })
7244 }
7245 if err != nil {
7246 return nil, err
7247 }
7248 defer googleapi.CloseBody(res)
7249 if err := googleapi.CheckResponse(res); err != nil {
7250 return nil, gensupport.WrapError(err)
7251 }
7252 ret := &GoogleCloudApihubV1Api{
7253 ServerResponse: googleapi.ServerResponse{
7254 Header: res.Header,
7255 HTTPStatusCode: res.StatusCode,
7256 },
7257 }
7258 target := &ret
7259 b, err := gensupport.DecodeResponseBytes(target, res)
7260 if err != nil {
7261 return nil, err
7262 }
7263 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.create", "response", internallog.HTTPResponse(res, b))
7264 return ret, nil
7265 }
7266
7267 type ProjectsLocationsApisDeleteCall struct {
7268 s *Service
7269 name string
7270 urlParams_ gensupport.URLParams
7271 ctx_ context.Context
7272 header_ http.Header
7273 }
7274
7275 // Delete: Delete an API resource in the API hub. API can only be deleted if
7276 // all underlying versions are deleted.
7277 //
7278 // - name: The name of the API resource to delete. Format:
7279 // `projects/{project}/locations/{location}/apis/{api}`.
7280 func (r *ProjectsLocationsApisService) Delete(name string) *ProjectsLocationsApisDeleteCall {
7281 c := &ProjectsLocationsApisDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7282 c.name = name
7283 return c
7284 }
7285
7286 // Force sets the optional parameter "force": If set to true, any versions from
7287 // this API will also be deleted. Otherwise, the request will only work if the
7288 // API has no versions.
7289 func (c *ProjectsLocationsApisDeleteCall) Force(force bool) *ProjectsLocationsApisDeleteCall {
7290 c.urlParams_.Set("force", fmt.Sprint(force))
7291 return c
7292 }
7293
7294 // Fields allows partial responses to be retrieved. See
7295 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7296 // details.
7297 func (c *ProjectsLocationsApisDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeleteCall {
7298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7299 return c
7300 }
7301
7302 // Context sets the context to be used in this call's Do method.
7303 func (c *ProjectsLocationsApisDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisDeleteCall {
7304 c.ctx_ = ctx
7305 return c
7306 }
7307
7308 // Header returns a http.Header that can be modified by the caller to add
7309 // headers to the request.
7310 func (c *ProjectsLocationsApisDeleteCall) Header() http.Header {
7311 if c.header_ == nil {
7312 c.header_ = make(http.Header)
7313 }
7314 return c.header_
7315 }
7316
7317 func (c *ProjectsLocationsApisDeleteCall) doRequest(alt string) (*http.Response, error) {
7318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7319 c.urlParams_.Set("alt", alt)
7320 c.urlParams_.Set("prettyPrint", "false")
7321 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7322 urls += "?" + c.urlParams_.Encode()
7323 req, err := http.NewRequest("DELETE", urls, nil)
7324 if err != nil {
7325 return nil, err
7326 }
7327 req.Header = reqHeaders
7328 googleapi.Expand(req.URL, map[string]string{
7329 "name": c.name,
7330 })
7331 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.delete", "request", internallog.HTTPRequest(req, nil))
7332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7333 }
7334
7335 // Do executes the "apihub.projects.locations.apis.delete" call.
7336 // Any non-2xx status code is an error. Response headers are in either
7337 // *Empty.ServerResponse.Header or (if a response was returned at all) in
7338 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7339 // whether the returned error was because http.StatusNotModified was returned.
7340 func (c *ProjectsLocationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7341 gensupport.SetOptions(c.urlParams_, opts...)
7342 res, err := c.doRequest("json")
7343 if res != nil && res.StatusCode == http.StatusNotModified {
7344 if res.Body != nil {
7345 res.Body.Close()
7346 }
7347 return nil, gensupport.WrapError(&googleapi.Error{
7348 Code: res.StatusCode,
7349 Header: res.Header,
7350 })
7351 }
7352 if err != nil {
7353 return nil, err
7354 }
7355 defer googleapi.CloseBody(res)
7356 if err := googleapi.CheckResponse(res); err != nil {
7357 return nil, gensupport.WrapError(err)
7358 }
7359 ret := &Empty{
7360 ServerResponse: googleapi.ServerResponse{
7361 Header: res.Header,
7362 HTTPStatusCode: res.StatusCode,
7363 },
7364 }
7365 target := &ret
7366 b, err := gensupport.DecodeResponseBytes(target, res)
7367 if err != nil {
7368 return nil, err
7369 }
7370 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.delete", "response", internallog.HTTPResponse(res, b))
7371 return ret, nil
7372 }
7373
7374 type ProjectsLocationsApisGetCall struct {
7375 s *Service
7376 name string
7377 urlParams_ gensupport.URLParams
7378 ifNoneMatch_ string
7379 ctx_ context.Context
7380 header_ http.Header
7381 }
7382
7383 // Get: Get API resource details including the API versions contained in it.
7384 //
7385 // - name: The name of the API resource to retrieve. Format:
7386 // `projects/{project}/locations/{location}/apis/{api}`.
7387 func (r *ProjectsLocationsApisService) Get(name string) *ProjectsLocationsApisGetCall {
7388 c := &ProjectsLocationsApisGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7389 c.name = name
7390 return c
7391 }
7392
7393 // Fields allows partial responses to be retrieved. See
7394 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7395 // details.
7396 func (c *ProjectsLocationsApisGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisGetCall {
7397 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7398 return c
7399 }
7400
7401 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7402 // object's ETag matches the given value. This is useful for getting updates
7403 // only after the object has changed since the last request.
7404 func (c *ProjectsLocationsApisGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisGetCall {
7405 c.ifNoneMatch_ = entityTag
7406 return c
7407 }
7408
7409 // Context sets the context to be used in this call's Do method.
7410 func (c *ProjectsLocationsApisGetCall) Context(ctx context.Context) *ProjectsLocationsApisGetCall {
7411 c.ctx_ = ctx
7412 return c
7413 }
7414
7415 // Header returns a http.Header that can be modified by the caller to add
7416 // headers to the request.
7417 func (c *ProjectsLocationsApisGetCall) Header() http.Header {
7418 if c.header_ == nil {
7419 c.header_ = make(http.Header)
7420 }
7421 return c.header_
7422 }
7423
7424 func (c *ProjectsLocationsApisGetCall) doRequest(alt string) (*http.Response, error) {
7425 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7426 if c.ifNoneMatch_ != "" {
7427 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7428 }
7429 c.urlParams_.Set("alt", alt)
7430 c.urlParams_.Set("prettyPrint", "false")
7431 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7432 urls += "?" + c.urlParams_.Encode()
7433 req, err := http.NewRequest("GET", urls, nil)
7434 if err != nil {
7435 return nil, err
7436 }
7437 req.Header = reqHeaders
7438 googleapi.Expand(req.URL, map[string]string{
7439 "name": c.name,
7440 })
7441 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.get", "request", internallog.HTTPRequest(req, nil))
7442 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7443 }
7444
7445 // Do executes the "apihub.projects.locations.apis.get" call.
7446 // Any non-2xx status code is an error. Response headers are in either
7447 // *GoogleCloudApihubV1Api.ServerResponse.Header or (if a response was returned
7448 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7449 // check whether the returned error was because http.StatusNotModified was
7450 // returned.
7451 func (c *ProjectsLocationsApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Api, error) {
7452 gensupport.SetOptions(c.urlParams_, opts...)
7453 res, err := c.doRequest("json")
7454 if res != nil && res.StatusCode == http.StatusNotModified {
7455 if res.Body != nil {
7456 res.Body.Close()
7457 }
7458 return nil, gensupport.WrapError(&googleapi.Error{
7459 Code: res.StatusCode,
7460 Header: res.Header,
7461 })
7462 }
7463 if err != nil {
7464 return nil, err
7465 }
7466 defer googleapi.CloseBody(res)
7467 if err := googleapi.CheckResponse(res); err != nil {
7468 return nil, gensupport.WrapError(err)
7469 }
7470 ret := &GoogleCloudApihubV1Api{
7471 ServerResponse: googleapi.ServerResponse{
7472 Header: res.Header,
7473 HTTPStatusCode: res.StatusCode,
7474 },
7475 }
7476 target := &ret
7477 b, err := gensupport.DecodeResponseBytes(target, res)
7478 if err != nil {
7479 return nil, err
7480 }
7481 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.get", "response", internallog.HTTPResponse(res, b))
7482 return ret, nil
7483 }
7484
7485 type ProjectsLocationsApisListCall struct {
7486 s *Service
7487 parent string
7488 urlParams_ gensupport.URLParams
7489 ifNoneMatch_ string
7490 ctx_ context.Context
7491 header_ http.Header
7492 }
7493
7494 // List: List API resources in the API hub.
7495 //
7496 // - parent: The parent, which owns this collection of API resources. Format:
7497 // `projects/{project}/locations/{location}`.
7498 func (r *ProjectsLocationsApisService) List(parent string) *ProjectsLocationsApisListCall {
7499 c := &ProjectsLocationsApisListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7500 c.parent = parent
7501 return c
7502 }
7503
7504 // Filter sets the optional parameter "filter": An expression that filters the
7505 // list of ApiResources. A filter expression consists of a field name, a
7506 // comparison operator, and a value for filtering. The value must be a string.
7507 // The comparison operator must be one of: `<`, `>`, `:` or `=`. Filters are
7508 // not case sensitive. The following fields in the `ApiResource` are eligible
7509 // for filtering: * `owner.email` - The email of the team which owns the
7510 // ApiResource. Allowed comparison operators: `=`. * `create_time` - The time
7511 // at which the ApiResource was created. The value should be in the
7512 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
7513 // operators: `>` and `<`. * `display_name` - The display name of the
7514 // ApiResource. Allowed comparison operators: `=`. *
7515 // `target_user.enum_values.values.id` - The allowed value id of the target
7516 // users attribute associated with the ApiResource. Allowed comparison operator
7517 // is `:`. * `target_user.enum_values.values.display_name` - The allowed value
7518 // display name of the target users attribute associated with the ApiResource.
7519 // Allowed comparison operator is `:`. * `team.enum_values.values.id` - The
7520 // allowed value id of the team attribute associated with the ApiResource.
7521 // Allowed comparison operator is `:`. * `team.enum_values.values.display_name`
7522 // - The allowed value display name of the team attribute associated with the
7523 // ApiResource. Allowed comparison operator is `:`. *
7524 // `business_unit.enum_values.values.id` - The allowed value id of the business
7525 // unit attribute associated with the ApiResource. Allowed comparison operator
7526 // is `:`. * `business_unit.enum_values.values.display_name` - The allowed
7527 // value display name of the business unit attribute associated with the
7528 // ApiResource. Allowed comparison operator is `:`. *
7529 // `maturity_level.enum_values.values.id` - The allowed value id of the
7530 // maturity level attribute associated with the ApiResource. Allowed comparison
7531 // operator is `:`. * `maturity_level.enum_values.values.display_name` - The
7532 // allowed value display name of the maturity level attribute associated with
7533 // the ApiResource. Allowed comparison operator is `:`. *
7534 // `api_style.enum_values.values.id` - The allowed value id of the api style
7535 // attribute associated with the ApiResource. Allowed comparison operator is
7536 // `:`. * `api_style.enum_values.values.display_name` - The allowed value
7537 // display name of the api style attribute associated with the ApiResource.
7538 // Allowed comparison operator is `:`. *
7539 // `attributes.projects/test-project-id/locations/test-location-id/
7540 // attributes/user-defined-attribute-id.enum_values.values.id` - The allowed
7541 // value id of the user defined enum attribute associated with the Resource.
7542 // Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a
7543 // placeholder that can be replaced with any user defined enum attribute name.
7544 // * `attributes.projects/test-project-id/locations/test-location-id/
7545 // attributes/user-defined-attribute-id.enum_values.values.display_name` - The
7546 // allowed value display name of the user defined enum attribute associated
7547 // with the Resource. Allowed comparison operator is `:`. Here
7548 // user-defined-attribute-enum-display-name is a placeholder that can be
7549 // replaced with any user defined enum attribute enum name. *
7550 // `attributes.projects/test-project-id/locations/test-location-id/
7551 // attributes/user-defined-attribute-id.string_values.values` - The allowed
7552 // value of the user defined string attribute associated with the Resource.
7553 // Allowed comparison operator is `:`. Here user-defined-attribute-string is a
7554 // placeholder that can be replaced with any user defined string attribute
7555 // name. * `attributes.projects/test-project-id/locations/test-location-id/
7556 // attributes/user-defined-attribute-id.json_values.values` - The allowed value
7557 // of the user defined JSON attribute associated with the Resource. Allowed
7558 // comparison operator is `:`. Here user-defined-attribute-json is a
7559 // placeholder that can be replaced with any user defined JSON attribute name.
7560 // A filter function is also supported in the filter string. The filter
7561 // function is `id(name)`. The `id(name)` function returns the id of the
7562 // resource name. For example, `id(name) = \"api-1\" is equivalent to `name =
7563 // \"projects/test-project-id/locations/test-location-id/apis/api-1\" provided
7564 // the parent is `projects/test-project-id/locations/test-location-id`. Another
7565 // supported filter function is `plugins(source_metadata)`. This function
7566 // filters for resources that are associated with a specific plugin. For
7567 // example, `plugins(source_metadata) :
7568 // "projects/test-project-id/locations/test-location-id/plugins/test-plugin-id"
7569 //
7570 // will return resources sourced from the given plugin. Expressions are
7571 //
7572 // combined with either `AND` logic operator or `OR` logical operator but not
7573 // both of them together i.e. only one of the `AND` or `OR` operator can be
7574 // used throughout the filter string and both the operators cannot be used
7575 // together. No other logical operators are supported. At most three filter
7576 // fields are allowed in the filter string and if provided more than that then
7577 // `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: *
7578 // `owner.email = \"[email protected]\" - - The owner team email is
7579 // [email protected]_. * `owner.email = \"[email protected]\" AND create_time
7580 // < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The
7581 // owner team email is [email protected]_ and the api was created before
7582 // _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. *
7583 // `owner.email = \"[email protected]\" OR team.enum_values.values.id:
7584 // apihub-team-id` - The filter string specifies the APIs where the owner team
7585 // email is [email protected]_ or the id of the allowed value associated with
7586 // the team attribute is _apihub-team-id_. * `owner.email =
7587 // \"[email protected]\" OR team.enum_values.values.display_name: ApiHub Team`
7588 // - The filter string specifies the APIs where the owner team email is
7589 // [email protected]_ or the display name of the allowed value associated with
7590 // the team attribute is `ApiHub Team`. * `owner.email = \"[email protected]\"
7591 // AND attributes.projects/test-project-id/locations/test-location-id/
7592 // attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id:
7593 // test_enum_id AND
7594 // attributes.projects/test-project-id/locations/test-location-id/
7595 // attributes/1765\0f90-4a29-5431-b3d0-d5532da3764c.string_values.values:
7596 // test_string_value` - The filter string specifies the APIs where the owner
7597 // team email is [email protected]_ and the id of the allowed value associated
7598 // with the user defined attribute of type enum is _test_enum_id_ and the value
7599 // of the user defined attribute of type string is _test_..
7600 func (c *ProjectsLocationsApisListCall) Filter(filter string) *ProjectsLocationsApisListCall {
7601 c.urlParams_.Set("filter", filter)
7602 return c
7603 }
7604
7605 // PageSize sets the optional parameter "pageSize": The maximum number of API
7606 // resources to return. The service may return fewer than this value. If
7607 // unspecified, at most 50 Apis will be returned. The maximum value is 1000;
7608 // values above 1000 will be coerced to 1000.
7609 func (c *ProjectsLocationsApisListCall) PageSize(pageSize int64) *ProjectsLocationsApisListCall {
7610 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7611 return c
7612 }
7613
7614 // PageToken sets the optional parameter "pageToken": A page token, received
7615 // from a previous `ListApis` call. Provide this to retrieve the subsequent
7616 // page. When paginating, all other parameters (except page_size) provided to
7617 // `ListApis` must match the call that provided the page token.
7618 func (c *ProjectsLocationsApisListCall) PageToken(pageToken string) *ProjectsLocationsApisListCall {
7619 c.urlParams_.Set("pageToken", pageToken)
7620 return c
7621 }
7622
7623 // Fields allows partial responses to be retrieved. See
7624 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7625 // details.
7626 func (c *ProjectsLocationsApisListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisListCall {
7627 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7628 return c
7629 }
7630
7631 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7632 // object's ETag matches the given value. This is useful for getting updates
7633 // only after the object has changed since the last request.
7634 func (c *ProjectsLocationsApisListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisListCall {
7635 c.ifNoneMatch_ = entityTag
7636 return c
7637 }
7638
7639 // Context sets the context to be used in this call's Do method.
7640 func (c *ProjectsLocationsApisListCall) Context(ctx context.Context) *ProjectsLocationsApisListCall {
7641 c.ctx_ = ctx
7642 return c
7643 }
7644
7645 // Header returns a http.Header that can be modified by the caller to add
7646 // headers to the request.
7647 func (c *ProjectsLocationsApisListCall) Header() http.Header {
7648 if c.header_ == nil {
7649 c.header_ = make(http.Header)
7650 }
7651 return c.header_
7652 }
7653
7654 func (c *ProjectsLocationsApisListCall) doRequest(alt string) (*http.Response, error) {
7655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7656 if c.ifNoneMatch_ != "" {
7657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7658 }
7659 c.urlParams_.Set("alt", alt)
7660 c.urlParams_.Set("prettyPrint", "false")
7661 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis")
7662 urls += "?" + c.urlParams_.Encode()
7663 req, err := http.NewRequest("GET", urls, nil)
7664 if err != nil {
7665 return nil, err
7666 }
7667 req.Header = reqHeaders
7668 googleapi.Expand(req.URL, map[string]string{
7669 "parent": c.parent,
7670 })
7671 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.list", "request", internallog.HTTPRequest(req, nil))
7672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7673 }
7674
7675 // Do executes the "apihub.projects.locations.apis.list" call.
7676 // Any non-2xx status code is an error. Response headers are in either
7677 // *GoogleCloudApihubV1ListApisResponse.ServerResponse.Header or (if a response
7678 // was returned at all) in error.(*googleapi.Error).Header. Use
7679 // googleapi.IsNotModified to check whether the returned error was because
7680 // http.StatusNotModified was returned.
7681 func (c *ProjectsLocationsApisListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListApisResponse, error) {
7682 gensupport.SetOptions(c.urlParams_, opts...)
7683 res, err := c.doRequest("json")
7684 if res != nil && res.StatusCode == http.StatusNotModified {
7685 if res.Body != nil {
7686 res.Body.Close()
7687 }
7688 return nil, gensupport.WrapError(&googleapi.Error{
7689 Code: res.StatusCode,
7690 Header: res.Header,
7691 })
7692 }
7693 if err != nil {
7694 return nil, err
7695 }
7696 defer googleapi.CloseBody(res)
7697 if err := googleapi.CheckResponse(res); err != nil {
7698 return nil, gensupport.WrapError(err)
7699 }
7700 ret := &GoogleCloudApihubV1ListApisResponse{
7701 ServerResponse: googleapi.ServerResponse{
7702 Header: res.Header,
7703 HTTPStatusCode: res.StatusCode,
7704 },
7705 }
7706 target := &ret
7707 b, err := gensupport.DecodeResponseBytes(target, res)
7708 if err != nil {
7709 return nil, err
7710 }
7711 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.list", "response", internallog.HTTPResponse(res, b))
7712 return ret, nil
7713 }
7714
7715 // Pages invokes f for each page of results.
7716 // A non-nil error returned from f will halt the iteration.
7717 // The provided context supersedes any context provided to the Context method.
7718 func (c *ProjectsLocationsApisListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListApisResponse) error) error {
7719 c.ctx_ = ctx
7720 defer c.PageToken(c.urlParams_.Get("pageToken"))
7721 for {
7722 x, err := c.Do()
7723 if err != nil {
7724 return err
7725 }
7726 if err := f(x); err != nil {
7727 return err
7728 }
7729 if x.NextPageToken == "" {
7730 return nil
7731 }
7732 c.PageToken(x.NextPageToken)
7733 }
7734 }
7735
7736 type ProjectsLocationsApisPatchCall struct {
7737 s *Service
7738 name string
7739 googlecloudapihubv1api *GoogleCloudApihubV1Api
7740 urlParams_ gensupport.URLParams
7741 ctx_ context.Context
7742 header_ http.Header
7743 }
7744
7745 // Patch: Update an API resource in the API hub. The following fields in the
7746 // API can be updated: * display_name * description * owner * documentation *
7747 // target_user * team * business_unit * maturity_level * api_style * attributes
7748 // * fingerprint The update_mask should be used to specify the fields being
7749 // updated. Updating the owner field requires complete owner message and
7750 // updates both owner and email fields.
7751 //
7752 // - name: Identifier. The name of the API resource in the API Hub. Format:
7753 // `projects/{project}/locations/{location}/apis/{api}`.
7754 func (r *ProjectsLocationsApisService) Patch(name string, googlecloudapihubv1api *GoogleCloudApihubV1Api) *ProjectsLocationsApisPatchCall {
7755 c := &ProjectsLocationsApisPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7756 c.name = name
7757 c.googlecloudapihubv1api = googlecloudapihubv1api
7758 return c
7759 }
7760
7761 // UpdateMask sets the optional parameter "updateMask": Required. The list of
7762 // fields to update.
7763 func (c *ProjectsLocationsApisPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisPatchCall {
7764 c.urlParams_.Set("updateMask", updateMask)
7765 return c
7766 }
7767
7768 // Fields allows partial responses to be retrieved. See
7769 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7770 // details.
7771 func (c *ProjectsLocationsApisPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisPatchCall {
7772 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7773 return c
7774 }
7775
7776 // Context sets the context to be used in this call's Do method.
7777 func (c *ProjectsLocationsApisPatchCall) Context(ctx context.Context) *ProjectsLocationsApisPatchCall {
7778 c.ctx_ = ctx
7779 return c
7780 }
7781
7782 // Header returns a http.Header that can be modified by the caller to add
7783 // headers to the request.
7784 func (c *ProjectsLocationsApisPatchCall) Header() http.Header {
7785 if c.header_ == nil {
7786 c.header_ = make(http.Header)
7787 }
7788 return c.header_
7789 }
7790
7791 func (c *ProjectsLocationsApisPatchCall) doRequest(alt string) (*http.Response, error) {
7792 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7793 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1api)
7794 if err != nil {
7795 return nil, err
7796 }
7797 c.urlParams_.Set("alt", alt)
7798 c.urlParams_.Set("prettyPrint", "false")
7799 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7800 urls += "?" + c.urlParams_.Encode()
7801 req, err := http.NewRequest("PATCH", urls, body)
7802 if err != nil {
7803 return nil, err
7804 }
7805 req.Header = reqHeaders
7806 googleapi.Expand(req.URL, map[string]string{
7807 "name": c.name,
7808 })
7809 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
7810 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7811 }
7812
7813 // Do executes the "apihub.projects.locations.apis.patch" call.
7814 // Any non-2xx status code is an error. Response headers are in either
7815 // *GoogleCloudApihubV1Api.ServerResponse.Header or (if a response was returned
7816 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7817 // check whether the returned error was because http.StatusNotModified was
7818 // returned.
7819 func (c *ProjectsLocationsApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Api, error) {
7820 gensupport.SetOptions(c.urlParams_, opts...)
7821 res, err := c.doRequest("json")
7822 if res != nil && res.StatusCode == http.StatusNotModified {
7823 if res.Body != nil {
7824 res.Body.Close()
7825 }
7826 return nil, gensupport.WrapError(&googleapi.Error{
7827 Code: res.StatusCode,
7828 Header: res.Header,
7829 })
7830 }
7831 if err != nil {
7832 return nil, err
7833 }
7834 defer googleapi.CloseBody(res)
7835 if err := googleapi.CheckResponse(res); err != nil {
7836 return nil, gensupport.WrapError(err)
7837 }
7838 ret := &GoogleCloudApihubV1Api{
7839 ServerResponse: googleapi.ServerResponse{
7840 Header: res.Header,
7841 HTTPStatusCode: res.StatusCode,
7842 },
7843 }
7844 target := &ret
7845 b, err := gensupport.DecodeResponseBytes(target, res)
7846 if err != nil {
7847 return nil, err
7848 }
7849 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.patch", "response", internallog.HTTPResponse(res, b))
7850 return ret, nil
7851 }
7852
7853 type ProjectsLocationsApisVersionsCreateCall struct {
7854 s *Service
7855 parent string
7856 googlecloudapihubv1version *GoogleCloudApihubV1Version
7857 urlParams_ gensupport.URLParams
7858 ctx_ context.Context
7859 header_ http.Header
7860 }
7861
7862 // Create: Create an API version for an API resource in the API hub.
7863 //
7864 // - parent: The parent resource for API version. Format:
7865 // `projects/{project}/locations/{location}/apis/{api}`.
7866 func (r *ProjectsLocationsApisVersionsService) Create(parent string, googlecloudapihubv1version *GoogleCloudApihubV1Version) *ProjectsLocationsApisVersionsCreateCall {
7867 c := &ProjectsLocationsApisVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7868 c.parent = parent
7869 c.googlecloudapihubv1version = googlecloudapihubv1version
7870 return c
7871 }
7872
7873 // VersionId sets the optional parameter "versionId": The ID to use for the API
7874 // version, which will become the final component of the version's resource
7875 // name. This field is optional. * If provided, the same will be used. The
7876 // service will throw an error if the specified id is already used by another
7877 // version in the API resource. * If not provided, a system generated id will
7878 // be used. This value should be 4-500 characters, overall resource name which
7879 // will be of format
7880 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, its
7881 // length is limited to 700 characters and valid characters are /a-z[0-9]-_/.
7882 func (c *ProjectsLocationsApisVersionsCreateCall) VersionId(versionId string) *ProjectsLocationsApisVersionsCreateCall {
7883 c.urlParams_.Set("versionId", versionId)
7884 return c
7885 }
7886
7887 // Fields allows partial responses to be retrieved. See
7888 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7889 // details.
7890 func (c *ProjectsLocationsApisVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsCreateCall {
7891 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7892 return c
7893 }
7894
7895 // Context sets the context to be used in this call's Do method.
7896 func (c *ProjectsLocationsApisVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsCreateCall {
7897 c.ctx_ = ctx
7898 return c
7899 }
7900
7901 // Header returns a http.Header that can be modified by the caller to add
7902 // headers to the request.
7903 func (c *ProjectsLocationsApisVersionsCreateCall) Header() http.Header {
7904 if c.header_ == nil {
7905 c.header_ = make(http.Header)
7906 }
7907 return c.header_
7908 }
7909
7910 func (c *ProjectsLocationsApisVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
7911 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7912 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1version)
7913 if err != nil {
7914 return nil, err
7915 }
7916 c.urlParams_.Set("alt", alt)
7917 c.urlParams_.Set("prettyPrint", "false")
7918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
7919 urls += "?" + c.urlParams_.Encode()
7920 req, err := http.NewRequest("POST", urls, body)
7921 if err != nil {
7922 return nil, err
7923 }
7924 req.Header = reqHeaders
7925 googleapi.Expand(req.URL, map[string]string{
7926 "parent": c.parent,
7927 })
7928 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.create", "request", internallog.HTTPRequest(req, body.Bytes()))
7929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7930 }
7931
7932 // Do executes the "apihub.projects.locations.apis.versions.create" call.
7933 // Any non-2xx status code is an error. Response headers are in either
7934 // *GoogleCloudApihubV1Version.ServerResponse.Header or (if a response was
7935 // returned at all) in error.(*googleapi.Error).Header. Use
7936 // googleapi.IsNotModified to check whether the returned error was because
7937 // http.StatusNotModified was returned.
7938 func (c *ProjectsLocationsApisVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Version, error) {
7939 gensupport.SetOptions(c.urlParams_, opts...)
7940 res, err := c.doRequest("json")
7941 if res != nil && res.StatusCode == http.StatusNotModified {
7942 if res.Body != nil {
7943 res.Body.Close()
7944 }
7945 return nil, gensupport.WrapError(&googleapi.Error{
7946 Code: res.StatusCode,
7947 Header: res.Header,
7948 })
7949 }
7950 if err != nil {
7951 return nil, err
7952 }
7953 defer googleapi.CloseBody(res)
7954 if err := googleapi.CheckResponse(res); err != nil {
7955 return nil, gensupport.WrapError(err)
7956 }
7957 ret := &GoogleCloudApihubV1Version{
7958 ServerResponse: googleapi.ServerResponse{
7959 Header: res.Header,
7960 HTTPStatusCode: res.StatusCode,
7961 },
7962 }
7963 target := &ret
7964 b, err := gensupport.DecodeResponseBytes(target, res)
7965 if err != nil {
7966 return nil, err
7967 }
7968 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.create", "response", internallog.HTTPResponse(res, b))
7969 return ret, nil
7970 }
7971
7972 type ProjectsLocationsApisVersionsDeleteCall struct {
7973 s *Service
7974 name string
7975 urlParams_ gensupport.URLParams
7976 ctx_ context.Context
7977 header_ http.Header
7978 }
7979
7980 // Delete: Delete an API version. Version can only be deleted if all underlying
7981 // specs, operations, definitions and linked deployments are deleted.
7982 //
7983 // - name: The name of the version to delete. Format:
7984 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
7985 func (r *ProjectsLocationsApisVersionsService) Delete(name string) *ProjectsLocationsApisVersionsDeleteCall {
7986 c := &ProjectsLocationsApisVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7987 c.name = name
7988 return c
7989 }
7990
7991 // Force sets the optional parameter "force": If set to true, any specs from
7992 // this version will also be deleted. Otherwise, the request will only work if
7993 // the version has no specs.
7994 func (c *ProjectsLocationsApisVersionsDeleteCall) Force(force bool) *ProjectsLocationsApisVersionsDeleteCall {
7995 c.urlParams_.Set("force", fmt.Sprint(force))
7996 return c
7997 }
7998
7999 // Fields allows partial responses to be retrieved. See
8000 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8001 // details.
8002 func (c *ProjectsLocationsApisVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsDeleteCall {
8003 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8004 return c
8005 }
8006
8007 // Context sets the context to be used in this call's Do method.
8008 func (c *ProjectsLocationsApisVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsDeleteCall {
8009 c.ctx_ = ctx
8010 return c
8011 }
8012
8013 // Header returns a http.Header that can be modified by the caller to add
8014 // headers to the request.
8015 func (c *ProjectsLocationsApisVersionsDeleteCall) Header() http.Header {
8016 if c.header_ == nil {
8017 c.header_ = make(http.Header)
8018 }
8019 return c.header_
8020 }
8021
8022 func (c *ProjectsLocationsApisVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
8023 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8024 c.urlParams_.Set("alt", alt)
8025 c.urlParams_.Set("prettyPrint", "false")
8026 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8027 urls += "?" + c.urlParams_.Encode()
8028 req, err := http.NewRequest("DELETE", urls, nil)
8029 if err != nil {
8030 return nil, err
8031 }
8032 req.Header = reqHeaders
8033 googleapi.Expand(req.URL, map[string]string{
8034 "name": c.name,
8035 })
8036 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.delete", "request", internallog.HTTPRequest(req, nil))
8037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8038 }
8039
8040 // Do executes the "apihub.projects.locations.apis.versions.delete" call.
8041 // Any non-2xx status code is an error. Response headers are in either
8042 // *Empty.ServerResponse.Header or (if a response was returned at all) in
8043 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8044 // whether the returned error was because http.StatusNotModified was returned.
8045 func (c *ProjectsLocationsApisVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8046 gensupport.SetOptions(c.urlParams_, opts...)
8047 res, err := c.doRequest("json")
8048 if res != nil && res.StatusCode == http.StatusNotModified {
8049 if res.Body != nil {
8050 res.Body.Close()
8051 }
8052 return nil, gensupport.WrapError(&googleapi.Error{
8053 Code: res.StatusCode,
8054 Header: res.Header,
8055 })
8056 }
8057 if err != nil {
8058 return nil, err
8059 }
8060 defer googleapi.CloseBody(res)
8061 if err := googleapi.CheckResponse(res); err != nil {
8062 return nil, gensupport.WrapError(err)
8063 }
8064 ret := &Empty{
8065 ServerResponse: googleapi.ServerResponse{
8066 Header: res.Header,
8067 HTTPStatusCode: res.StatusCode,
8068 },
8069 }
8070 target := &ret
8071 b, err := gensupport.DecodeResponseBytes(target, res)
8072 if err != nil {
8073 return nil, err
8074 }
8075 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.delete", "response", internallog.HTTPResponse(res, b))
8076 return ret, nil
8077 }
8078
8079 type ProjectsLocationsApisVersionsGetCall struct {
8080 s *Service
8081 name string
8082 urlParams_ gensupport.URLParams
8083 ifNoneMatch_ string
8084 ctx_ context.Context
8085 header_ http.Header
8086 }
8087
8088 // Get: Get details about the API version of an API resource. This will include
8089 // information about the specs and operations present in the API version as
8090 // well as the deployments linked to it.
8091 //
8092 // - name: The name of the API version to retrieve. Format:
8093 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
8094 func (r *ProjectsLocationsApisVersionsService) Get(name string) *ProjectsLocationsApisVersionsGetCall {
8095 c := &ProjectsLocationsApisVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8096 c.name = name
8097 return c
8098 }
8099
8100 // Fields allows partial responses to be retrieved. See
8101 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8102 // details.
8103 func (c *ProjectsLocationsApisVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsGetCall {
8104 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8105 return c
8106 }
8107
8108 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8109 // object's ETag matches the given value. This is useful for getting updates
8110 // only after the object has changed since the last request.
8111 func (c *ProjectsLocationsApisVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsGetCall {
8112 c.ifNoneMatch_ = entityTag
8113 return c
8114 }
8115
8116 // Context sets the context to be used in this call's Do method.
8117 func (c *ProjectsLocationsApisVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsGetCall {
8118 c.ctx_ = ctx
8119 return c
8120 }
8121
8122 // Header returns a http.Header that can be modified by the caller to add
8123 // headers to the request.
8124 func (c *ProjectsLocationsApisVersionsGetCall) Header() http.Header {
8125 if c.header_ == nil {
8126 c.header_ = make(http.Header)
8127 }
8128 return c.header_
8129 }
8130
8131 func (c *ProjectsLocationsApisVersionsGetCall) doRequest(alt string) (*http.Response, error) {
8132 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8133 if c.ifNoneMatch_ != "" {
8134 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8135 }
8136 c.urlParams_.Set("alt", alt)
8137 c.urlParams_.Set("prettyPrint", "false")
8138 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8139 urls += "?" + c.urlParams_.Encode()
8140 req, err := http.NewRequest("GET", urls, nil)
8141 if err != nil {
8142 return nil, err
8143 }
8144 req.Header = reqHeaders
8145 googleapi.Expand(req.URL, map[string]string{
8146 "name": c.name,
8147 })
8148 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.get", "request", internallog.HTTPRequest(req, nil))
8149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8150 }
8151
8152 // Do executes the "apihub.projects.locations.apis.versions.get" call.
8153 // Any non-2xx status code is an error. Response headers are in either
8154 // *GoogleCloudApihubV1Version.ServerResponse.Header or (if a response was
8155 // returned at all) in error.(*googleapi.Error).Header. Use
8156 // googleapi.IsNotModified to check whether the returned error was because
8157 // http.StatusNotModified was returned.
8158 func (c *ProjectsLocationsApisVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Version, error) {
8159 gensupport.SetOptions(c.urlParams_, opts...)
8160 res, err := c.doRequest("json")
8161 if res != nil && res.StatusCode == http.StatusNotModified {
8162 if res.Body != nil {
8163 res.Body.Close()
8164 }
8165 return nil, gensupport.WrapError(&googleapi.Error{
8166 Code: res.StatusCode,
8167 Header: res.Header,
8168 })
8169 }
8170 if err != nil {
8171 return nil, err
8172 }
8173 defer googleapi.CloseBody(res)
8174 if err := googleapi.CheckResponse(res); err != nil {
8175 return nil, gensupport.WrapError(err)
8176 }
8177 ret := &GoogleCloudApihubV1Version{
8178 ServerResponse: googleapi.ServerResponse{
8179 Header: res.Header,
8180 HTTPStatusCode: res.StatusCode,
8181 },
8182 }
8183 target := &ret
8184 b, err := gensupport.DecodeResponseBytes(target, res)
8185 if err != nil {
8186 return nil, err
8187 }
8188 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.get", "response", internallog.HTTPResponse(res, b))
8189 return ret, nil
8190 }
8191
8192 type ProjectsLocationsApisVersionsListCall struct {
8193 s *Service
8194 parent string
8195 urlParams_ gensupport.URLParams
8196 ifNoneMatch_ string
8197 ctx_ context.Context
8198 header_ http.Header
8199 }
8200
8201 // List: List API versions of an API resource in the API hub.
8202 //
8203 // - parent: The parent which owns this collection of API versions i.e., the
8204 // API resource Format: `projects/{project}/locations/{location}/apis/{api}`.
8205 func (r *ProjectsLocationsApisVersionsService) List(parent string) *ProjectsLocationsApisVersionsListCall {
8206 c := &ProjectsLocationsApisVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8207 c.parent = parent
8208 return c
8209 }
8210
8211 // Filter sets the optional parameter "filter": An expression that filters the
8212 // list of Versions. A filter expression consists of a field name, a comparison
8213 // operator, and a value for filtering. The value must be a string, a number,
8214 // or a boolean. The comparison operator must be one of: `<`, `>` or `=`.
8215 // Filters are not case sensitive. The following fields in the `Version` are
8216 // eligible for filtering: * `display_name` - The display name of the Version.
8217 // Allowed comparison operators: `=`. * `create_time` - The time at which the
8218 // Version was created. The value should be in the
8219 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
8220 // operators: `>` and `<`. * `lifecycle.enum_values.values.id` - The allowed
8221 // value id of the lifecycle attribute associated with the Version. Allowed
8222 // comparison operators: `:`. * `lifecycle.enum_values.values.display_name` -
8223 // The allowed value display name of the lifecycle attribute associated with
8224 // the Version. Allowed comparison operators: `:`. *
8225 // `compliance.enum_values.values.id` - The allowed value id of the compliances
8226 // attribute associated with the Version. Allowed comparison operators: `:`. *
8227 // `compliance.enum_values.values.display_name` - The allowed value display
8228 // name of the compliances attribute associated with the Version. Allowed
8229 // comparison operators: `:`. * `accreditation.enum_values.values.id` - The
8230 // allowed value id of the accreditations attribute associated with the
8231 // Version. Allowed comparison operators: `:`. *
8232 // `accreditation.enum_values.values.display_name` - The allowed value display
8233 // name of the accreditations attribute associated with the Version. Allowed
8234 // comparison operators: `:`. *
8235 // `attributes.projects/test-project-id/locations/test-location-id/
8236 // attributes/user-defined-attribute-id.enum_values.values.id` - The allowed
8237 // value id of the user defined enum attribute associated with the Resource.
8238 // Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a
8239 // placeholder that can be replaced with any user defined enum attribute name.
8240 // * `attributes.projects/test-project-id/locations/test-location-id/
8241 // attributes/user-defined-attribute-id.enum_values.values.display_name` - The
8242 // allowed value display name of the user defined enum attribute associated
8243 // with the Resource. Allowed comparison operator is `:`. Here
8244 // user-defined-attribute-enum-display-name is a placeholder that can be
8245 // replaced with any user defined enum attribute enum name. *
8246 // `attributes.projects/test-project-id/locations/test-location-id/
8247 // attributes/user-defined-attribute-id.string_values.values` - The allowed
8248 // value of the user defined string attribute associated with the Resource.
8249 // Allowed comparison operator is `:`. Here user-defined-attribute-string is a
8250 // placeholder that can be replaced with any user defined string attribute
8251 // name. * `attributes.projects/test-project-id/locations/test-location-id/
8252 // attributes/user-defined-attribute-id.json_values.values` - The allowed value
8253 // of the user defined JSON attribute associated with the Resource. Allowed
8254 // comparison operator is `:`. Here user-defined-attribute-json is a
8255 // placeholder that can be replaced with any user defined JSON attribute name.
8256 // Expressions are combined with either `AND` logic operator or `OR` logical
8257 // operator but not both of them together i.e. only one of the `AND` or `OR`
8258 // operator can be used throughout the filter string and both the operators
8259 // cannot be used together. No other logical operators are supported. At most
8260 // three filter fields are allowed in the filter string and if provided more
8261 // than that then `INVALID_ARGUMENT` error is returned by the API. Here are a
8262 // few examples: * `lifecycle.enum_values.values.id: preview-id` - The filter
8263 // string specifies that the id of the allowed value associated with the
8264 // lifecycle attribute of the Version is _preview-id_. *
8265 // `lifecycle.enum_values.values.display_name: \"Preview Display Name\" - The
8266 // filter string specifies that the display name of the allowed value
8267 // associated with the lifecycle attribute of the Version is `Preview Display
8268 // Name`. * `lifecycle.enum_values.values.id: preview-id AND create_time <
8269 // \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The
8270 // id of the allowed value associated with the lifecycle attribute of the
8271 // Version is _preview-id_ and it was created before _2021-08-15 14:50:00 UTC_
8272 // and after _2021-08-10 12:00:00 UTC_. * `compliance.enum_values.values.id:
8273 // gdpr-id OR compliance.enum_values.values.id: pci-dss-id` - The id of the
8274 // allowed value associated with the compliance attribute is _gdpr-id_ or
8275 // _pci-dss-id_. * `lifecycle.enum_values.values.id: preview-id AND
8276 // attributes.projects/test-project-id/locations/test-location-id/
8277 // attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test`
8278 // - The filter string specifies that the id of the allowed value associated
8279 // with the lifecycle attribute of the Version is _preview-id_ and the value of
8280 // the user defined attribute of type string is _test_.
8281 func (c *ProjectsLocationsApisVersionsListCall) Filter(filter string) *ProjectsLocationsApisVersionsListCall {
8282 c.urlParams_.Set("filter", filter)
8283 return c
8284 }
8285
8286 // PageSize sets the optional parameter "pageSize": The maximum number of
8287 // versions to return. The service may return fewer than this value. If
8288 // unspecified, at most 50 versions will be returned. The maximum value is
8289 // 1000; values above 1000 will be coerced to 1000.
8290 func (c *ProjectsLocationsApisVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsListCall {
8291 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8292 return c
8293 }
8294
8295 // PageToken sets the optional parameter "pageToken": A page token, received
8296 // from a previous `ListVersions` call. Provide this to retrieve the subsequent
8297 // page. When paginating, all other parameters (except page_size) provided to
8298 // `ListVersions` must match the call that provided the page token.
8299 func (c *ProjectsLocationsApisVersionsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsListCall {
8300 c.urlParams_.Set("pageToken", pageToken)
8301 return c
8302 }
8303
8304 // Fields allows partial responses to be retrieved. See
8305 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8306 // details.
8307 func (c *ProjectsLocationsApisVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsListCall {
8308 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8309 return c
8310 }
8311
8312 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8313 // object's ETag matches the given value. This is useful for getting updates
8314 // only after the object has changed since the last request.
8315 func (c *ProjectsLocationsApisVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsListCall {
8316 c.ifNoneMatch_ = entityTag
8317 return c
8318 }
8319
8320 // Context sets the context to be used in this call's Do method.
8321 func (c *ProjectsLocationsApisVersionsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsListCall {
8322 c.ctx_ = ctx
8323 return c
8324 }
8325
8326 // Header returns a http.Header that can be modified by the caller to add
8327 // headers to the request.
8328 func (c *ProjectsLocationsApisVersionsListCall) Header() http.Header {
8329 if c.header_ == nil {
8330 c.header_ = make(http.Header)
8331 }
8332 return c.header_
8333 }
8334
8335 func (c *ProjectsLocationsApisVersionsListCall) doRequest(alt string) (*http.Response, error) {
8336 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8337 if c.ifNoneMatch_ != "" {
8338 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8339 }
8340 c.urlParams_.Set("alt", alt)
8341 c.urlParams_.Set("prettyPrint", "false")
8342 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
8343 urls += "?" + c.urlParams_.Encode()
8344 req, err := http.NewRequest("GET", urls, nil)
8345 if err != nil {
8346 return nil, err
8347 }
8348 req.Header = reqHeaders
8349 googleapi.Expand(req.URL, map[string]string{
8350 "parent": c.parent,
8351 })
8352 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.list", "request", internallog.HTTPRequest(req, nil))
8353 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8354 }
8355
8356 // Do executes the "apihub.projects.locations.apis.versions.list" call.
8357 // Any non-2xx status code is an error. Response headers are in either
8358 // *GoogleCloudApihubV1ListVersionsResponse.ServerResponse.Header or (if a
8359 // response was returned at all) in error.(*googleapi.Error).Header. Use
8360 // googleapi.IsNotModified to check whether the returned error was because
8361 // http.StatusNotModified was returned.
8362 func (c *ProjectsLocationsApisVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListVersionsResponse, error) {
8363 gensupport.SetOptions(c.urlParams_, opts...)
8364 res, err := c.doRequest("json")
8365 if res != nil && res.StatusCode == http.StatusNotModified {
8366 if res.Body != nil {
8367 res.Body.Close()
8368 }
8369 return nil, gensupport.WrapError(&googleapi.Error{
8370 Code: res.StatusCode,
8371 Header: res.Header,
8372 })
8373 }
8374 if err != nil {
8375 return nil, err
8376 }
8377 defer googleapi.CloseBody(res)
8378 if err := googleapi.CheckResponse(res); err != nil {
8379 return nil, gensupport.WrapError(err)
8380 }
8381 ret := &GoogleCloudApihubV1ListVersionsResponse{
8382 ServerResponse: googleapi.ServerResponse{
8383 Header: res.Header,
8384 HTTPStatusCode: res.StatusCode,
8385 },
8386 }
8387 target := &ret
8388 b, err := gensupport.DecodeResponseBytes(target, res)
8389 if err != nil {
8390 return nil, err
8391 }
8392 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.list", "response", internallog.HTTPResponse(res, b))
8393 return ret, nil
8394 }
8395
8396 // Pages invokes f for each page of results.
8397 // A non-nil error returned from f will halt the iteration.
8398 // The provided context supersedes any context provided to the Context method.
8399 func (c *ProjectsLocationsApisVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListVersionsResponse) error) error {
8400 c.ctx_ = ctx
8401 defer c.PageToken(c.urlParams_.Get("pageToken"))
8402 for {
8403 x, err := c.Do()
8404 if err != nil {
8405 return err
8406 }
8407 if err := f(x); err != nil {
8408 return err
8409 }
8410 if x.NextPageToken == "" {
8411 return nil
8412 }
8413 c.PageToken(x.NextPageToken)
8414 }
8415 }
8416
8417 type ProjectsLocationsApisVersionsPatchCall struct {
8418 s *Service
8419 name string
8420 googlecloudapihubv1version *GoogleCloudApihubV1Version
8421 urlParams_ gensupport.URLParams
8422 ctx_ context.Context
8423 header_ http.Header
8424 }
8425
8426 // Patch: Update API version. The following fields in the version can be
8427 // updated currently: * display_name * description * documentation *
8428 // deployments * lifecycle * compliance * accreditation * attributes The
8429 // update_mask should be used to specify the fields being updated.
8430 //
8431 // - name: Identifier. The name of the version. Format:
8432 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
8433 func (r *ProjectsLocationsApisVersionsService) Patch(name string, googlecloudapihubv1version *GoogleCloudApihubV1Version) *ProjectsLocationsApisVersionsPatchCall {
8434 c := &ProjectsLocationsApisVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8435 c.name = name
8436 c.googlecloudapihubv1version = googlecloudapihubv1version
8437 return c
8438 }
8439
8440 // UpdateMask sets the optional parameter "updateMask": Required. The list of
8441 // fields to update.
8442 func (c *ProjectsLocationsApisVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisVersionsPatchCall {
8443 c.urlParams_.Set("updateMask", updateMask)
8444 return c
8445 }
8446
8447 // Fields allows partial responses to be retrieved. See
8448 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8449 // details.
8450 func (c *ProjectsLocationsApisVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsPatchCall {
8451 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8452 return c
8453 }
8454
8455 // Context sets the context to be used in this call's Do method.
8456 func (c *ProjectsLocationsApisVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsPatchCall {
8457 c.ctx_ = ctx
8458 return c
8459 }
8460
8461 // Header returns a http.Header that can be modified by the caller to add
8462 // headers to the request.
8463 func (c *ProjectsLocationsApisVersionsPatchCall) Header() http.Header {
8464 if c.header_ == nil {
8465 c.header_ = make(http.Header)
8466 }
8467 return c.header_
8468 }
8469
8470 func (c *ProjectsLocationsApisVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
8471 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8472 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1version)
8473 if err != nil {
8474 return nil, err
8475 }
8476 c.urlParams_.Set("alt", alt)
8477 c.urlParams_.Set("prettyPrint", "false")
8478 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8479 urls += "?" + c.urlParams_.Encode()
8480 req, err := http.NewRequest("PATCH", urls, body)
8481 if err != nil {
8482 return nil, err
8483 }
8484 req.Header = reqHeaders
8485 googleapi.Expand(req.URL, map[string]string{
8486 "name": c.name,
8487 })
8488 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8489 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8490 }
8491
8492 // Do executes the "apihub.projects.locations.apis.versions.patch" call.
8493 // Any non-2xx status code is an error. Response headers are in either
8494 // *GoogleCloudApihubV1Version.ServerResponse.Header or (if a response was
8495 // returned at all) in error.(*googleapi.Error).Header. Use
8496 // googleapi.IsNotModified to check whether the returned error was because
8497 // http.StatusNotModified was returned.
8498 func (c *ProjectsLocationsApisVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Version, error) {
8499 gensupport.SetOptions(c.urlParams_, opts...)
8500 res, err := c.doRequest("json")
8501 if res != nil && res.StatusCode == http.StatusNotModified {
8502 if res.Body != nil {
8503 res.Body.Close()
8504 }
8505 return nil, gensupport.WrapError(&googleapi.Error{
8506 Code: res.StatusCode,
8507 Header: res.Header,
8508 })
8509 }
8510 if err != nil {
8511 return nil, err
8512 }
8513 defer googleapi.CloseBody(res)
8514 if err := googleapi.CheckResponse(res); err != nil {
8515 return nil, gensupport.WrapError(err)
8516 }
8517 ret := &GoogleCloudApihubV1Version{
8518 ServerResponse: googleapi.ServerResponse{
8519 Header: res.Header,
8520 HTTPStatusCode: res.StatusCode,
8521 },
8522 }
8523 target := &ret
8524 b, err := gensupport.DecodeResponseBytes(target, res)
8525 if err != nil {
8526 return nil, err
8527 }
8528 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.patch", "response", internallog.HTTPResponse(res, b))
8529 return ret, nil
8530 }
8531
8532 type ProjectsLocationsApisVersionsDefinitionsGetCall struct {
8533 s *Service
8534 name string
8535 urlParams_ gensupport.URLParams
8536 ifNoneMatch_ string
8537 ctx_ context.Context
8538 header_ http.Header
8539 }
8540
8541 // Get: Get details about a definition in an API version.
8542 //
8543 // - name: The name of the definition to retrieve. Format:
8544 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/defi
8545 // nitions/{definition}`.
8546 func (r *ProjectsLocationsApisVersionsDefinitionsService) Get(name string) *ProjectsLocationsApisVersionsDefinitionsGetCall {
8547 c := &ProjectsLocationsApisVersionsDefinitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8548 c.name = name
8549 return c
8550 }
8551
8552 // Fields allows partial responses to be retrieved. See
8553 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8554 // details.
8555 func (c *ProjectsLocationsApisVersionsDefinitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsDefinitionsGetCall {
8556 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8557 return c
8558 }
8559
8560 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8561 // object's ETag matches the given value. This is useful for getting updates
8562 // only after the object has changed since the last request.
8563 func (c *ProjectsLocationsApisVersionsDefinitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsDefinitionsGetCall {
8564 c.ifNoneMatch_ = entityTag
8565 return c
8566 }
8567
8568 // Context sets the context to be used in this call's Do method.
8569 func (c *ProjectsLocationsApisVersionsDefinitionsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsDefinitionsGetCall {
8570 c.ctx_ = ctx
8571 return c
8572 }
8573
8574 // Header returns a http.Header that can be modified by the caller to add
8575 // headers to the request.
8576 func (c *ProjectsLocationsApisVersionsDefinitionsGetCall) Header() http.Header {
8577 if c.header_ == nil {
8578 c.header_ = make(http.Header)
8579 }
8580 return c.header_
8581 }
8582
8583 func (c *ProjectsLocationsApisVersionsDefinitionsGetCall) doRequest(alt string) (*http.Response, error) {
8584 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8585 if c.ifNoneMatch_ != "" {
8586 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8587 }
8588 c.urlParams_.Set("alt", alt)
8589 c.urlParams_.Set("prettyPrint", "false")
8590 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8591 urls += "?" + c.urlParams_.Encode()
8592 req, err := http.NewRequest("GET", urls, nil)
8593 if err != nil {
8594 return nil, err
8595 }
8596 req.Header = reqHeaders
8597 googleapi.Expand(req.URL, map[string]string{
8598 "name": c.name,
8599 })
8600 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.definitions.get", "request", internallog.HTTPRequest(req, nil))
8601 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8602 }
8603
8604 // Do executes the "apihub.projects.locations.apis.versions.definitions.get" call.
8605 // Any non-2xx status code is an error. Response headers are in either
8606 // *GoogleCloudApihubV1Definition.ServerResponse.Header or (if a response was
8607 // returned at all) in error.(*googleapi.Error).Header. Use
8608 // googleapi.IsNotModified to check whether the returned error was because
8609 // http.StatusNotModified was returned.
8610 func (c *ProjectsLocationsApisVersionsDefinitionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Definition, error) {
8611 gensupport.SetOptions(c.urlParams_, opts...)
8612 res, err := c.doRequest("json")
8613 if res != nil && res.StatusCode == http.StatusNotModified {
8614 if res.Body != nil {
8615 res.Body.Close()
8616 }
8617 return nil, gensupport.WrapError(&googleapi.Error{
8618 Code: res.StatusCode,
8619 Header: res.Header,
8620 })
8621 }
8622 if err != nil {
8623 return nil, err
8624 }
8625 defer googleapi.CloseBody(res)
8626 if err := googleapi.CheckResponse(res); err != nil {
8627 return nil, gensupport.WrapError(err)
8628 }
8629 ret := &GoogleCloudApihubV1Definition{
8630 ServerResponse: googleapi.ServerResponse{
8631 Header: res.Header,
8632 HTTPStatusCode: res.StatusCode,
8633 },
8634 }
8635 target := &ret
8636 b, err := gensupport.DecodeResponseBytes(target, res)
8637 if err != nil {
8638 return nil, err
8639 }
8640 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.definitions.get", "response", internallog.HTTPResponse(res, b))
8641 return ret, nil
8642 }
8643
8644 type ProjectsLocationsApisVersionsOperationsCreateCall struct {
8645 s *Service
8646 parent string
8647 googlecloudapihubv1apioperation *GoogleCloudApihubV1ApiOperation
8648 urlParams_ gensupport.URLParams
8649 ctx_ context.Context
8650 header_ http.Header
8651 }
8652
8653 // Create: Create an apiOperation in an API version. An apiOperation can be
8654 // created only if the version has no apiOperations which were created by
8655 // parsing a spec.
8656 //
8657 // - parent: The parent resource for the operation resource. Format:
8658 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
8659 func (r *ProjectsLocationsApisVersionsOperationsService) Create(parent string, googlecloudapihubv1apioperation *GoogleCloudApihubV1ApiOperation) *ProjectsLocationsApisVersionsOperationsCreateCall {
8660 c := &ProjectsLocationsApisVersionsOperationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8661 c.parent = parent
8662 c.googlecloudapihubv1apioperation = googlecloudapihubv1apioperation
8663 return c
8664 }
8665
8666 // ApiOperationId sets the optional parameter "apiOperationId": The ID to use
8667 // for the operation resource, which will become the final component of the
8668 // operation's resource name. This field is optional. * If provided, the same
8669 // will be used. The service will throw an error if the specified id is already
8670 // used by another operation resource in the API hub. * If not provided, a
8671 // system generated id will be used. This value should be 4-500 characters,
8672 // overall resource name which will be of format
8673 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operat
8674 // ions/{operation}`, its length is limited to 700 characters, and valid
8675 // characters are /a-z[0-9]-_/.
8676 func (c *ProjectsLocationsApisVersionsOperationsCreateCall) ApiOperationId(apiOperationId string) *ProjectsLocationsApisVersionsOperationsCreateCall {
8677 c.urlParams_.Set("apiOperationId", apiOperationId)
8678 return c
8679 }
8680
8681 // Fields allows partial responses to be retrieved. See
8682 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8683 // details.
8684 func (c *ProjectsLocationsApisVersionsOperationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsOperationsCreateCall {
8685 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8686 return c
8687 }
8688
8689 // Context sets the context to be used in this call's Do method.
8690 func (c *ProjectsLocationsApisVersionsOperationsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsOperationsCreateCall {
8691 c.ctx_ = ctx
8692 return c
8693 }
8694
8695 // Header returns a http.Header that can be modified by the caller to add
8696 // headers to the request.
8697 func (c *ProjectsLocationsApisVersionsOperationsCreateCall) Header() http.Header {
8698 if c.header_ == nil {
8699 c.header_ = make(http.Header)
8700 }
8701 return c.header_
8702 }
8703
8704 func (c *ProjectsLocationsApisVersionsOperationsCreateCall) doRequest(alt string) (*http.Response, error) {
8705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8706 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1apioperation)
8707 if err != nil {
8708 return nil, err
8709 }
8710 c.urlParams_.Set("alt", alt)
8711 c.urlParams_.Set("prettyPrint", "false")
8712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/operations")
8713 urls += "?" + c.urlParams_.Encode()
8714 req, err := http.NewRequest("POST", urls, body)
8715 if err != nil {
8716 return nil, err
8717 }
8718 req.Header = reqHeaders
8719 googleapi.Expand(req.URL, map[string]string{
8720 "parent": c.parent,
8721 })
8722 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8723 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8724 }
8725
8726 // Do executes the "apihub.projects.locations.apis.versions.operations.create" call.
8727 // Any non-2xx status code is an error. Response headers are in either
8728 // *GoogleCloudApihubV1ApiOperation.ServerResponse.Header or (if a response was
8729 // returned at all) in error.(*googleapi.Error).Header. Use
8730 // googleapi.IsNotModified to check whether the returned error was because
8731 // http.StatusNotModified was returned.
8732 func (c *ProjectsLocationsApisVersionsOperationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ApiOperation, error) {
8733 gensupport.SetOptions(c.urlParams_, opts...)
8734 res, err := c.doRequest("json")
8735 if res != nil && res.StatusCode == http.StatusNotModified {
8736 if res.Body != nil {
8737 res.Body.Close()
8738 }
8739 return nil, gensupport.WrapError(&googleapi.Error{
8740 Code: res.StatusCode,
8741 Header: res.Header,
8742 })
8743 }
8744 if err != nil {
8745 return nil, err
8746 }
8747 defer googleapi.CloseBody(res)
8748 if err := googleapi.CheckResponse(res); err != nil {
8749 return nil, gensupport.WrapError(err)
8750 }
8751 ret := &GoogleCloudApihubV1ApiOperation{
8752 ServerResponse: googleapi.ServerResponse{
8753 Header: res.Header,
8754 HTTPStatusCode: res.StatusCode,
8755 },
8756 }
8757 target := &ret
8758 b, err := gensupport.DecodeResponseBytes(target, res)
8759 if err != nil {
8760 return nil, err
8761 }
8762 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.create", "response", internallog.HTTPResponse(res, b))
8763 return ret, nil
8764 }
8765
8766 type ProjectsLocationsApisVersionsOperationsDeleteCall struct {
8767 s *Service
8768 name string
8769 urlParams_ gensupport.URLParams
8770 ctx_ context.Context
8771 header_ http.Header
8772 }
8773
8774 // Delete: Delete an operation in an API version and we can delete only the
8775 // operations created via create API. If the operation was created by parsing
8776 // the spec, then it can be deleted by editing or deleting the spec.
8777 //
8778 // - name: The name of the operation resource to delete. Format:
8779 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/oper
8780 // ations/{operation}`.
8781 func (r *ProjectsLocationsApisVersionsOperationsService) Delete(name string) *ProjectsLocationsApisVersionsOperationsDeleteCall {
8782 c := &ProjectsLocationsApisVersionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8783 c.name = name
8784 return c
8785 }
8786
8787 // Fields allows partial responses to be retrieved. See
8788 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8789 // details.
8790 func (c *ProjectsLocationsApisVersionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsOperationsDeleteCall {
8791 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8792 return c
8793 }
8794
8795 // Context sets the context to be used in this call's Do method.
8796 func (c *ProjectsLocationsApisVersionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsOperationsDeleteCall {
8797 c.ctx_ = ctx
8798 return c
8799 }
8800
8801 // Header returns a http.Header that can be modified by the caller to add
8802 // headers to the request.
8803 func (c *ProjectsLocationsApisVersionsOperationsDeleteCall) Header() http.Header {
8804 if c.header_ == nil {
8805 c.header_ = make(http.Header)
8806 }
8807 return c.header_
8808 }
8809
8810 func (c *ProjectsLocationsApisVersionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
8811 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8812 c.urlParams_.Set("alt", alt)
8813 c.urlParams_.Set("prettyPrint", "false")
8814 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8815 urls += "?" + c.urlParams_.Encode()
8816 req, err := http.NewRequest("DELETE", urls, nil)
8817 if err != nil {
8818 return nil, err
8819 }
8820 req.Header = reqHeaders
8821 googleapi.Expand(req.URL, map[string]string{
8822 "name": c.name,
8823 })
8824 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.delete", "request", internallog.HTTPRequest(req, nil))
8825 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8826 }
8827
8828 // Do executes the "apihub.projects.locations.apis.versions.operations.delete" call.
8829 // Any non-2xx status code is an error. Response headers are in either
8830 // *Empty.ServerResponse.Header or (if a response was returned at all) in
8831 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8832 // whether the returned error was because http.StatusNotModified was returned.
8833 func (c *ProjectsLocationsApisVersionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8834 gensupport.SetOptions(c.urlParams_, opts...)
8835 res, err := c.doRequest("json")
8836 if res != nil && res.StatusCode == http.StatusNotModified {
8837 if res.Body != nil {
8838 res.Body.Close()
8839 }
8840 return nil, gensupport.WrapError(&googleapi.Error{
8841 Code: res.StatusCode,
8842 Header: res.Header,
8843 })
8844 }
8845 if err != nil {
8846 return nil, err
8847 }
8848 defer googleapi.CloseBody(res)
8849 if err := googleapi.CheckResponse(res); err != nil {
8850 return nil, gensupport.WrapError(err)
8851 }
8852 ret := &Empty{
8853 ServerResponse: googleapi.ServerResponse{
8854 Header: res.Header,
8855 HTTPStatusCode: res.StatusCode,
8856 },
8857 }
8858 target := &ret
8859 b, err := gensupport.DecodeResponseBytes(target, res)
8860 if err != nil {
8861 return nil, err
8862 }
8863 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.delete", "response", internallog.HTTPResponse(res, b))
8864 return ret, nil
8865 }
8866
8867 type ProjectsLocationsApisVersionsOperationsGetCall struct {
8868 s *Service
8869 name string
8870 urlParams_ gensupport.URLParams
8871 ifNoneMatch_ string
8872 ctx_ context.Context
8873 header_ http.Header
8874 }
8875
8876 // Get: Get details about a particular operation in API version.
8877 //
8878 // - name: The name of the operation to retrieve. Format:
8879 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/oper
8880 // ations/{operation}`.
8881 func (r *ProjectsLocationsApisVersionsOperationsService) Get(name string) *ProjectsLocationsApisVersionsOperationsGetCall {
8882 c := &ProjectsLocationsApisVersionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8883 c.name = name
8884 return c
8885 }
8886
8887 // Fields allows partial responses to be retrieved. See
8888 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8889 // details.
8890 func (c *ProjectsLocationsApisVersionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsOperationsGetCall {
8891 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8892 return c
8893 }
8894
8895 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8896 // object's ETag matches the given value. This is useful for getting updates
8897 // only after the object has changed since the last request.
8898 func (c *ProjectsLocationsApisVersionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsOperationsGetCall {
8899 c.ifNoneMatch_ = entityTag
8900 return c
8901 }
8902
8903 // Context sets the context to be used in this call's Do method.
8904 func (c *ProjectsLocationsApisVersionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsOperationsGetCall {
8905 c.ctx_ = ctx
8906 return c
8907 }
8908
8909 // Header returns a http.Header that can be modified by the caller to add
8910 // headers to the request.
8911 func (c *ProjectsLocationsApisVersionsOperationsGetCall) Header() http.Header {
8912 if c.header_ == nil {
8913 c.header_ = make(http.Header)
8914 }
8915 return c.header_
8916 }
8917
8918 func (c *ProjectsLocationsApisVersionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
8919 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8920 if c.ifNoneMatch_ != "" {
8921 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8922 }
8923 c.urlParams_.Set("alt", alt)
8924 c.urlParams_.Set("prettyPrint", "false")
8925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8926 urls += "?" + c.urlParams_.Encode()
8927 req, err := http.NewRequest("GET", urls, nil)
8928 if err != nil {
8929 return nil, err
8930 }
8931 req.Header = reqHeaders
8932 googleapi.Expand(req.URL, map[string]string{
8933 "name": c.name,
8934 })
8935 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.get", "request", internallog.HTTPRequest(req, nil))
8936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8937 }
8938
8939 // Do executes the "apihub.projects.locations.apis.versions.operations.get" call.
8940 // Any non-2xx status code is an error. Response headers are in either
8941 // *GoogleCloudApihubV1ApiOperation.ServerResponse.Header or (if a response was
8942 // returned at all) in error.(*googleapi.Error).Header. Use
8943 // googleapi.IsNotModified to check whether the returned error was because
8944 // http.StatusNotModified was returned.
8945 func (c *ProjectsLocationsApisVersionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ApiOperation, error) {
8946 gensupport.SetOptions(c.urlParams_, opts...)
8947 res, err := c.doRequest("json")
8948 if res != nil && res.StatusCode == http.StatusNotModified {
8949 if res.Body != nil {
8950 res.Body.Close()
8951 }
8952 return nil, gensupport.WrapError(&googleapi.Error{
8953 Code: res.StatusCode,
8954 Header: res.Header,
8955 })
8956 }
8957 if err != nil {
8958 return nil, err
8959 }
8960 defer googleapi.CloseBody(res)
8961 if err := googleapi.CheckResponse(res); err != nil {
8962 return nil, gensupport.WrapError(err)
8963 }
8964 ret := &GoogleCloudApihubV1ApiOperation{
8965 ServerResponse: googleapi.ServerResponse{
8966 Header: res.Header,
8967 HTTPStatusCode: res.StatusCode,
8968 },
8969 }
8970 target := &ret
8971 b, err := gensupport.DecodeResponseBytes(target, res)
8972 if err != nil {
8973 return nil, err
8974 }
8975 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.get", "response", internallog.HTTPResponse(res, b))
8976 return ret, nil
8977 }
8978
8979 type ProjectsLocationsApisVersionsOperationsListCall struct {
8980 s *Service
8981 parent string
8982 urlParams_ gensupport.URLParams
8983 ifNoneMatch_ string
8984 ctx_ context.Context
8985 header_ http.Header
8986 }
8987
8988 // List: List operations in an API version.
8989 //
8990 // - parent: The parent which owns this collection of operations i.e., the API
8991 // version. Format:
8992 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
8993 func (r *ProjectsLocationsApisVersionsOperationsService) List(parent string) *ProjectsLocationsApisVersionsOperationsListCall {
8994 c := &ProjectsLocationsApisVersionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8995 c.parent = parent
8996 return c
8997 }
8998
8999 // Filter sets the optional parameter "filter": An expression that filters the
9000 // list of ApiOperations. A filter expression consists of a field name, a
9001 // comparison operator, and a value for filtering. The value must be a string
9002 // or a boolean. The comparison operator must be one of: `<`, `>` or `=`.
9003 // Filters are not case sensitive. The following fields in the `ApiOperation`
9004 // are eligible for filtering: * `name` - The ApiOperation resource name.
9005 // Allowed comparison operators: `=`. * `details.http_operation.path.path` -
9006 // The http operation's complete path relative to server endpoint. Allowed
9007 // comparison operators: `=`. * `details.http_operation.method` - The http
9008 // operation method type. Allowed comparison operators: `=`. *
9009 // `details.deprecated` - Indicates if the ApiOperation is deprecated. Allowed
9010 // values are True / False indicating the deprycation status of the
9011 // ApiOperation. Allowed comparison operators: `=`. * `create_time` - The time
9012 // at which the ApiOperation was created. The value should be in the
9013 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
9014 // operators: `>` and `<`. *
9015 // `attributes.projects/test-project-id/locations/test-location-id/
9016 // attributes/user-defined-attribute-id.enum_values.values.id` - The allowed
9017 // value id of the user defined enum attribute associated with the Resource.
9018 // Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a
9019 // placeholder that can be replaced with any user defined enum attribute name.
9020 // * `attributes.projects/test-project-id/locations/test-location-id/
9021 // attributes/user-defined-attribute-id.enum_values.values.display_name` - The
9022 // allowed value display name of the user defined enum attribute associated
9023 // with the Resource. Allowed comparison operator is `:`. Here
9024 // user-defined-attribute-enum-display-name is a placeholder that can be
9025 // replaced with any user defined enum attribute enum name. *
9026 // `attributes.projects/test-project-id/locations/test-location-id/
9027 // attributes/user-defined-attribute-id.string_values.values` - The allowed
9028 // value of the user defined string attribute associated with the Resource.
9029 // Allowed comparison operator is `:`. Here user-defined-attribute-string is a
9030 // placeholder that can be replaced with any user defined string attribute
9031 // name. * `attributes.projects/test-project-id/locations/test-location-id/
9032 // attributes/user-defined-attribute-id.json_values.values` - The allowed value
9033 // of the user defined JSON attribute associated with the Resource. Allowed
9034 // comparison operator is `:`. Here user-defined-attribute-json is a
9035 // placeholder that can be replaced with any user defined JSON attribute name.
9036 // Expressions are combined with either `AND` logic operator or `OR` logical
9037 // operator but not both of them together i.e. only one of the `AND` or `OR`
9038 // operator can be used throughout the filter string and both the operators
9039 // cannot be used together. No other logical operators are supported. At most
9040 // three filter fields are allowed in the filter string and if provided more
9041 // than that then `INVALID_ARGUMENT` error is returned by the API. Here are a
9042 // few examples: * `details.deprecated = True` - The ApiOperation is
9043 // deprecated. * `details.http_operation.method = GET AND create_time <
9044 // \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The
9045 // method of the http operation of the ApiOperation is _GET_ and the spec was
9046 // created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00
9047 // UTC_. * `details.http_operation.method = GET OR
9048 // details.http_operation.method = POST`. - The http operation of the method of
9049 // ApiOperation is _GET_ or _POST_. * `details.deprecated = True AND
9050 // attributes.projects/test-project-id/locations/test-location-id/
9051 // attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test`
9052 // - The filter string specifies that the ApiOperation is deprecated and the
9053 // value of the user defined attribute of type string is _test_.
9054 func (c *ProjectsLocationsApisVersionsOperationsListCall) Filter(filter string) *ProjectsLocationsApisVersionsOperationsListCall {
9055 c.urlParams_.Set("filter", filter)
9056 return c
9057 }
9058
9059 // PageSize sets the optional parameter "pageSize": The maximum number of
9060 // operations to return. The service may return fewer than this value. If
9061 // unspecified, at most 50 operations will be returned. The maximum value is
9062 // 1000; values above 1000 will be coerced to 1000.
9063 func (c *ProjectsLocationsApisVersionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsOperationsListCall {
9064 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9065 return c
9066 }
9067
9068 // PageToken sets the optional parameter "pageToken": A page token, received
9069 // from a previous `ListApiOperations` call. Provide this to retrieve the
9070 // subsequent page. When paginating, all other parameters (except page_size)
9071 // provided to `ListApiOperations` must match the call that provided the page
9072 // token.
9073 func (c *ProjectsLocationsApisVersionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsOperationsListCall {
9074 c.urlParams_.Set("pageToken", pageToken)
9075 return c
9076 }
9077
9078 // Fields allows partial responses to be retrieved. See
9079 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9080 // details.
9081 func (c *ProjectsLocationsApisVersionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsOperationsListCall {
9082 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9083 return c
9084 }
9085
9086 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9087 // object's ETag matches the given value. This is useful for getting updates
9088 // only after the object has changed since the last request.
9089 func (c *ProjectsLocationsApisVersionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsOperationsListCall {
9090 c.ifNoneMatch_ = entityTag
9091 return c
9092 }
9093
9094 // Context sets the context to be used in this call's Do method.
9095 func (c *ProjectsLocationsApisVersionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsOperationsListCall {
9096 c.ctx_ = ctx
9097 return c
9098 }
9099
9100 // Header returns a http.Header that can be modified by the caller to add
9101 // headers to the request.
9102 func (c *ProjectsLocationsApisVersionsOperationsListCall) Header() http.Header {
9103 if c.header_ == nil {
9104 c.header_ = make(http.Header)
9105 }
9106 return c.header_
9107 }
9108
9109 func (c *ProjectsLocationsApisVersionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
9110 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9111 if c.ifNoneMatch_ != "" {
9112 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9113 }
9114 c.urlParams_.Set("alt", alt)
9115 c.urlParams_.Set("prettyPrint", "false")
9116 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/operations")
9117 urls += "?" + c.urlParams_.Encode()
9118 req, err := http.NewRequest("GET", urls, nil)
9119 if err != nil {
9120 return nil, err
9121 }
9122 req.Header = reqHeaders
9123 googleapi.Expand(req.URL, map[string]string{
9124 "parent": c.parent,
9125 })
9126 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.list", "request", internallog.HTTPRequest(req, nil))
9127 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9128 }
9129
9130 // Do executes the "apihub.projects.locations.apis.versions.operations.list" call.
9131 // Any non-2xx status code is an error. Response headers are in either
9132 // *GoogleCloudApihubV1ListApiOperationsResponse.ServerResponse.Header or (if a
9133 // response was returned at all) in error.(*googleapi.Error).Header. Use
9134 // googleapi.IsNotModified to check whether the returned error was because
9135 // http.StatusNotModified was returned.
9136 func (c *ProjectsLocationsApisVersionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListApiOperationsResponse, error) {
9137 gensupport.SetOptions(c.urlParams_, opts...)
9138 res, err := c.doRequest("json")
9139 if res != nil && res.StatusCode == http.StatusNotModified {
9140 if res.Body != nil {
9141 res.Body.Close()
9142 }
9143 return nil, gensupport.WrapError(&googleapi.Error{
9144 Code: res.StatusCode,
9145 Header: res.Header,
9146 })
9147 }
9148 if err != nil {
9149 return nil, err
9150 }
9151 defer googleapi.CloseBody(res)
9152 if err := googleapi.CheckResponse(res); err != nil {
9153 return nil, gensupport.WrapError(err)
9154 }
9155 ret := &GoogleCloudApihubV1ListApiOperationsResponse{
9156 ServerResponse: googleapi.ServerResponse{
9157 Header: res.Header,
9158 HTTPStatusCode: res.StatusCode,
9159 },
9160 }
9161 target := &ret
9162 b, err := gensupport.DecodeResponseBytes(target, res)
9163 if err != nil {
9164 return nil, err
9165 }
9166 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.list", "response", internallog.HTTPResponse(res, b))
9167 return ret, nil
9168 }
9169
9170 // Pages invokes f for each page of results.
9171 // A non-nil error returned from f will halt the iteration.
9172 // The provided context supersedes any context provided to the Context method.
9173 func (c *ProjectsLocationsApisVersionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListApiOperationsResponse) error) error {
9174 c.ctx_ = ctx
9175 defer c.PageToken(c.urlParams_.Get("pageToken"))
9176 for {
9177 x, err := c.Do()
9178 if err != nil {
9179 return err
9180 }
9181 if err := f(x); err != nil {
9182 return err
9183 }
9184 if x.NextPageToken == "" {
9185 return nil
9186 }
9187 c.PageToken(x.NextPageToken)
9188 }
9189 }
9190
9191 type ProjectsLocationsApisVersionsOperationsPatchCall struct {
9192 s *Service
9193 name string
9194 googlecloudapihubv1apioperation *GoogleCloudApihubV1ApiOperation
9195 urlParams_ gensupport.URLParams
9196 ctx_ context.Context
9197 header_ http.Header
9198 }
9199
9200 // Patch: Update an operation in an API version. The following fields in the
9201 // ApiOperation resource can be updated: * details.description *
9202 // details.documentation * details.http_operation.path *
9203 // details.http_operation.method * details.deprecated * attributes *
9204 // details.mcp_tool.title * details.mcp_tool.description *
9205 // details.mcp_tool.input_schema * details.mcp_tool.output_schema *
9206 // details.input_schema * details.output_schema *
9207 // details.mcp_tool.annotations.title *
9208 // details.mcp_tool.annotations.read_only_hint *
9209 // details.mcp_tool.annotations.destructive_hint *
9210 // details.mcp_tool.annotations.idempotent_hint *
9211 // details.mcp_tool.annotations.open_world_hint *
9212 // details.mcp_tool.annotations.additional_hints The update_mask should be used
9213 // to specify the fields being updated. An operation can be updated only if the
9214 // operation was created via CreateApiOperation API. If the operation was
9215 // created by parsing the spec, then it can be edited by updating the spec.
9216 //
9217 // - name: Identifier. The name of the operation. Format:
9218 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/oper
9219 // ations/{operation}`.
9220 func (r *ProjectsLocationsApisVersionsOperationsService) Patch(name string, googlecloudapihubv1apioperation *GoogleCloudApihubV1ApiOperation) *ProjectsLocationsApisVersionsOperationsPatchCall {
9221 c := &ProjectsLocationsApisVersionsOperationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9222 c.name = name
9223 c.googlecloudapihubv1apioperation = googlecloudapihubv1apioperation
9224 return c
9225 }
9226
9227 // UpdateMask sets the optional parameter "updateMask": Required. The list of
9228 // fields to update.
9229 func (c *ProjectsLocationsApisVersionsOperationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisVersionsOperationsPatchCall {
9230 c.urlParams_.Set("updateMask", updateMask)
9231 return c
9232 }
9233
9234 // Fields allows partial responses to be retrieved. See
9235 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9236 // details.
9237 func (c *ProjectsLocationsApisVersionsOperationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsOperationsPatchCall {
9238 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9239 return c
9240 }
9241
9242 // Context sets the context to be used in this call's Do method.
9243 func (c *ProjectsLocationsApisVersionsOperationsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsOperationsPatchCall {
9244 c.ctx_ = ctx
9245 return c
9246 }
9247
9248 // Header returns a http.Header that can be modified by the caller to add
9249 // headers to the request.
9250 func (c *ProjectsLocationsApisVersionsOperationsPatchCall) Header() http.Header {
9251 if c.header_ == nil {
9252 c.header_ = make(http.Header)
9253 }
9254 return c.header_
9255 }
9256
9257 func (c *ProjectsLocationsApisVersionsOperationsPatchCall) doRequest(alt string) (*http.Response, error) {
9258 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9259 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1apioperation)
9260 if err != nil {
9261 return nil, err
9262 }
9263 c.urlParams_.Set("alt", alt)
9264 c.urlParams_.Set("prettyPrint", "false")
9265 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9266 urls += "?" + c.urlParams_.Encode()
9267 req, err := http.NewRequest("PATCH", urls, body)
9268 if err != nil {
9269 return nil, err
9270 }
9271 req.Header = reqHeaders
9272 googleapi.Expand(req.URL, map[string]string{
9273 "name": c.name,
9274 })
9275 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9276 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9277 }
9278
9279 // Do executes the "apihub.projects.locations.apis.versions.operations.patch" call.
9280 // Any non-2xx status code is an error. Response headers are in either
9281 // *GoogleCloudApihubV1ApiOperation.ServerResponse.Header or (if a response was
9282 // returned at all) in error.(*googleapi.Error).Header. Use
9283 // googleapi.IsNotModified to check whether the returned error was because
9284 // http.StatusNotModified was returned.
9285 func (c *ProjectsLocationsApisVersionsOperationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ApiOperation, error) {
9286 gensupport.SetOptions(c.urlParams_, opts...)
9287 res, err := c.doRequest("json")
9288 if res != nil && res.StatusCode == http.StatusNotModified {
9289 if res.Body != nil {
9290 res.Body.Close()
9291 }
9292 return nil, gensupport.WrapError(&googleapi.Error{
9293 Code: res.StatusCode,
9294 Header: res.Header,
9295 })
9296 }
9297 if err != nil {
9298 return nil, err
9299 }
9300 defer googleapi.CloseBody(res)
9301 if err := googleapi.CheckResponse(res); err != nil {
9302 return nil, gensupport.WrapError(err)
9303 }
9304 ret := &GoogleCloudApihubV1ApiOperation{
9305 ServerResponse: googleapi.ServerResponse{
9306 Header: res.Header,
9307 HTTPStatusCode: res.StatusCode,
9308 },
9309 }
9310 target := &ret
9311 b, err := gensupport.DecodeResponseBytes(target, res)
9312 if err != nil {
9313 return nil, err
9314 }
9315 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.operations.patch", "response", internallog.HTTPResponse(res, b))
9316 return ret, nil
9317 }
9318
9319 type ProjectsLocationsApisVersionsSpecsCreateCall struct {
9320 s *Service
9321 parent string
9322 googlecloudapihubv1spec *GoogleCloudApihubV1Spec
9323 urlParams_ gensupport.URLParams
9324 ctx_ context.Context
9325 header_ http.Header
9326 }
9327
9328 // Create: Add a spec to an API version in the API hub. Multiple specs can be
9329 // added to an API version. Note, while adding a spec, at least one of
9330 // `contents` or `source_uri` must be provided. If `contents` is provided, then
9331 // `spec_type` must also be provided. On adding a spec with contents to the
9332 // version, the operations present in it will be added to the version.Note that
9333 // the file contents in the spec should be of the same type as defined in the
9334 // `projects/{project}/locations/{location}/attributes/system-spec-type`
9335 // attribute associated with spec resource. Note that specs of various types
9336 // can be uploaded, however parsing of details is supported for OpenAPI spec
9337 // currently. In order to access the information parsed from the spec, use the
9338 // GetSpec method. In order to access the raw contents for a particular spec,
9339 // use the GetSpecContents method. In order to access the operations parsed
9340 // from the spec, use the ListAPIOperations method.
9341 //
9342 // - parent: The parent resource for Spec. Format:
9343 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
9344 func (r *ProjectsLocationsApisVersionsSpecsService) Create(parent string, googlecloudapihubv1spec *GoogleCloudApihubV1Spec) *ProjectsLocationsApisVersionsSpecsCreateCall {
9345 c := &ProjectsLocationsApisVersionsSpecsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9346 c.parent = parent
9347 c.googlecloudapihubv1spec = googlecloudapihubv1spec
9348 return c
9349 }
9350
9351 // SpecId sets the optional parameter "specId": The ID to use for the spec,
9352 // which will become the final component of the spec's resource name. This
9353 // field is optional. * If provided, the same will be used. The service will
9354 // throw an error if the specified id is already used by another spec in the
9355 // API resource. * If not provided, a system generated id will be used. This
9356 // value should be 4-500 characters, overall resource name which will be of
9357 // format
9358 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/
9359 // {spec}`, its length is limited to 1000 characters and valid characters are
9360 // /a-z[0-9]-_/.
9361 func (c *ProjectsLocationsApisVersionsSpecsCreateCall) SpecId(specId string) *ProjectsLocationsApisVersionsSpecsCreateCall {
9362 c.urlParams_.Set("specId", specId)
9363 return c
9364 }
9365
9366 // Fields allows partial responses to be retrieved. See
9367 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9368 // details.
9369 func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsCreateCall {
9370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9371 return c
9372 }
9373
9374 // Context sets the context to be used in this call's Do method.
9375 func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsCreateCall {
9376 c.ctx_ = ctx
9377 return c
9378 }
9379
9380 // Header returns a http.Header that can be modified by the caller to add
9381 // headers to the request.
9382 func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Header() http.Header {
9383 if c.header_ == nil {
9384 c.header_ = make(http.Header)
9385 }
9386 return c.header_
9387 }
9388
9389 func (c *ProjectsLocationsApisVersionsSpecsCreateCall) doRequest(alt string) (*http.Response, error) {
9390 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9391 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1spec)
9392 if err != nil {
9393 return nil, err
9394 }
9395 c.urlParams_.Set("alt", alt)
9396 c.urlParams_.Set("prettyPrint", "false")
9397 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/specs")
9398 urls += "?" + c.urlParams_.Encode()
9399 req, err := http.NewRequest("POST", urls, body)
9400 if err != nil {
9401 return nil, err
9402 }
9403 req.Header = reqHeaders
9404 googleapi.Expand(req.URL, map[string]string{
9405 "parent": c.parent,
9406 })
9407 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.create", "request", internallog.HTTPRequest(req, body.Bytes()))
9408 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9409 }
9410
9411 // Do executes the "apihub.projects.locations.apis.versions.specs.create" call.
9412 // Any non-2xx status code is an error. Response headers are in either
9413 // *GoogleCloudApihubV1Spec.ServerResponse.Header or (if a response was
9414 // returned at all) in error.(*googleapi.Error).Header. Use
9415 // googleapi.IsNotModified to check whether the returned error was because
9416 // http.StatusNotModified was returned.
9417 func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Spec, error) {
9418 gensupport.SetOptions(c.urlParams_, opts...)
9419 res, err := c.doRequest("json")
9420 if res != nil && res.StatusCode == http.StatusNotModified {
9421 if res.Body != nil {
9422 res.Body.Close()
9423 }
9424 return nil, gensupport.WrapError(&googleapi.Error{
9425 Code: res.StatusCode,
9426 Header: res.Header,
9427 })
9428 }
9429 if err != nil {
9430 return nil, err
9431 }
9432 defer googleapi.CloseBody(res)
9433 if err := googleapi.CheckResponse(res); err != nil {
9434 return nil, gensupport.WrapError(err)
9435 }
9436 ret := &GoogleCloudApihubV1Spec{
9437 ServerResponse: googleapi.ServerResponse{
9438 Header: res.Header,
9439 HTTPStatusCode: res.StatusCode,
9440 },
9441 }
9442 target := &ret
9443 b, err := gensupport.DecodeResponseBytes(target, res)
9444 if err != nil {
9445 return nil, err
9446 }
9447 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.create", "response", internallog.HTTPResponse(res, b))
9448 return ret, nil
9449 }
9450
9451 type ProjectsLocationsApisVersionsSpecsDeleteCall struct {
9452 s *Service
9453 name string
9454 urlParams_ gensupport.URLParams
9455 ctx_ context.Context
9456 header_ http.Header
9457 }
9458
9459 // Delete: Delete a spec. Deleting a spec will also delete the associated
9460 // operations from the version.
9461 //
9462 // - name: The name of the spec to delete. Format:
9463 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/spec
9464 // s/{spec}`.
9465 func (r *ProjectsLocationsApisVersionsSpecsService) Delete(name string) *ProjectsLocationsApisVersionsSpecsDeleteCall {
9466 c := &ProjectsLocationsApisVersionsSpecsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9467 c.name = name
9468 return c
9469 }
9470
9471 // Fields allows partial responses to be retrieved. See
9472 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9473 // details.
9474 func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsDeleteCall {
9475 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9476 return c
9477 }
9478
9479 // Context sets the context to be used in this call's Do method.
9480 func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsDeleteCall {
9481 c.ctx_ = ctx
9482 return c
9483 }
9484
9485 // Header returns a http.Header that can be modified by the caller to add
9486 // headers to the request.
9487 func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Header() http.Header {
9488 if c.header_ == nil {
9489 c.header_ = make(http.Header)
9490 }
9491 return c.header_
9492 }
9493
9494 func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) doRequest(alt string) (*http.Response, error) {
9495 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9496 c.urlParams_.Set("alt", alt)
9497 c.urlParams_.Set("prettyPrint", "false")
9498 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9499 urls += "?" + c.urlParams_.Encode()
9500 req, err := http.NewRequest("DELETE", urls, nil)
9501 if err != nil {
9502 return nil, err
9503 }
9504 req.Header = reqHeaders
9505 googleapi.Expand(req.URL, map[string]string{
9506 "name": c.name,
9507 })
9508 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.delete", "request", internallog.HTTPRequest(req, nil))
9509 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9510 }
9511
9512 // Do executes the "apihub.projects.locations.apis.versions.specs.delete" call.
9513 // Any non-2xx status code is an error. Response headers are in either
9514 // *Empty.ServerResponse.Header or (if a response was returned at all) in
9515 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9516 // whether the returned error was because http.StatusNotModified was returned.
9517 func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9518 gensupport.SetOptions(c.urlParams_, opts...)
9519 res, err := c.doRequest("json")
9520 if res != nil && res.StatusCode == http.StatusNotModified {
9521 if res.Body != nil {
9522 res.Body.Close()
9523 }
9524 return nil, gensupport.WrapError(&googleapi.Error{
9525 Code: res.StatusCode,
9526 Header: res.Header,
9527 })
9528 }
9529 if err != nil {
9530 return nil, err
9531 }
9532 defer googleapi.CloseBody(res)
9533 if err := googleapi.CheckResponse(res); err != nil {
9534 return nil, gensupport.WrapError(err)
9535 }
9536 ret := &Empty{
9537 ServerResponse: googleapi.ServerResponse{
9538 Header: res.Header,
9539 HTTPStatusCode: res.StatusCode,
9540 },
9541 }
9542 target := &ret
9543 b, err := gensupport.DecodeResponseBytes(target, res)
9544 if err != nil {
9545 return nil, err
9546 }
9547 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.delete", "response", internallog.HTTPResponse(res, b))
9548 return ret, nil
9549 }
9550
9551 type ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall struct {
9552 s *Service
9553 name string
9554 urlParams_ gensupport.URLParams
9555 ifNoneMatch_ string
9556 ctx_ context.Context
9557 header_ http.Header
9558 }
9559
9560 // FetchAdditionalSpecContent: Fetch additional spec content.
9561 //
9562 // - name: The name of the spec whose contents need to be retrieved. Format:
9563 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/spec
9564 // s/{spec}`.
9565 func (r *ProjectsLocationsApisVersionsSpecsService) FetchAdditionalSpecContent(name string) *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall {
9566 c := &ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9567 c.name = name
9568 return c
9569 }
9570
9571 // SpecContentType sets the optional parameter "specContentType": The type of
9572 // the spec contents to be retrieved.
9573 //
9574 // Possible values:
9575 //
9576 // "SPEC_CONTENT_TYPE_UNSPECIFIED" - Unspecified spec content type. Defaults
9577 //
9578 // to spec content uploaded by the user.
9579 //
9580 // "BOOSTED_SPEC_CONTENT" - The spec content type for boosted spec.
9581 // "GATEWAY_OPEN_API_SPEC" - The spec content type for OpenAPI spec. This
9582 //
9583 // enum is used for OpenAPI specs ingested via APIGEE X Gateway.
9584 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) SpecContentType(specContentType string) *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall {
9585 c.urlParams_.Set("specContentType", specContentType)
9586 return c
9587 }
9588
9589 // Fields allows partial responses to be retrieved. See
9590 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9591 // details.
9592 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall {
9593 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9594 return c
9595 }
9596
9597 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9598 // object's ETag matches the given value. This is useful for getting updates
9599 // only after the object has changed since the last request.
9600 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall {
9601 c.ifNoneMatch_ = entityTag
9602 return c
9603 }
9604
9605 // Context sets the context to be used in this call's Do method.
9606 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall {
9607 c.ctx_ = ctx
9608 return c
9609 }
9610
9611 // Header returns a http.Header that can be modified by the caller to add
9612 // headers to the request.
9613 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) Header() http.Header {
9614 if c.header_ == nil {
9615 c.header_ = make(http.Header)
9616 }
9617 return c.header_
9618 }
9619
9620 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) doRequest(alt string) (*http.Response, error) {
9621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9622 if c.ifNoneMatch_ != "" {
9623 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9624 }
9625 c.urlParams_.Set("alt", alt)
9626 c.urlParams_.Set("prettyPrint", "false")
9627 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetchAdditionalSpecContent")
9628 urls += "?" + c.urlParams_.Encode()
9629 req, err := http.NewRequest("GET", urls, nil)
9630 if err != nil {
9631 return nil, err
9632 }
9633 req.Header = reqHeaders
9634 googleapi.Expand(req.URL, map[string]string{
9635 "name": c.name,
9636 })
9637 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.fetchAdditionalSpecContent", "request", internallog.HTTPRequest(req, nil))
9638 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9639 }
9640
9641 // Do executes the "apihub.projects.locations.apis.versions.specs.fetchAdditionalSpecContent" call.
9642 // Any non-2xx status code is an error. Response headers are in either
9643 // *GoogleCloudApihubV1FetchAdditionalSpecContentResponse.ServerResponse.Header
9644 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
9645 // Use googleapi.IsNotModified to check whether the returned error was because
9646 // http.StatusNotModified was returned.
9647 func (c *ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1FetchAdditionalSpecContentResponse, error) {
9648 gensupport.SetOptions(c.urlParams_, opts...)
9649 res, err := c.doRequest("json")
9650 if res != nil && res.StatusCode == http.StatusNotModified {
9651 if res.Body != nil {
9652 res.Body.Close()
9653 }
9654 return nil, gensupport.WrapError(&googleapi.Error{
9655 Code: res.StatusCode,
9656 Header: res.Header,
9657 })
9658 }
9659 if err != nil {
9660 return nil, err
9661 }
9662 defer googleapi.CloseBody(res)
9663 if err := googleapi.CheckResponse(res); err != nil {
9664 return nil, gensupport.WrapError(err)
9665 }
9666 ret := &GoogleCloudApihubV1FetchAdditionalSpecContentResponse{
9667 ServerResponse: googleapi.ServerResponse{
9668 Header: res.Header,
9669 HTTPStatusCode: res.StatusCode,
9670 },
9671 }
9672 target := &ret
9673 b, err := gensupport.DecodeResponseBytes(target, res)
9674 if err != nil {
9675 return nil, err
9676 }
9677 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.fetchAdditionalSpecContent", "response", internallog.HTTPResponse(res, b))
9678 return ret, nil
9679 }
9680
9681 type ProjectsLocationsApisVersionsSpecsGetCall struct {
9682 s *Service
9683 name string
9684 urlParams_ gensupport.URLParams
9685 ifNoneMatch_ string
9686 ctx_ context.Context
9687 header_ http.Header
9688 }
9689
9690 // Get: Get details about the information parsed from a spec. Note that this
9691 // method does not return the raw spec contents. Use GetSpecContents method to
9692 // retrieve the same.
9693 //
9694 // - name: The name of the spec to retrieve. Format:
9695 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/spec
9696 // s/{spec}`.
9697 func (r *ProjectsLocationsApisVersionsSpecsService) Get(name string) *ProjectsLocationsApisVersionsSpecsGetCall {
9698 c := &ProjectsLocationsApisVersionsSpecsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9699 c.name = name
9700 return c
9701 }
9702
9703 // Fields allows partial responses to be retrieved. See
9704 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9705 // details.
9706 func (c *ProjectsLocationsApisVersionsSpecsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsGetCall {
9707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9708 return c
9709 }
9710
9711 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9712 // object's ETag matches the given value. This is useful for getting updates
9713 // only after the object has changed since the last request.
9714 func (c *ProjectsLocationsApisVersionsSpecsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsGetCall {
9715 c.ifNoneMatch_ = entityTag
9716 return c
9717 }
9718
9719 // Context sets the context to be used in this call's Do method.
9720 func (c *ProjectsLocationsApisVersionsSpecsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsGetCall {
9721 c.ctx_ = ctx
9722 return c
9723 }
9724
9725 // Header returns a http.Header that can be modified by the caller to add
9726 // headers to the request.
9727 func (c *ProjectsLocationsApisVersionsSpecsGetCall) Header() http.Header {
9728 if c.header_ == nil {
9729 c.header_ = make(http.Header)
9730 }
9731 return c.header_
9732 }
9733
9734 func (c *ProjectsLocationsApisVersionsSpecsGetCall) doRequest(alt string) (*http.Response, error) {
9735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9736 if c.ifNoneMatch_ != "" {
9737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9738 }
9739 c.urlParams_.Set("alt", alt)
9740 c.urlParams_.Set("prettyPrint", "false")
9741 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9742 urls += "?" + c.urlParams_.Encode()
9743 req, err := http.NewRequest("GET", urls, nil)
9744 if err != nil {
9745 return nil, err
9746 }
9747 req.Header = reqHeaders
9748 googleapi.Expand(req.URL, map[string]string{
9749 "name": c.name,
9750 })
9751 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.get", "request", internallog.HTTPRequest(req, nil))
9752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9753 }
9754
9755 // Do executes the "apihub.projects.locations.apis.versions.specs.get" call.
9756 // Any non-2xx status code is an error. Response headers are in either
9757 // *GoogleCloudApihubV1Spec.ServerResponse.Header or (if a response was
9758 // returned at all) in error.(*googleapi.Error).Header. Use
9759 // googleapi.IsNotModified to check whether the returned error was because
9760 // http.StatusNotModified was returned.
9761 func (c *ProjectsLocationsApisVersionsSpecsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Spec, error) {
9762 gensupport.SetOptions(c.urlParams_, opts...)
9763 res, err := c.doRequest("json")
9764 if res != nil && res.StatusCode == http.StatusNotModified {
9765 if res.Body != nil {
9766 res.Body.Close()
9767 }
9768 return nil, gensupport.WrapError(&googleapi.Error{
9769 Code: res.StatusCode,
9770 Header: res.Header,
9771 })
9772 }
9773 if err != nil {
9774 return nil, err
9775 }
9776 defer googleapi.CloseBody(res)
9777 if err := googleapi.CheckResponse(res); err != nil {
9778 return nil, gensupport.WrapError(err)
9779 }
9780 ret := &GoogleCloudApihubV1Spec{
9781 ServerResponse: googleapi.ServerResponse{
9782 Header: res.Header,
9783 HTTPStatusCode: res.StatusCode,
9784 },
9785 }
9786 target := &ret
9787 b, err := gensupport.DecodeResponseBytes(target, res)
9788 if err != nil {
9789 return nil, err
9790 }
9791 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.get", "response", internallog.HTTPResponse(res, b))
9792 return ret, nil
9793 }
9794
9795 type ProjectsLocationsApisVersionsSpecsGetContentsCall struct {
9796 s *Service
9797 name string
9798 urlParams_ gensupport.URLParams
9799 ifNoneMatch_ string
9800 ctx_ context.Context
9801 header_ http.Header
9802 }
9803
9804 // GetContents: Get spec contents.
9805 //
9806 // - name: The name of the spec whose contents need to be retrieved. Format:
9807 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/spec
9808 // s/{spec}`.
9809 func (r *ProjectsLocationsApisVersionsSpecsService) GetContents(name string) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
9810 c := &ProjectsLocationsApisVersionsSpecsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9811 c.name = name
9812 return c
9813 }
9814
9815 // Fields allows partial responses to be retrieved. See
9816 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9817 // details.
9818 func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
9819 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9820 return c
9821 }
9822
9823 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9824 // object's ETag matches the given value. This is useful for getting updates
9825 // only after the object has changed since the last request.
9826 func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
9827 c.ifNoneMatch_ = entityTag
9828 return c
9829 }
9830
9831 // Context sets the context to be used in this call's Do method.
9832 func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
9833 c.ctx_ = ctx
9834 return c
9835 }
9836
9837 // Header returns a http.Header that can be modified by the caller to add
9838 // headers to the request.
9839 func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Header() http.Header {
9840 if c.header_ == nil {
9841 c.header_ = make(http.Header)
9842 }
9843 return c.header_
9844 }
9845
9846 func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) doRequest(alt string) (*http.Response, error) {
9847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9848 if c.ifNoneMatch_ != "" {
9849 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9850 }
9851 c.urlParams_.Set("alt", alt)
9852 c.urlParams_.Set("prettyPrint", "false")
9853 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:contents")
9854 urls += "?" + c.urlParams_.Encode()
9855 req, err := http.NewRequest("GET", urls, nil)
9856 if err != nil {
9857 return nil, err
9858 }
9859 req.Header = reqHeaders
9860 googleapi.Expand(req.URL, map[string]string{
9861 "name": c.name,
9862 })
9863 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.getContents", "request", internallog.HTTPRequest(req, nil))
9864 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9865 }
9866
9867 // Do executes the "apihub.projects.locations.apis.versions.specs.getContents" call.
9868 // Any non-2xx status code is an error. Response headers are in either
9869 // *GoogleCloudApihubV1SpecContents.ServerResponse.Header or (if a response was
9870 // returned at all) in error.(*googleapi.Error).Header. Use
9871 // googleapi.IsNotModified to check whether the returned error was because
9872 // http.StatusNotModified was returned.
9873 func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1SpecContents, error) {
9874 gensupport.SetOptions(c.urlParams_, opts...)
9875 res, err := c.doRequest("json")
9876 if res != nil && res.StatusCode == http.StatusNotModified {
9877 if res.Body != nil {
9878 res.Body.Close()
9879 }
9880 return nil, gensupport.WrapError(&googleapi.Error{
9881 Code: res.StatusCode,
9882 Header: res.Header,
9883 })
9884 }
9885 if err != nil {
9886 return nil, err
9887 }
9888 defer googleapi.CloseBody(res)
9889 if err := googleapi.CheckResponse(res); err != nil {
9890 return nil, gensupport.WrapError(err)
9891 }
9892 ret := &GoogleCloudApihubV1SpecContents{
9893 ServerResponse: googleapi.ServerResponse{
9894 Header: res.Header,
9895 HTTPStatusCode: res.StatusCode,
9896 },
9897 }
9898 target := &ret
9899 b, err := gensupport.DecodeResponseBytes(target, res)
9900 if err != nil {
9901 return nil, err
9902 }
9903 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.getContents", "response", internallog.HTTPResponse(res, b))
9904 return ret, nil
9905 }
9906
9907 type ProjectsLocationsApisVersionsSpecsLintCall struct {
9908 s *Service
9909 name string
9910 googlecloudapihubv1lintspecrequest *GoogleCloudApihubV1LintSpecRequest
9911 urlParams_ gensupport.URLParams
9912 ctx_ context.Context
9913 header_ http.Header
9914 }
9915
9916 // Lint: Lints the requested spec and updates the corresponding API Spec with
9917 // the lint response. This lint response will be available in all subsequent
9918 // Get and List Spec calls to Core service.
9919 //
9920 // - name: The name of the spec to be linted. Format:
9921 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/spec
9922 // s/{spec}`.
9923 func (r *ProjectsLocationsApisVersionsSpecsService) Lint(name string, googlecloudapihubv1lintspecrequest *GoogleCloudApihubV1LintSpecRequest) *ProjectsLocationsApisVersionsSpecsLintCall {
9924 c := &ProjectsLocationsApisVersionsSpecsLintCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9925 c.name = name
9926 c.googlecloudapihubv1lintspecrequest = googlecloudapihubv1lintspecrequest
9927 return c
9928 }
9929
9930 // Fields allows partial responses to be retrieved. See
9931 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9932 // details.
9933 func (c *ProjectsLocationsApisVersionsSpecsLintCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsLintCall {
9934 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9935 return c
9936 }
9937
9938 // Context sets the context to be used in this call's Do method.
9939 func (c *ProjectsLocationsApisVersionsSpecsLintCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsLintCall {
9940 c.ctx_ = ctx
9941 return c
9942 }
9943
9944 // Header returns a http.Header that can be modified by the caller to add
9945 // headers to the request.
9946 func (c *ProjectsLocationsApisVersionsSpecsLintCall) Header() http.Header {
9947 if c.header_ == nil {
9948 c.header_ = make(http.Header)
9949 }
9950 return c.header_
9951 }
9952
9953 func (c *ProjectsLocationsApisVersionsSpecsLintCall) doRequest(alt string) (*http.Response, error) {
9954 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9955 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1lintspecrequest)
9956 if err != nil {
9957 return nil, err
9958 }
9959 c.urlParams_.Set("alt", alt)
9960 c.urlParams_.Set("prettyPrint", "false")
9961 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lint")
9962 urls += "?" + c.urlParams_.Encode()
9963 req, err := http.NewRequest("POST", urls, body)
9964 if err != nil {
9965 return nil, err
9966 }
9967 req.Header = reqHeaders
9968 googleapi.Expand(req.URL, map[string]string{
9969 "name": c.name,
9970 })
9971 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.lint", "request", internallog.HTTPRequest(req, body.Bytes()))
9972 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9973 }
9974
9975 // Do executes the "apihub.projects.locations.apis.versions.specs.lint" call.
9976 // Any non-2xx status code is an error. Response headers are in either
9977 // *Empty.ServerResponse.Header or (if a response was returned at all) in
9978 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9979 // whether the returned error was because http.StatusNotModified was returned.
9980 func (c *ProjectsLocationsApisVersionsSpecsLintCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9981 gensupport.SetOptions(c.urlParams_, opts...)
9982 res, err := c.doRequest("json")
9983 if res != nil && res.StatusCode == http.StatusNotModified {
9984 if res.Body != nil {
9985 res.Body.Close()
9986 }
9987 return nil, gensupport.WrapError(&googleapi.Error{
9988 Code: res.StatusCode,
9989 Header: res.Header,
9990 })
9991 }
9992 if err != nil {
9993 return nil, err
9994 }
9995 defer googleapi.CloseBody(res)
9996 if err := googleapi.CheckResponse(res); err != nil {
9997 return nil, gensupport.WrapError(err)
9998 }
9999 ret := &Empty{
10000 ServerResponse: googleapi.ServerResponse{
10001 Header: res.Header,
10002 HTTPStatusCode: res.StatusCode,
10003 },
10004 }
10005 target := &ret
10006 b, err := gensupport.DecodeResponseBytes(target, res)
10007 if err != nil {
10008 return nil, err
10009 }
10010 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.lint", "response", internallog.HTTPResponse(res, b))
10011 return ret, nil
10012 }
10013
10014 type ProjectsLocationsApisVersionsSpecsListCall struct {
10015 s *Service
10016 parent string
10017 urlParams_ gensupport.URLParams
10018 ifNoneMatch_ string
10019 ctx_ context.Context
10020 header_ http.Header
10021 }
10022
10023 // List: List specs corresponding to a particular API resource.
10024 //
10025 // - parent: The parent, which owns this collection of specs. Format:
10026 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}`.
10027 func (r *ProjectsLocationsApisVersionsSpecsService) List(parent string) *ProjectsLocationsApisVersionsSpecsListCall {
10028 c := &ProjectsLocationsApisVersionsSpecsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10029 c.parent = parent
10030 return c
10031 }
10032
10033 // Filter sets the optional parameter "filter": An expression that filters the
10034 // list of Specs. A filter expression consists of a field name, a comparison
10035 // operator, and a value for filtering. The value must be a string. The
10036 // comparison operator must be one of: `<`, `>`, `:` or `=`. Filters are not
10037 // case sensitive. The following fields in the `Spec` are eligible for
10038 // filtering: * `display_name` - The display name of the Spec. Allowed
10039 // comparison operators: `=`. * `create_time` - The time at which the Spec was
10040 // created. The value should be in the
10041 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
10042 // operators: `>` and `<`. * `spec_type.enum_values.values.id` - The allowed
10043 // value id of the spec_type attribute associated with the Spec. Allowed
10044 // comparison operators: `:`. * `spec_type.enum_values.values.display_name` -
10045 // The allowed value display name of the spec_type attribute associated with
10046 // the Spec. Allowed comparison operators: `:`. *
10047 // `lint_response.json_values.values` - The json value of the lint_response
10048 // attribute associated with the Spec. Allowed comparison operators: `:`. *
10049 // `mime_type` - The MIME type of the Spec. Allowed comparison operators: `=`.
10050 // * `attributes.projects/test-project-id/locations/test-location-id/
10051 // attributes/user-defined-attribute-id.enum_values.values.id` - The allowed
10052 // value id of the user defined enum attribute associated with the Resource.
10053 // Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a
10054 // placeholder that can be replaced with any user defined enum attribute name.
10055 // * `attributes.projects/test-project-id/locations/test-location-id/
10056 // attributes/user-defined-attribute-id.enum_values.values.display_name` - The
10057 // allowed value display name of the user defined enum attribute associated
10058 // with the Resource. Allowed comparison operator is `:`. Here
10059 // user-defined-attribute-enum-display-name is a placeholder that can be
10060 // replaced with any user defined enum attribute enum name. *
10061 // `attributes.projects/test-project-id/locations/test-location-id/
10062 // attributes/user-defined-attribute-id.string_values.values` - The allowed
10063 // value of the user defined string attribute associated with the Resource.
10064 // Allowed comparison operator is `:`. Here user-defined-attribute-string is a
10065 // placeholder that can be replaced with any user defined string attribute
10066 // name. * `attributes.projects/test-project-id/locations/test-location-id/
10067 // attributes/user-defined-attribute-id.json_values.values` - The allowed value
10068 // of the user defined JSON attribute associated with the Resource. Allowed
10069 // comparison operator is `:`. Here user-defined-attribute-json is a
10070 // placeholder that can be replaced with any user defined JSON attribute name.
10071 // Expressions are combined with either `AND` logic operator or `OR` logical
10072 // operator but not both of them together i.e. only one of the `AND` or `OR`
10073 // operator can be used throughout the filter string and both the operators
10074 // cannot be used together. No other logical operators are supported. At most
10075 // three filter fields are allowed in the filter string and if provided more
10076 // than that then `INVALID_ARGUMENT` error is returned by the API. Here are a
10077 // few examples: * `spec_type.enum_values.values.id: rest-id` - The filter
10078 // string specifies that the id of the allowed value associated with the
10079 // spec_type attribute is _rest-id_. *
10080 // `spec_type.enum_values.values.display_name: \"Rest Display Name\" - The
10081 // filter string specifies that the display name of the allowed value
10082 // associated with the spec_type attribute is `Rest Display Name`. *
10083 // `spec_type.enum_values.values.id: grpc-id AND create_time <
10084 // \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The
10085 // id of the allowed value associated with the spec_type attribute is _grpc-id_
10086 // and the spec was created before _2021-08-15 14:50:00 UTC_ and after
10087 // _2021-08-10 12:00:00 UTC_. * `spec_type.enum_values.values.id: rest-id OR
10088 // spec_type.enum_values.values.id: grpc-id` - The id of the allowed value
10089 // associated with the spec_type attribute is _rest-id_ or _grpc-id_. *
10090 // `spec_type.enum_values.values.id: rest-id AND
10091 // attributes.projects/test-project-id/locations/test-location-id/
10092 // attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id: test`
10093 // - The filter string specifies that the id of the allowed value associated
10094 // with the spec_type attribute is _rest-id_ and the id of the allowed value
10095 // associated with the user defined attribute of type enum is _test_.
10096 func (c *ProjectsLocationsApisVersionsSpecsListCall) Filter(filter string) *ProjectsLocationsApisVersionsSpecsListCall {
10097 c.urlParams_.Set("filter", filter)
10098 return c
10099 }
10100
10101 // PageSize sets the optional parameter "pageSize": The maximum number of specs
10102 // to return. The service may return fewer than this value. If unspecified, at
10103 // most 50 specs will be returned. The maximum value is 1000; values above 1000
10104 // will be coerced to 1000.
10105 func (c *ProjectsLocationsApisVersionsSpecsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsSpecsListCall {
10106 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10107 return c
10108 }
10109
10110 // PageToken sets the optional parameter "pageToken": A page token, received
10111 // from a previous `ListSpecs` call. Provide this to retrieve the subsequent
10112 // page. When paginating, all other parameters provided to `ListSpecs` must
10113 // match the call that provided the page token.
10114 func (c *ProjectsLocationsApisVersionsSpecsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsSpecsListCall {
10115 c.urlParams_.Set("pageToken", pageToken)
10116 return c
10117 }
10118
10119 // Fields allows partial responses to be retrieved. See
10120 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10121 // details.
10122 func (c *ProjectsLocationsApisVersionsSpecsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsListCall {
10123 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10124 return c
10125 }
10126
10127 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10128 // object's ETag matches the given value. This is useful for getting updates
10129 // only after the object has changed since the last request.
10130 func (c *ProjectsLocationsApisVersionsSpecsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsListCall {
10131 c.ifNoneMatch_ = entityTag
10132 return c
10133 }
10134
10135 // Context sets the context to be used in this call's Do method.
10136 func (c *ProjectsLocationsApisVersionsSpecsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsListCall {
10137 c.ctx_ = ctx
10138 return c
10139 }
10140
10141 // Header returns a http.Header that can be modified by the caller to add
10142 // headers to the request.
10143 func (c *ProjectsLocationsApisVersionsSpecsListCall) Header() http.Header {
10144 if c.header_ == nil {
10145 c.header_ = make(http.Header)
10146 }
10147 return c.header_
10148 }
10149
10150 func (c *ProjectsLocationsApisVersionsSpecsListCall) doRequest(alt string) (*http.Response, error) {
10151 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10152 if c.ifNoneMatch_ != "" {
10153 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10154 }
10155 c.urlParams_.Set("alt", alt)
10156 c.urlParams_.Set("prettyPrint", "false")
10157 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/specs")
10158 urls += "?" + c.urlParams_.Encode()
10159 req, err := http.NewRequest("GET", urls, nil)
10160 if err != nil {
10161 return nil, err
10162 }
10163 req.Header = reqHeaders
10164 googleapi.Expand(req.URL, map[string]string{
10165 "parent": c.parent,
10166 })
10167 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.list", "request", internallog.HTTPRequest(req, nil))
10168 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10169 }
10170
10171 // Do executes the "apihub.projects.locations.apis.versions.specs.list" call.
10172 // Any non-2xx status code is an error. Response headers are in either
10173 // *GoogleCloudApihubV1ListSpecsResponse.ServerResponse.Header or (if a
10174 // response was returned at all) in error.(*googleapi.Error).Header. Use
10175 // googleapi.IsNotModified to check whether the returned error was because
10176 // http.StatusNotModified was returned.
10177 func (c *ProjectsLocationsApisVersionsSpecsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListSpecsResponse, error) {
10178 gensupport.SetOptions(c.urlParams_, opts...)
10179 res, err := c.doRequest("json")
10180 if res != nil && res.StatusCode == http.StatusNotModified {
10181 if res.Body != nil {
10182 res.Body.Close()
10183 }
10184 return nil, gensupport.WrapError(&googleapi.Error{
10185 Code: res.StatusCode,
10186 Header: res.Header,
10187 })
10188 }
10189 if err != nil {
10190 return nil, err
10191 }
10192 defer googleapi.CloseBody(res)
10193 if err := googleapi.CheckResponse(res); err != nil {
10194 return nil, gensupport.WrapError(err)
10195 }
10196 ret := &GoogleCloudApihubV1ListSpecsResponse{
10197 ServerResponse: googleapi.ServerResponse{
10198 Header: res.Header,
10199 HTTPStatusCode: res.StatusCode,
10200 },
10201 }
10202 target := &ret
10203 b, err := gensupport.DecodeResponseBytes(target, res)
10204 if err != nil {
10205 return nil, err
10206 }
10207 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.list", "response", internallog.HTTPResponse(res, b))
10208 return ret, nil
10209 }
10210
10211 // Pages invokes f for each page of results.
10212 // A non-nil error returned from f will halt the iteration.
10213 // The provided context supersedes any context provided to the Context method.
10214 func (c *ProjectsLocationsApisVersionsSpecsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListSpecsResponse) error) error {
10215 c.ctx_ = ctx
10216 defer c.PageToken(c.urlParams_.Get("pageToken"))
10217 for {
10218 x, err := c.Do()
10219 if err != nil {
10220 return err
10221 }
10222 if err := f(x); err != nil {
10223 return err
10224 }
10225 if x.NextPageToken == "" {
10226 return nil
10227 }
10228 c.PageToken(x.NextPageToken)
10229 }
10230 }
10231
10232 type ProjectsLocationsApisVersionsSpecsPatchCall struct {
10233 s *Service
10234 name string
10235 googlecloudapihubv1spec *GoogleCloudApihubV1Spec
10236 urlParams_ gensupport.URLParams
10237 ctx_ context.Context
10238 header_ http.Header
10239 }
10240
10241 // Patch: Update spec. The following fields in the spec can be updated: *
10242 // display_name * source_uri * lint_response * attributes * contents *
10243 // spec_type In case of an OAS spec, updating spec contents can lead to: 1.
10244 // Creation, deletion and update of operations. 2. Creation, deletion and
10245 // update of definitions. 3. Update of other info parsed out from the new spec.
10246 // In case of contents or source_uri being present in update mask, spec_type
10247 // must also be present. Also, spec_type can not be present in update mask if
10248 // contents or source_uri is not present. The update_mask should be used to
10249 // specify the fields being updated.
10250 //
10251 // - name: Identifier. The name of the spec. Format:
10252 // `projects/{project}/locations/{location}/apis/{api}/versions/{version}/spec
10253 // s/{spec}`.
10254 func (r *ProjectsLocationsApisVersionsSpecsService) Patch(name string, googlecloudapihubv1spec *GoogleCloudApihubV1Spec) *ProjectsLocationsApisVersionsSpecsPatchCall {
10255 c := &ProjectsLocationsApisVersionsSpecsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10256 c.name = name
10257 c.googlecloudapihubv1spec = googlecloudapihubv1spec
10258 return c
10259 }
10260
10261 // UpdateMask sets the optional parameter "updateMask": Required. The list of
10262 // fields to update.
10263 func (c *ProjectsLocationsApisVersionsSpecsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisVersionsSpecsPatchCall {
10264 c.urlParams_.Set("updateMask", updateMask)
10265 return c
10266 }
10267
10268 // Fields allows partial responses to be retrieved. See
10269 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10270 // details.
10271 func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsPatchCall {
10272 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10273 return c
10274 }
10275
10276 // Context sets the context to be used in this call's Do method.
10277 func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsPatchCall {
10278 c.ctx_ = ctx
10279 return c
10280 }
10281
10282 // Header returns a http.Header that can be modified by the caller to add
10283 // headers to the request.
10284 func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Header() http.Header {
10285 if c.header_ == nil {
10286 c.header_ = make(http.Header)
10287 }
10288 return c.header_
10289 }
10290
10291 func (c *ProjectsLocationsApisVersionsSpecsPatchCall) doRequest(alt string) (*http.Response, error) {
10292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10293 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1spec)
10294 if err != nil {
10295 return nil, err
10296 }
10297 c.urlParams_.Set("alt", alt)
10298 c.urlParams_.Set("prettyPrint", "false")
10299 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10300 urls += "?" + c.urlParams_.Encode()
10301 req, err := http.NewRequest("PATCH", urls, body)
10302 if err != nil {
10303 return nil, err
10304 }
10305 req.Header = reqHeaders
10306 googleapi.Expand(req.URL, map[string]string{
10307 "name": c.name,
10308 })
10309 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
10310 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10311 }
10312
10313 // Do executes the "apihub.projects.locations.apis.versions.specs.patch" call.
10314 // Any non-2xx status code is an error. Response headers are in either
10315 // *GoogleCloudApihubV1Spec.ServerResponse.Header or (if a response was
10316 // returned at all) in error.(*googleapi.Error).Header. Use
10317 // googleapi.IsNotModified to check whether the returned error was because
10318 // http.StatusNotModified was returned.
10319 func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Spec, error) {
10320 gensupport.SetOptions(c.urlParams_, opts...)
10321 res, err := c.doRequest("json")
10322 if res != nil && res.StatusCode == http.StatusNotModified {
10323 if res.Body != nil {
10324 res.Body.Close()
10325 }
10326 return nil, gensupport.WrapError(&googleapi.Error{
10327 Code: res.StatusCode,
10328 Header: res.Header,
10329 })
10330 }
10331 if err != nil {
10332 return nil, err
10333 }
10334 defer googleapi.CloseBody(res)
10335 if err := googleapi.CheckResponse(res); err != nil {
10336 return nil, gensupport.WrapError(err)
10337 }
10338 ret := &GoogleCloudApihubV1Spec{
10339 ServerResponse: googleapi.ServerResponse{
10340 Header: res.Header,
10341 HTTPStatusCode: res.StatusCode,
10342 },
10343 }
10344 target := &ret
10345 b, err := gensupport.DecodeResponseBytes(target, res)
10346 if err != nil {
10347 return nil, err
10348 }
10349 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.apis.versions.specs.patch", "response", internallog.HTTPResponse(res, b))
10350 return ret, nil
10351 }
10352
10353 type ProjectsLocationsAttributesCreateCall struct {
10354 s *Service
10355 parent string
10356 googlecloudapihubv1attribute *GoogleCloudApihubV1Attribute
10357 urlParams_ gensupport.URLParams
10358 ctx_ context.Context
10359 header_ http.Header
10360 }
10361
10362 // Create: Create a user defined attribute. Certain pre defined attributes are
10363 // already created by the API hub. These attributes will have type as
10364 // `SYSTEM_DEFINED` and can be listed via ListAttributes method. Allowed values
10365 // for the same can be updated via UpdateAttribute method.
10366 //
10367 // - parent: The parent resource for Attribute. Format:
10368 // `projects/{project}/locations/{location}`.
10369 func (r *ProjectsLocationsAttributesService) Create(parent string, googlecloudapihubv1attribute *GoogleCloudApihubV1Attribute) *ProjectsLocationsAttributesCreateCall {
10370 c := &ProjectsLocationsAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10371 c.parent = parent
10372 c.googlecloudapihubv1attribute = googlecloudapihubv1attribute
10373 return c
10374 }
10375
10376 // AttributeId sets the optional parameter "attributeId": The ID to use for the
10377 // attribute, which will become the final component of the attribute's resource
10378 // name. This field is optional. * If provided, the same will be used. The
10379 // service will throw an error if the specified id is already used by another
10380 // attribute resource in the API hub. * If not provided, a system generated id
10381 // will be used. This value should be 4-500 characters, and valid characters
10382 // are /a-z[0-9]-_/.
10383 func (c *ProjectsLocationsAttributesCreateCall) AttributeId(attributeId string) *ProjectsLocationsAttributesCreateCall {
10384 c.urlParams_.Set("attributeId", attributeId)
10385 return c
10386 }
10387
10388 // Fields allows partial responses to be retrieved. See
10389 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10390 // details.
10391 func (c *ProjectsLocationsAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAttributesCreateCall {
10392 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10393 return c
10394 }
10395
10396 // Context sets the context to be used in this call's Do method.
10397 func (c *ProjectsLocationsAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsAttributesCreateCall {
10398 c.ctx_ = ctx
10399 return c
10400 }
10401
10402 // Header returns a http.Header that can be modified by the caller to add
10403 // headers to the request.
10404 func (c *ProjectsLocationsAttributesCreateCall) Header() http.Header {
10405 if c.header_ == nil {
10406 c.header_ = make(http.Header)
10407 }
10408 return c.header_
10409 }
10410
10411 func (c *ProjectsLocationsAttributesCreateCall) doRequest(alt string) (*http.Response, error) {
10412 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10413 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1attribute)
10414 if err != nil {
10415 return nil, err
10416 }
10417 c.urlParams_.Set("alt", alt)
10418 c.urlParams_.Set("prettyPrint", "false")
10419 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes")
10420 urls += "?" + c.urlParams_.Encode()
10421 req, err := http.NewRequest("POST", urls, body)
10422 if err != nil {
10423 return nil, err
10424 }
10425 req.Header = reqHeaders
10426 googleapi.Expand(req.URL, map[string]string{
10427 "parent": c.parent,
10428 })
10429 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10430 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10431 }
10432
10433 // Do executes the "apihub.projects.locations.attributes.create" call.
10434 // Any non-2xx status code is an error. Response headers are in either
10435 // *GoogleCloudApihubV1Attribute.ServerResponse.Header or (if a response was
10436 // returned at all) in error.(*googleapi.Error).Header. Use
10437 // googleapi.IsNotModified to check whether the returned error was because
10438 // http.StatusNotModified was returned.
10439 func (c *ProjectsLocationsAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Attribute, error) {
10440 gensupport.SetOptions(c.urlParams_, opts...)
10441 res, err := c.doRequest("json")
10442 if res != nil && res.StatusCode == http.StatusNotModified {
10443 if res.Body != nil {
10444 res.Body.Close()
10445 }
10446 return nil, gensupport.WrapError(&googleapi.Error{
10447 Code: res.StatusCode,
10448 Header: res.Header,
10449 })
10450 }
10451 if err != nil {
10452 return nil, err
10453 }
10454 defer googleapi.CloseBody(res)
10455 if err := googleapi.CheckResponse(res); err != nil {
10456 return nil, gensupport.WrapError(err)
10457 }
10458 ret := &GoogleCloudApihubV1Attribute{
10459 ServerResponse: googleapi.ServerResponse{
10460 Header: res.Header,
10461 HTTPStatusCode: res.StatusCode,
10462 },
10463 }
10464 target := &ret
10465 b, err := gensupport.DecodeResponseBytes(target, res)
10466 if err != nil {
10467 return nil, err
10468 }
10469 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.create", "response", internallog.HTTPResponse(res, b))
10470 return ret, nil
10471 }
10472
10473 type ProjectsLocationsAttributesDeleteCall struct {
10474 s *Service
10475 name string
10476 urlParams_ gensupport.URLParams
10477 ctx_ context.Context
10478 header_ http.Header
10479 }
10480
10481 // Delete: Delete an attribute. Note: System defined attributes cannot be
10482 // deleted. All associations of the attribute being deleted with any API hub
10483 // resource will also get deleted.
10484 //
10485 // - name: The name of the attribute to delete. Format:
10486 // `projects/{project}/locations/{location}/attributes/{attribute}`.
10487 func (r *ProjectsLocationsAttributesService) Delete(name string) *ProjectsLocationsAttributesDeleteCall {
10488 c := &ProjectsLocationsAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10489 c.name = name
10490 return c
10491 }
10492
10493 // Fields allows partial responses to be retrieved. See
10494 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10495 // details.
10496 func (c *ProjectsLocationsAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAttributesDeleteCall {
10497 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10498 return c
10499 }
10500
10501 // Context sets the context to be used in this call's Do method.
10502 func (c *ProjectsLocationsAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAttributesDeleteCall {
10503 c.ctx_ = ctx
10504 return c
10505 }
10506
10507 // Header returns a http.Header that can be modified by the caller to add
10508 // headers to the request.
10509 func (c *ProjectsLocationsAttributesDeleteCall) Header() http.Header {
10510 if c.header_ == nil {
10511 c.header_ = make(http.Header)
10512 }
10513 return c.header_
10514 }
10515
10516 func (c *ProjectsLocationsAttributesDeleteCall) doRequest(alt string) (*http.Response, error) {
10517 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10518 c.urlParams_.Set("alt", alt)
10519 c.urlParams_.Set("prettyPrint", "false")
10520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10521 urls += "?" + c.urlParams_.Encode()
10522 req, err := http.NewRequest("DELETE", urls, nil)
10523 if err != nil {
10524 return nil, err
10525 }
10526 req.Header = reqHeaders
10527 googleapi.Expand(req.URL, map[string]string{
10528 "name": c.name,
10529 })
10530 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.delete", "request", internallog.HTTPRequest(req, nil))
10531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10532 }
10533
10534 // Do executes the "apihub.projects.locations.attributes.delete" call.
10535 // Any non-2xx status code is an error. Response headers are in either
10536 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10537 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10538 // whether the returned error was because http.StatusNotModified was returned.
10539 func (c *ProjectsLocationsAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10540 gensupport.SetOptions(c.urlParams_, opts...)
10541 res, err := c.doRequest("json")
10542 if res != nil && res.StatusCode == http.StatusNotModified {
10543 if res.Body != nil {
10544 res.Body.Close()
10545 }
10546 return nil, gensupport.WrapError(&googleapi.Error{
10547 Code: res.StatusCode,
10548 Header: res.Header,
10549 })
10550 }
10551 if err != nil {
10552 return nil, err
10553 }
10554 defer googleapi.CloseBody(res)
10555 if err := googleapi.CheckResponse(res); err != nil {
10556 return nil, gensupport.WrapError(err)
10557 }
10558 ret := &Empty{
10559 ServerResponse: googleapi.ServerResponse{
10560 Header: res.Header,
10561 HTTPStatusCode: res.StatusCode,
10562 },
10563 }
10564 target := &ret
10565 b, err := gensupport.DecodeResponseBytes(target, res)
10566 if err != nil {
10567 return nil, err
10568 }
10569 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.delete", "response", internallog.HTTPResponse(res, b))
10570 return ret, nil
10571 }
10572
10573 type ProjectsLocationsAttributesGetCall struct {
10574 s *Service
10575 name string
10576 urlParams_ gensupport.URLParams
10577 ifNoneMatch_ string
10578 ctx_ context.Context
10579 header_ http.Header
10580 }
10581
10582 // Get: Get details about the attribute.
10583 //
10584 // - name: The name of the attribute to retrieve. Format:
10585 // `projects/{project}/locations/{location}/attributes/{attribute}`.
10586 func (r *ProjectsLocationsAttributesService) Get(name string) *ProjectsLocationsAttributesGetCall {
10587 c := &ProjectsLocationsAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10588 c.name = name
10589 return c
10590 }
10591
10592 // Fields allows partial responses to be retrieved. See
10593 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10594 // details.
10595 func (c *ProjectsLocationsAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAttributesGetCall {
10596 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10597 return c
10598 }
10599
10600 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10601 // object's ETag matches the given value. This is useful for getting updates
10602 // only after the object has changed since the last request.
10603 func (c *ProjectsLocationsAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAttributesGetCall {
10604 c.ifNoneMatch_ = entityTag
10605 return c
10606 }
10607
10608 // Context sets the context to be used in this call's Do method.
10609 func (c *ProjectsLocationsAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsAttributesGetCall {
10610 c.ctx_ = ctx
10611 return c
10612 }
10613
10614 // Header returns a http.Header that can be modified by the caller to add
10615 // headers to the request.
10616 func (c *ProjectsLocationsAttributesGetCall) Header() http.Header {
10617 if c.header_ == nil {
10618 c.header_ = make(http.Header)
10619 }
10620 return c.header_
10621 }
10622
10623 func (c *ProjectsLocationsAttributesGetCall) doRequest(alt string) (*http.Response, error) {
10624 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10625 if c.ifNoneMatch_ != "" {
10626 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10627 }
10628 c.urlParams_.Set("alt", alt)
10629 c.urlParams_.Set("prettyPrint", "false")
10630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10631 urls += "?" + c.urlParams_.Encode()
10632 req, err := http.NewRequest("GET", urls, nil)
10633 if err != nil {
10634 return nil, err
10635 }
10636 req.Header = reqHeaders
10637 googleapi.Expand(req.URL, map[string]string{
10638 "name": c.name,
10639 })
10640 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.get", "request", internallog.HTTPRequest(req, nil))
10641 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10642 }
10643
10644 // Do executes the "apihub.projects.locations.attributes.get" call.
10645 // Any non-2xx status code is an error. Response headers are in either
10646 // *GoogleCloudApihubV1Attribute.ServerResponse.Header or (if a response was
10647 // returned at all) in error.(*googleapi.Error).Header. Use
10648 // googleapi.IsNotModified to check whether the returned error was because
10649 // http.StatusNotModified was returned.
10650 func (c *ProjectsLocationsAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Attribute, error) {
10651 gensupport.SetOptions(c.urlParams_, opts...)
10652 res, err := c.doRequest("json")
10653 if res != nil && res.StatusCode == http.StatusNotModified {
10654 if res.Body != nil {
10655 res.Body.Close()
10656 }
10657 return nil, gensupport.WrapError(&googleapi.Error{
10658 Code: res.StatusCode,
10659 Header: res.Header,
10660 })
10661 }
10662 if err != nil {
10663 return nil, err
10664 }
10665 defer googleapi.CloseBody(res)
10666 if err := googleapi.CheckResponse(res); err != nil {
10667 return nil, gensupport.WrapError(err)
10668 }
10669 ret := &GoogleCloudApihubV1Attribute{
10670 ServerResponse: googleapi.ServerResponse{
10671 Header: res.Header,
10672 HTTPStatusCode: res.StatusCode,
10673 },
10674 }
10675 target := &ret
10676 b, err := gensupport.DecodeResponseBytes(target, res)
10677 if err != nil {
10678 return nil, err
10679 }
10680 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.get", "response", internallog.HTTPResponse(res, b))
10681 return ret, nil
10682 }
10683
10684 type ProjectsLocationsAttributesListCall struct {
10685 s *Service
10686 parent string
10687 urlParams_ gensupport.URLParams
10688 ifNoneMatch_ string
10689 ctx_ context.Context
10690 header_ http.Header
10691 }
10692
10693 // List: List all attributes.
10694 //
10695 // - parent: The parent resource for Attribute. Format:
10696 // `projects/{project}/locations/{location}`.
10697 func (r *ProjectsLocationsAttributesService) List(parent string) *ProjectsLocationsAttributesListCall {
10698 c := &ProjectsLocationsAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10699 c.parent = parent
10700 return c
10701 }
10702
10703 // Filter sets the optional parameter "filter": An expression that filters the
10704 // list of Attributes. A filter expression consists of a field name, a
10705 // comparison operator, and a value for filtering. The value must be a string
10706 // or a boolean. The comparison operator must be one of: `<`, `>` or `=`.
10707 // Filters are not case sensitive. The following fields in the `Attribute` are
10708 // eligible for filtering: * `display_name` - The display name of the
10709 // Attribute. Allowed comparison operators: `=`. * `definition_type` - The
10710 // definition type of the attribute. Allowed comparison operators: `=`. *
10711 // `scope` - The scope of the attribute. Allowed comparison operators: `=`. *
10712 // `data_type` - The type of the data of the attribute. Allowed comparison
10713 // operators: `=`. * `mandatory` - Denotes whether the attribute is mandatory
10714 // or not. Allowed comparison operators: `=`. * `create_time` - The time at
10715 // which the Attribute was created. The value should be in the
10716 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
10717 // operators: `>` and `<`. Expressions are combined with either `AND` logic
10718 // operator or `OR` logical operator but not both of them together i.e. only
10719 // one of the `AND` or `OR` operator can be used throughout the filter string
10720 // and both the operators cannot be used together. No other logical operators
10721 // are supported. At most three filter fields are allowed in the filter string
10722 // and if provided more than that then `INVALID_ARGUMENT` error is returned by
10723 // the API. Here are a few examples: * `display_name = production` - - The
10724 // display name of the attribute is _production_. * `(display_name =
10725 // production) AND (create_time < \"2021-08-15T14:50:00Z\") AND (create_time >
10726 // \"2021-08-10T12:00:00Z\")` - The display name of the attribute is
10727 // _production_ and the attribute was created before _2021-08-15 14:50:00 UTC_
10728 // and after _2021-08-10 12:00:00 UTC_. * `display_name = production OR scope =
10729 // api` - The attribute where the display name is _production_ or the scope is
10730 // _api_.
10731 func (c *ProjectsLocationsAttributesListCall) Filter(filter string) *ProjectsLocationsAttributesListCall {
10732 c.urlParams_.Set("filter", filter)
10733 return c
10734 }
10735
10736 // PageSize sets the optional parameter "pageSize": The maximum number of
10737 // attribute resources to return. The service may return fewer than this value.
10738 // If unspecified, at most 50 attributes will be returned. The maximum value is
10739 // 1000; values above 1000 will be coerced to 1000.
10740 func (c *ProjectsLocationsAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsAttributesListCall {
10741 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10742 return c
10743 }
10744
10745 // PageToken sets the optional parameter "pageToken": A page token, received
10746 // from a previous `ListAttributes` call. Provide this to retrieve the
10747 // subsequent page. When paginating, all other parameters provided to
10748 // `ListAttributes` must match the call that provided the page token.
10749 func (c *ProjectsLocationsAttributesListCall) PageToken(pageToken string) *ProjectsLocationsAttributesListCall {
10750 c.urlParams_.Set("pageToken", pageToken)
10751 return c
10752 }
10753
10754 // Fields allows partial responses to be retrieved. See
10755 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10756 // details.
10757 func (c *ProjectsLocationsAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAttributesListCall {
10758 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10759 return c
10760 }
10761
10762 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10763 // object's ETag matches the given value. This is useful for getting updates
10764 // only after the object has changed since the last request.
10765 func (c *ProjectsLocationsAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAttributesListCall {
10766 c.ifNoneMatch_ = entityTag
10767 return c
10768 }
10769
10770 // Context sets the context to be used in this call's Do method.
10771 func (c *ProjectsLocationsAttributesListCall) Context(ctx context.Context) *ProjectsLocationsAttributesListCall {
10772 c.ctx_ = ctx
10773 return c
10774 }
10775
10776 // Header returns a http.Header that can be modified by the caller to add
10777 // headers to the request.
10778 func (c *ProjectsLocationsAttributesListCall) Header() http.Header {
10779 if c.header_ == nil {
10780 c.header_ = make(http.Header)
10781 }
10782 return c.header_
10783 }
10784
10785 func (c *ProjectsLocationsAttributesListCall) doRequest(alt string) (*http.Response, error) {
10786 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10787 if c.ifNoneMatch_ != "" {
10788 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10789 }
10790 c.urlParams_.Set("alt", alt)
10791 c.urlParams_.Set("prettyPrint", "false")
10792 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes")
10793 urls += "?" + c.urlParams_.Encode()
10794 req, err := http.NewRequest("GET", urls, nil)
10795 if err != nil {
10796 return nil, err
10797 }
10798 req.Header = reqHeaders
10799 googleapi.Expand(req.URL, map[string]string{
10800 "parent": c.parent,
10801 })
10802 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.list", "request", internallog.HTTPRequest(req, nil))
10803 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10804 }
10805
10806 // Do executes the "apihub.projects.locations.attributes.list" call.
10807 // Any non-2xx status code is an error. Response headers are in either
10808 // *GoogleCloudApihubV1ListAttributesResponse.ServerResponse.Header or (if a
10809 // response was returned at all) in error.(*googleapi.Error).Header. Use
10810 // googleapi.IsNotModified to check whether the returned error was because
10811 // http.StatusNotModified was returned.
10812 func (c *ProjectsLocationsAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListAttributesResponse, error) {
10813 gensupport.SetOptions(c.urlParams_, opts...)
10814 res, err := c.doRequest("json")
10815 if res != nil && res.StatusCode == http.StatusNotModified {
10816 if res.Body != nil {
10817 res.Body.Close()
10818 }
10819 return nil, gensupport.WrapError(&googleapi.Error{
10820 Code: res.StatusCode,
10821 Header: res.Header,
10822 })
10823 }
10824 if err != nil {
10825 return nil, err
10826 }
10827 defer googleapi.CloseBody(res)
10828 if err := googleapi.CheckResponse(res); err != nil {
10829 return nil, gensupport.WrapError(err)
10830 }
10831 ret := &GoogleCloudApihubV1ListAttributesResponse{
10832 ServerResponse: googleapi.ServerResponse{
10833 Header: res.Header,
10834 HTTPStatusCode: res.StatusCode,
10835 },
10836 }
10837 target := &ret
10838 b, err := gensupport.DecodeResponseBytes(target, res)
10839 if err != nil {
10840 return nil, err
10841 }
10842 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.list", "response", internallog.HTTPResponse(res, b))
10843 return ret, nil
10844 }
10845
10846 // Pages invokes f for each page of results.
10847 // A non-nil error returned from f will halt the iteration.
10848 // The provided context supersedes any context provided to the Context method.
10849 func (c *ProjectsLocationsAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListAttributesResponse) error) error {
10850 c.ctx_ = ctx
10851 defer c.PageToken(c.urlParams_.Get("pageToken"))
10852 for {
10853 x, err := c.Do()
10854 if err != nil {
10855 return err
10856 }
10857 if err := f(x); err != nil {
10858 return err
10859 }
10860 if x.NextPageToken == "" {
10861 return nil
10862 }
10863 c.PageToken(x.NextPageToken)
10864 }
10865 }
10866
10867 type ProjectsLocationsAttributesPatchCall struct {
10868 s *Service
10869 name string
10870 googlecloudapihubv1attribute *GoogleCloudApihubV1Attribute
10871 urlParams_ gensupport.URLParams
10872 ctx_ context.Context
10873 header_ http.Header
10874 }
10875
10876 // Patch: Update the attribute. The following fields in the Attribute resource
10877 // can be updated: * display_name The display name can be updated for user
10878 // defined attributes only. * description The description can be updated for
10879 // user defined attributes only. * allowed_values To update the list of allowed
10880 // values, clients need to use the fetched list of allowed values and add or
10881 // remove values to or from the same list. The mutable allowed values can be
10882 // updated for both user defined and System defined attributes. The immutable
10883 // allowed values cannot be updated or deleted. The updated list of allowed
10884 // values cannot be empty. If an allowed value that is already used by some
10885 // resource's attribute is deleted, then the association between the resource
10886 // and the attribute value will also be deleted. * cardinality The cardinality
10887 // can be updated for user defined attributes only. Cardinality can only be
10888 // increased during an update. The update_mask should be used to specify the
10889 // fields being updated.
10890 //
10891 // - name: Identifier. The name of the attribute in the API Hub. Format:
10892 // `projects/{project}/locations/{location}/attributes/{attribute}`.
10893 func (r *ProjectsLocationsAttributesService) Patch(name string, googlecloudapihubv1attribute *GoogleCloudApihubV1Attribute) *ProjectsLocationsAttributesPatchCall {
10894 c := &ProjectsLocationsAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10895 c.name = name
10896 c.googlecloudapihubv1attribute = googlecloudapihubv1attribute
10897 return c
10898 }
10899
10900 // UpdateMask sets the optional parameter "updateMask": Required. The list of
10901 // fields to update.
10902 func (c *ProjectsLocationsAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAttributesPatchCall {
10903 c.urlParams_.Set("updateMask", updateMask)
10904 return c
10905 }
10906
10907 // Fields allows partial responses to be retrieved. See
10908 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10909 // details.
10910 func (c *ProjectsLocationsAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAttributesPatchCall {
10911 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10912 return c
10913 }
10914
10915 // Context sets the context to be used in this call's Do method.
10916 func (c *ProjectsLocationsAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsAttributesPatchCall {
10917 c.ctx_ = ctx
10918 return c
10919 }
10920
10921 // Header returns a http.Header that can be modified by the caller to add
10922 // headers to the request.
10923 func (c *ProjectsLocationsAttributesPatchCall) Header() http.Header {
10924 if c.header_ == nil {
10925 c.header_ = make(http.Header)
10926 }
10927 return c.header_
10928 }
10929
10930 func (c *ProjectsLocationsAttributesPatchCall) doRequest(alt string) (*http.Response, error) {
10931 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10932 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1attribute)
10933 if err != nil {
10934 return nil, err
10935 }
10936 c.urlParams_.Set("alt", alt)
10937 c.urlParams_.Set("prettyPrint", "false")
10938 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10939 urls += "?" + c.urlParams_.Encode()
10940 req, err := http.NewRequest("PATCH", urls, body)
10941 if err != nil {
10942 return nil, err
10943 }
10944 req.Header = reqHeaders
10945 googleapi.Expand(req.URL, map[string]string{
10946 "name": c.name,
10947 })
10948 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
10949 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10950 }
10951
10952 // Do executes the "apihub.projects.locations.attributes.patch" call.
10953 // Any non-2xx status code is an error. Response headers are in either
10954 // *GoogleCloudApihubV1Attribute.ServerResponse.Header or (if a response was
10955 // returned at all) in error.(*googleapi.Error).Header. Use
10956 // googleapi.IsNotModified to check whether the returned error was because
10957 // http.StatusNotModified was returned.
10958 func (c *ProjectsLocationsAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Attribute, error) {
10959 gensupport.SetOptions(c.urlParams_, opts...)
10960 res, err := c.doRequest("json")
10961 if res != nil && res.StatusCode == http.StatusNotModified {
10962 if res.Body != nil {
10963 res.Body.Close()
10964 }
10965 return nil, gensupport.WrapError(&googleapi.Error{
10966 Code: res.StatusCode,
10967 Header: res.Header,
10968 })
10969 }
10970 if err != nil {
10971 return nil, err
10972 }
10973 defer googleapi.CloseBody(res)
10974 if err := googleapi.CheckResponse(res); err != nil {
10975 return nil, gensupport.WrapError(err)
10976 }
10977 ret := &GoogleCloudApihubV1Attribute{
10978 ServerResponse: googleapi.ServerResponse{
10979 Header: res.Header,
10980 HTTPStatusCode: res.StatusCode,
10981 },
10982 }
10983 target := &ret
10984 b, err := gensupport.DecodeResponseBytes(target, res)
10985 if err != nil {
10986 return nil, err
10987 }
10988 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.attributes.patch", "response", internallog.HTTPResponse(res, b))
10989 return ret, nil
10990 }
10991
10992 type ProjectsLocationsCurationsCreateCall struct {
10993 s *Service
10994 parent string
10995 googlecloudapihubv1curation *GoogleCloudApihubV1Curation
10996 urlParams_ gensupport.URLParams
10997 ctx_ context.Context
10998 header_ http.Header
10999 }
11000
11001 // Create: Create a curation resource in the API hub. Once a curation resource
11002 // is created, plugin instances can start using it.
11003 //
11004 // - parent: The parent resource for the curation resource. Format:
11005 // `projects/{project}/locations/{location}`.
11006 func (r *ProjectsLocationsCurationsService) Create(parent string, googlecloudapihubv1curation *GoogleCloudApihubV1Curation) *ProjectsLocationsCurationsCreateCall {
11007 c := &ProjectsLocationsCurationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11008 c.parent = parent
11009 c.googlecloudapihubv1curation = googlecloudapihubv1curation
11010 return c
11011 }
11012
11013 // CurationId sets the optional parameter "curationId": The ID to use for the
11014 // curation resource, which will become the final component of the curations's
11015 // resource name. This field is optional. * If provided, the same will be used.
11016 // The service will throw an error if the specified ID is already used by
11017 // another curation resource in the API hub. * If not provided, a system
11018 // generated ID will be used. This value should be 4-500 characters, and valid
11019 // characters are /a-z[0-9]-_/.
11020 func (c *ProjectsLocationsCurationsCreateCall) CurationId(curationId string) *ProjectsLocationsCurationsCreateCall {
11021 c.urlParams_.Set("curationId", curationId)
11022 return c
11023 }
11024
11025 // Fields allows partial responses to be retrieved. See
11026 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11027 // details.
11028 func (c *ProjectsLocationsCurationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCurationsCreateCall {
11029 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11030 return c
11031 }
11032
11033 // Context sets the context to be used in this call's Do method.
11034 func (c *ProjectsLocationsCurationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCurationsCreateCall {
11035 c.ctx_ = ctx
11036 return c
11037 }
11038
11039 // Header returns a http.Header that can be modified by the caller to add
11040 // headers to the request.
11041 func (c *ProjectsLocationsCurationsCreateCall) Header() http.Header {
11042 if c.header_ == nil {
11043 c.header_ = make(http.Header)
11044 }
11045 return c.header_
11046 }
11047
11048 func (c *ProjectsLocationsCurationsCreateCall) doRequest(alt string) (*http.Response, error) {
11049 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11050 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1curation)
11051 if err != nil {
11052 return nil, err
11053 }
11054 c.urlParams_.Set("alt", alt)
11055 c.urlParams_.Set("prettyPrint", "false")
11056 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/curations")
11057 urls += "?" + c.urlParams_.Encode()
11058 req, err := http.NewRequest("POST", urls, body)
11059 if err != nil {
11060 return nil, err
11061 }
11062 req.Header = reqHeaders
11063 googleapi.Expand(req.URL, map[string]string{
11064 "parent": c.parent,
11065 })
11066 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11067 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11068 }
11069
11070 // Do executes the "apihub.projects.locations.curations.create" call.
11071 // Any non-2xx status code is an error. Response headers are in either
11072 // *GoogleCloudApihubV1Curation.ServerResponse.Header or (if a response was
11073 // returned at all) in error.(*googleapi.Error).Header. Use
11074 // googleapi.IsNotModified to check whether the returned error was because
11075 // http.StatusNotModified was returned.
11076 func (c *ProjectsLocationsCurationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Curation, error) {
11077 gensupport.SetOptions(c.urlParams_, opts...)
11078 res, err := c.doRequest("json")
11079 if res != nil && res.StatusCode == http.StatusNotModified {
11080 if res.Body != nil {
11081 res.Body.Close()
11082 }
11083 return nil, gensupport.WrapError(&googleapi.Error{
11084 Code: res.StatusCode,
11085 Header: res.Header,
11086 })
11087 }
11088 if err != nil {
11089 return nil, err
11090 }
11091 defer googleapi.CloseBody(res)
11092 if err := googleapi.CheckResponse(res); err != nil {
11093 return nil, gensupport.WrapError(err)
11094 }
11095 ret := &GoogleCloudApihubV1Curation{
11096 ServerResponse: googleapi.ServerResponse{
11097 Header: res.Header,
11098 HTTPStatusCode: res.StatusCode,
11099 },
11100 }
11101 target := &ret
11102 b, err := gensupport.DecodeResponseBytes(target, res)
11103 if err != nil {
11104 return nil, err
11105 }
11106 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.create", "response", internallog.HTTPResponse(res, b))
11107 return ret, nil
11108 }
11109
11110 type ProjectsLocationsCurationsDeleteCall struct {
11111 s *Service
11112 name string
11113 urlParams_ gensupport.URLParams
11114 ctx_ context.Context
11115 header_ http.Header
11116 }
11117
11118 // Delete: Delete a curation resource in the API hub. A curation can only be
11119 // deleted if it's not being used by any plugin instance.
11120 //
11121 // - name: The name of the curation resource to delete. Format:
11122 // `projects/{project}/locations/{location}/curations/{curation}`.
11123 func (r *ProjectsLocationsCurationsService) Delete(name string) *ProjectsLocationsCurationsDeleteCall {
11124 c := &ProjectsLocationsCurationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11125 c.name = name
11126 return c
11127 }
11128
11129 // Fields allows partial responses to be retrieved. See
11130 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11131 // details.
11132 func (c *ProjectsLocationsCurationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCurationsDeleteCall {
11133 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11134 return c
11135 }
11136
11137 // Context sets the context to be used in this call's Do method.
11138 func (c *ProjectsLocationsCurationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCurationsDeleteCall {
11139 c.ctx_ = ctx
11140 return c
11141 }
11142
11143 // Header returns a http.Header that can be modified by the caller to add
11144 // headers to the request.
11145 func (c *ProjectsLocationsCurationsDeleteCall) Header() http.Header {
11146 if c.header_ == nil {
11147 c.header_ = make(http.Header)
11148 }
11149 return c.header_
11150 }
11151
11152 func (c *ProjectsLocationsCurationsDeleteCall) doRequest(alt string) (*http.Response, error) {
11153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11154 c.urlParams_.Set("alt", alt)
11155 c.urlParams_.Set("prettyPrint", "false")
11156 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11157 urls += "?" + c.urlParams_.Encode()
11158 req, err := http.NewRequest("DELETE", urls, nil)
11159 if err != nil {
11160 return nil, err
11161 }
11162 req.Header = reqHeaders
11163 googleapi.Expand(req.URL, map[string]string{
11164 "name": c.name,
11165 })
11166 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.delete", "request", internallog.HTTPRequest(req, nil))
11167 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11168 }
11169
11170 // Do executes the "apihub.projects.locations.curations.delete" call.
11171 // Any non-2xx status code is an error. Response headers are in either
11172 // *Empty.ServerResponse.Header or (if a response was returned at all) in
11173 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11174 // whether the returned error was because http.StatusNotModified was returned.
11175 func (c *ProjectsLocationsCurationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11176 gensupport.SetOptions(c.urlParams_, opts...)
11177 res, err := c.doRequest("json")
11178 if res != nil && res.StatusCode == http.StatusNotModified {
11179 if res.Body != nil {
11180 res.Body.Close()
11181 }
11182 return nil, gensupport.WrapError(&googleapi.Error{
11183 Code: res.StatusCode,
11184 Header: res.Header,
11185 })
11186 }
11187 if err != nil {
11188 return nil, err
11189 }
11190 defer googleapi.CloseBody(res)
11191 if err := googleapi.CheckResponse(res); err != nil {
11192 return nil, gensupport.WrapError(err)
11193 }
11194 ret := &Empty{
11195 ServerResponse: googleapi.ServerResponse{
11196 Header: res.Header,
11197 HTTPStatusCode: res.StatusCode,
11198 },
11199 }
11200 target := &ret
11201 b, err := gensupport.DecodeResponseBytes(target, res)
11202 if err != nil {
11203 return nil, err
11204 }
11205 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.delete", "response", internallog.HTTPResponse(res, b))
11206 return ret, nil
11207 }
11208
11209 type ProjectsLocationsCurationsGetCall struct {
11210 s *Service
11211 name string
11212 urlParams_ gensupport.URLParams
11213 ifNoneMatch_ string
11214 ctx_ context.Context
11215 header_ http.Header
11216 }
11217
11218 // Get: Get curation resource details.
11219 //
11220 // - name: The name of the curation resource to retrieve. Format:
11221 // `projects/{project}/locations/{location}/curations/{curation}`.
11222 func (r *ProjectsLocationsCurationsService) Get(name string) *ProjectsLocationsCurationsGetCall {
11223 c := &ProjectsLocationsCurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11224 c.name = name
11225 return c
11226 }
11227
11228 // Fields allows partial responses to be retrieved. See
11229 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11230 // details.
11231 func (c *ProjectsLocationsCurationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCurationsGetCall {
11232 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11233 return c
11234 }
11235
11236 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11237 // object's ETag matches the given value. This is useful for getting updates
11238 // only after the object has changed since the last request.
11239 func (c *ProjectsLocationsCurationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCurationsGetCall {
11240 c.ifNoneMatch_ = entityTag
11241 return c
11242 }
11243
11244 // Context sets the context to be used in this call's Do method.
11245 func (c *ProjectsLocationsCurationsGetCall) Context(ctx context.Context) *ProjectsLocationsCurationsGetCall {
11246 c.ctx_ = ctx
11247 return c
11248 }
11249
11250 // Header returns a http.Header that can be modified by the caller to add
11251 // headers to the request.
11252 func (c *ProjectsLocationsCurationsGetCall) Header() http.Header {
11253 if c.header_ == nil {
11254 c.header_ = make(http.Header)
11255 }
11256 return c.header_
11257 }
11258
11259 func (c *ProjectsLocationsCurationsGetCall) doRequest(alt string) (*http.Response, error) {
11260 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11261 if c.ifNoneMatch_ != "" {
11262 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11263 }
11264 c.urlParams_.Set("alt", alt)
11265 c.urlParams_.Set("prettyPrint", "false")
11266 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11267 urls += "?" + c.urlParams_.Encode()
11268 req, err := http.NewRequest("GET", urls, nil)
11269 if err != nil {
11270 return nil, err
11271 }
11272 req.Header = reqHeaders
11273 googleapi.Expand(req.URL, map[string]string{
11274 "name": c.name,
11275 })
11276 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.get", "request", internallog.HTTPRequest(req, nil))
11277 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11278 }
11279
11280 // Do executes the "apihub.projects.locations.curations.get" call.
11281 // Any non-2xx status code is an error. Response headers are in either
11282 // *GoogleCloudApihubV1Curation.ServerResponse.Header or (if a response was
11283 // returned at all) in error.(*googleapi.Error).Header. Use
11284 // googleapi.IsNotModified to check whether the returned error was because
11285 // http.StatusNotModified was returned.
11286 func (c *ProjectsLocationsCurationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Curation, error) {
11287 gensupport.SetOptions(c.urlParams_, opts...)
11288 res, err := c.doRequest("json")
11289 if res != nil && res.StatusCode == http.StatusNotModified {
11290 if res.Body != nil {
11291 res.Body.Close()
11292 }
11293 return nil, gensupport.WrapError(&googleapi.Error{
11294 Code: res.StatusCode,
11295 Header: res.Header,
11296 })
11297 }
11298 if err != nil {
11299 return nil, err
11300 }
11301 defer googleapi.CloseBody(res)
11302 if err := googleapi.CheckResponse(res); err != nil {
11303 return nil, gensupport.WrapError(err)
11304 }
11305 ret := &GoogleCloudApihubV1Curation{
11306 ServerResponse: googleapi.ServerResponse{
11307 Header: res.Header,
11308 HTTPStatusCode: res.StatusCode,
11309 },
11310 }
11311 target := &ret
11312 b, err := gensupport.DecodeResponseBytes(target, res)
11313 if err != nil {
11314 return nil, err
11315 }
11316 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.get", "response", internallog.HTTPResponse(res, b))
11317 return ret, nil
11318 }
11319
11320 type ProjectsLocationsCurationsListCall struct {
11321 s *Service
11322 parent string
11323 urlParams_ gensupport.URLParams
11324 ifNoneMatch_ string
11325 ctx_ context.Context
11326 header_ http.Header
11327 }
11328
11329 // List: List curation resources in the API hub.
11330 //
11331 // - parent: The parent, which owns this collection of curation resources.
11332 // Format: `projects/{project}/locations/{location}`.
11333 func (r *ProjectsLocationsCurationsService) List(parent string) *ProjectsLocationsCurationsListCall {
11334 c := &ProjectsLocationsCurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11335 c.parent = parent
11336 return c
11337 }
11338
11339 // Filter sets the optional parameter "filter": An expression that filters the
11340 // list of curation resources. A filter expression consists of a field name, a
11341 // comparison operator, and a value for filtering. The value must be a string.
11342 // The comparison operator must be one of: `<`, `>`, `:` or `=`. Filters are
11343 // case insensitive. The following fields in the `curation resource` are
11344 // eligible for filtering: * `create_time` - The time at which the curation was
11345 // created. The value should be in the
11346 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
11347 // operators: `>` and `<`. * `display_name` - The display name of the curation.
11348 // Allowed comparison operators: `=`. * `state` - The state of the curation.
11349 // Allowed comparison operators: `=`. Expressions are combined with either
11350 // `AND` logic operator or `OR` logical operator but not both of them together
11351 // i.e. only one of the `AND` or `OR` operator can be used throughout the
11352 // filter string and both the operators cannot be used together. No other
11353 // logical operators are supported. At most three filter fields are allowed in
11354 // the filter string and if provided more than that then `INVALID_ARGUMENT`
11355 // error is returned by the API. Here are a few examples: * `create_time <
11356 // \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The
11357 // curation resource was created before _2021-08-15 14:50:00 UTC_ and after
11358 // _2021-08-10 12:00:00 UTC_.
11359 func (c *ProjectsLocationsCurationsListCall) Filter(filter string) *ProjectsLocationsCurationsListCall {
11360 c.urlParams_.Set("filter", filter)
11361 return c
11362 }
11363
11364 // PageSize sets the optional parameter "pageSize": The maximum number of
11365 // curation resources to return. The service may return fewer than this value.
11366 // If unspecified, at most 50 curations will be returned. The maximum value is
11367 // 1000; values above 1000 will be coerced to 1000.
11368 func (c *ProjectsLocationsCurationsListCall) PageSize(pageSize int64) *ProjectsLocationsCurationsListCall {
11369 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11370 return c
11371 }
11372
11373 // PageToken sets the optional parameter "pageToken": A page token, received
11374 // from a previous `ListCurations` call. Provide this to retrieve the
11375 // subsequent page. When paginating, all other parameters (except page_size)
11376 // provided to `ListCurations` must match the call that provided the page
11377 // token.
11378 func (c *ProjectsLocationsCurationsListCall) PageToken(pageToken string) *ProjectsLocationsCurationsListCall {
11379 c.urlParams_.Set("pageToken", pageToken)
11380 return c
11381 }
11382
11383 // Fields allows partial responses to be retrieved. See
11384 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11385 // details.
11386 func (c *ProjectsLocationsCurationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCurationsListCall {
11387 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11388 return c
11389 }
11390
11391 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11392 // object's ETag matches the given value. This is useful for getting updates
11393 // only after the object has changed since the last request.
11394 func (c *ProjectsLocationsCurationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCurationsListCall {
11395 c.ifNoneMatch_ = entityTag
11396 return c
11397 }
11398
11399 // Context sets the context to be used in this call's Do method.
11400 func (c *ProjectsLocationsCurationsListCall) Context(ctx context.Context) *ProjectsLocationsCurationsListCall {
11401 c.ctx_ = ctx
11402 return c
11403 }
11404
11405 // Header returns a http.Header that can be modified by the caller to add
11406 // headers to the request.
11407 func (c *ProjectsLocationsCurationsListCall) Header() http.Header {
11408 if c.header_ == nil {
11409 c.header_ = make(http.Header)
11410 }
11411 return c.header_
11412 }
11413
11414 func (c *ProjectsLocationsCurationsListCall) doRequest(alt string) (*http.Response, error) {
11415 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11416 if c.ifNoneMatch_ != "" {
11417 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11418 }
11419 c.urlParams_.Set("alt", alt)
11420 c.urlParams_.Set("prettyPrint", "false")
11421 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/curations")
11422 urls += "?" + c.urlParams_.Encode()
11423 req, err := http.NewRequest("GET", urls, nil)
11424 if err != nil {
11425 return nil, err
11426 }
11427 req.Header = reqHeaders
11428 googleapi.Expand(req.URL, map[string]string{
11429 "parent": c.parent,
11430 })
11431 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.list", "request", internallog.HTTPRequest(req, nil))
11432 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11433 }
11434
11435 // Do executes the "apihub.projects.locations.curations.list" call.
11436 // Any non-2xx status code is an error. Response headers are in either
11437 // *GoogleCloudApihubV1ListCurationsResponse.ServerResponse.Header or (if a
11438 // response was returned at all) in error.(*googleapi.Error).Header. Use
11439 // googleapi.IsNotModified to check whether the returned error was because
11440 // http.StatusNotModified was returned.
11441 func (c *ProjectsLocationsCurationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListCurationsResponse, error) {
11442 gensupport.SetOptions(c.urlParams_, opts...)
11443 res, err := c.doRequest("json")
11444 if res != nil && res.StatusCode == http.StatusNotModified {
11445 if res.Body != nil {
11446 res.Body.Close()
11447 }
11448 return nil, gensupport.WrapError(&googleapi.Error{
11449 Code: res.StatusCode,
11450 Header: res.Header,
11451 })
11452 }
11453 if err != nil {
11454 return nil, err
11455 }
11456 defer googleapi.CloseBody(res)
11457 if err := googleapi.CheckResponse(res); err != nil {
11458 return nil, gensupport.WrapError(err)
11459 }
11460 ret := &GoogleCloudApihubV1ListCurationsResponse{
11461 ServerResponse: googleapi.ServerResponse{
11462 Header: res.Header,
11463 HTTPStatusCode: res.StatusCode,
11464 },
11465 }
11466 target := &ret
11467 b, err := gensupport.DecodeResponseBytes(target, res)
11468 if err != nil {
11469 return nil, err
11470 }
11471 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.list", "response", internallog.HTTPResponse(res, b))
11472 return ret, nil
11473 }
11474
11475 // Pages invokes f for each page of results.
11476 // A non-nil error returned from f will halt the iteration.
11477 // The provided context supersedes any context provided to the Context method.
11478 func (c *ProjectsLocationsCurationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListCurationsResponse) error) error {
11479 c.ctx_ = ctx
11480 defer c.PageToken(c.urlParams_.Get("pageToken"))
11481 for {
11482 x, err := c.Do()
11483 if err != nil {
11484 return err
11485 }
11486 if err := f(x); err != nil {
11487 return err
11488 }
11489 if x.NextPageToken == "" {
11490 return nil
11491 }
11492 c.PageToken(x.NextPageToken)
11493 }
11494 }
11495
11496 type ProjectsLocationsCurationsPatchCall struct {
11497 s *Service
11498 name string
11499 googlecloudapihubv1curation *GoogleCloudApihubV1Curation
11500 urlParams_ gensupport.URLParams
11501 ctx_ context.Context
11502 header_ http.Header
11503 }
11504
11505 // Patch: Update a curation resource in the API hub. The following fields in
11506 // the curation can be updated: * display_name * description The update_mask
11507 // should be used to specify the fields being updated.
11508 //
11509 // - name: Identifier. The name of the curation. Format:
11510 // `projects/{project}/locations/{location}/curations/{curation}`.
11511 func (r *ProjectsLocationsCurationsService) Patch(name string, googlecloudapihubv1curation *GoogleCloudApihubV1Curation) *ProjectsLocationsCurationsPatchCall {
11512 c := &ProjectsLocationsCurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11513 c.name = name
11514 c.googlecloudapihubv1curation = googlecloudapihubv1curation
11515 return c
11516 }
11517
11518 // UpdateMask sets the optional parameter "updateMask": The list of fields to
11519 // update.
11520 func (c *ProjectsLocationsCurationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCurationsPatchCall {
11521 c.urlParams_.Set("updateMask", updateMask)
11522 return c
11523 }
11524
11525 // Fields allows partial responses to be retrieved. See
11526 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11527 // details.
11528 func (c *ProjectsLocationsCurationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCurationsPatchCall {
11529 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11530 return c
11531 }
11532
11533 // Context sets the context to be used in this call's Do method.
11534 func (c *ProjectsLocationsCurationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCurationsPatchCall {
11535 c.ctx_ = ctx
11536 return c
11537 }
11538
11539 // Header returns a http.Header that can be modified by the caller to add
11540 // headers to the request.
11541 func (c *ProjectsLocationsCurationsPatchCall) Header() http.Header {
11542 if c.header_ == nil {
11543 c.header_ = make(http.Header)
11544 }
11545 return c.header_
11546 }
11547
11548 func (c *ProjectsLocationsCurationsPatchCall) doRequest(alt string) (*http.Response, error) {
11549 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11550 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1curation)
11551 if err != nil {
11552 return nil, err
11553 }
11554 c.urlParams_.Set("alt", alt)
11555 c.urlParams_.Set("prettyPrint", "false")
11556 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11557 urls += "?" + c.urlParams_.Encode()
11558 req, err := http.NewRequest("PATCH", urls, body)
11559 if err != nil {
11560 return nil, err
11561 }
11562 req.Header = reqHeaders
11563 googleapi.Expand(req.URL, map[string]string{
11564 "name": c.name,
11565 })
11566 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
11567 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11568 }
11569
11570 // Do executes the "apihub.projects.locations.curations.patch" call.
11571 // Any non-2xx status code is an error. Response headers are in either
11572 // *GoogleCloudApihubV1Curation.ServerResponse.Header or (if a response was
11573 // returned at all) in error.(*googleapi.Error).Header. Use
11574 // googleapi.IsNotModified to check whether the returned error was because
11575 // http.StatusNotModified was returned.
11576 func (c *ProjectsLocationsCurationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Curation, error) {
11577 gensupport.SetOptions(c.urlParams_, opts...)
11578 res, err := c.doRequest("json")
11579 if res != nil && res.StatusCode == http.StatusNotModified {
11580 if res.Body != nil {
11581 res.Body.Close()
11582 }
11583 return nil, gensupport.WrapError(&googleapi.Error{
11584 Code: res.StatusCode,
11585 Header: res.Header,
11586 })
11587 }
11588 if err != nil {
11589 return nil, err
11590 }
11591 defer googleapi.CloseBody(res)
11592 if err := googleapi.CheckResponse(res); err != nil {
11593 return nil, gensupport.WrapError(err)
11594 }
11595 ret := &GoogleCloudApihubV1Curation{
11596 ServerResponse: googleapi.ServerResponse{
11597 Header: res.Header,
11598 HTTPStatusCode: res.StatusCode,
11599 },
11600 }
11601 target := &ret
11602 b, err := gensupport.DecodeResponseBytes(target, res)
11603 if err != nil {
11604 return nil, err
11605 }
11606 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.curations.patch", "response", internallog.HTTPResponse(res, b))
11607 return ret, nil
11608 }
11609
11610 type ProjectsLocationsDependenciesCreateCall struct {
11611 s *Service
11612 parent string
11613 googlecloudapihubv1dependency *GoogleCloudApihubV1Dependency
11614 urlParams_ gensupport.URLParams
11615 ctx_ context.Context
11616 header_ http.Header
11617 }
11618
11619 // Create: Create a dependency between two entities in the API hub.
11620 //
11621 // - parent: The parent resource for the dependency resource. Format:
11622 // `projects/{project}/locations/{location}`.
11623 func (r *ProjectsLocationsDependenciesService) Create(parent string, googlecloudapihubv1dependency *GoogleCloudApihubV1Dependency) *ProjectsLocationsDependenciesCreateCall {
11624 c := &ProjectsLocationsDependenciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11625 c.parent = parent
11626 c.googlecloudapihubv1dependency = googlecloudapihubv1dependency
11627 return c
11628 }
11629
11630 // DependencyId sets the optional parameter "dependencyId": The ID to use for
11631 // the dependency resource, which will become the final component of the
11632 // dependency's resource name. This field is optional. * If provided, the same
11633 // will be used. The service will throw an error if duplicate id is provided by
11634 // the client. * If not provided, a system generated id will be used. This
11635 // value should be 4-500 characters, and valid characters are `a-z[0-9]-_`.
11636 func (c *ProjectsLocationsDependenciesCreateCall) DependencyId(dependencyId string) *ProjectsLocationsDependenciesCreateCall {
11637 c.urlParams_.Set("dependencyId", dependencyId)
11638 return c
11639 }
11640
11641 // Fields allows partial responses to be retrieved. See
11642 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11643 // details.
11644 func (c *ProjectsLocationsDependenciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDependenciesCreateCall {
11645 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11646 return c
11647 }
11648
11649 // Context sets the context to be used in this call's Do method.
11650 func (c *ProjectsLocationsDependenciesCreateCall) Context(ctx context.Context) *ProjectsLocationsDependenciesCreateCall {
11651 c.ctx_ = ctx
11652 return c
11653 }
11654
11655 // Header returns a http.Header that can be modified by the caller to add
11656 // headers to the request.
11657 func (c *ProjectsLocationsDependenciesCreateCall) Header() http.Header {
11658 if c.header_ == nil {
11659 c.header_ = make(http.Header)
11660 }
11661 return c.header_
11662 }
11663
11664 func (c *ProjectsLocationsDependenciesCreateCall) doRequest(alt string) (*http.Response, error) {
11665 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11666 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1dependency)
11667 if err != nil {
11668 return nil, err
11669 }
11670 c.urlParams_.Set("alt", alt)
11671 c.urlParams_.Set("prettyPrint", "false")
11672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dependencies")
11673 urls += "?" + c.urlParams_.Encode()
11674 req, err := http.NewRequest("POST", urls, body)
11675 if err != nil {
11676 return nil, err
11677 }
11678 req.Header = reqHeaders
11679 googleapi.Expand(req.URL, map[string]string{
11680 "parent": c.parent,
11681 })
11682 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11683 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11684 }
11685
11686 // Do executes the "apihub.projects.locations.dependencies.create" call.
11687 // Any non-2xx status code is an error. Response headers are in either
11688 // *GoogleCloudApihubV1Dependency.ServerResponse.Header or (if a response was
11689 // returned at all) in error.(*googleapi.Error).Header. Use
11690 // googleapi.IsNotModified to check whether the returned error was because
11691 // http.StatusNotModified was returned.
11692 func (c *ProjectsLocationsDependenciesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Dependency, error) {
11693 gensupport.SetOptions(c.urlParams_, opts...)
11694 res, err := c.doRequest("json")
11695 if res != nil && res.StatusCode == http.StatusNotModified {
11696 if res.Body != nil {
11697 res.Body.Close()
11698 }
11699 return nil, gensupport.WrapError(&googleapi.Error{
11700 Code: res.StatusCode,
11701 Header: res.Header,
11702 })
11703 }
11704 if err != nil {
11705 return nil, err
11706 }
11707 defer googleapi.CloseBody(res)
11708 if err := googleapi.CheckResponse(res); err != nil {
11709 return nil, gensupport.WrapError(err)
11710 }
11711 ret := &GoogleCloudApihubV1Dependency{
11712 ServerResponse: googleapi.ServerResponse{
11713 Header: res.Header,
11714 HTTPStatusCode: res.StatusCode,
11715 },
11716 }
11717 target := &ret
11718 b, err := gensupport.DecodeResponseBytes(target, res)
11719 if err != nil {
11720 return nil, err
11721 }
11722 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.create", "response", internallog.HTTPResponse(res, b))
11723 return ret, nil
11724 }
11725
11726 type ProjectsLocationsDependenciesDeleteCall struct {
11727 s *Service
11728 name string
11729 urlParams_ gensupport.URLParams
11730 ctx_ context.Context
11731 header_ http.Header
11732 }
11733
11734 // Delete: Delete the dependency resource.
11735 //
11736 // - name: The name of the dependency resource to delete. Format:
11737 // `projects/{project}/locations/{location}/dependencies/{dependency}`.
11738 func (r *ProjectsLocationsDependenciesService) Delete(name string) *ProjectsLocationsDependenciesDeleteCall {
11739 c := &ProjectsLocationsDependenciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11740 c.name = name
11741 return c
11742 }
11743
11744 // Fields allows partial responses to be retrieved. See
11745 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11746 // details.
11747 func (c *ProjectsLocationsDependenciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDependenciesDeleteCall {
11748 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11749 return c
11750 }
11751
11752 // Context sets the context to be used in this call's Do method.
11753 func (c *ProjectsLocationsDependenciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDependenciesDeleteCall {
11754 c.ctx_ = ctx
11755 return c
11756 }
11757
11758 // Header returns a http.Header that can be modified by the caller to add
11759 // headers to the request.
11760 func (c *ProjectsLocationsDependenciesDeleteCall) Header() http.Header {
11761 if c.header_ == nil {
11762 c.header_ = make(http.Header)
11763 }
11764 return c.header_
11765 }
11766
11767 func (c *ProjectsLocationsDependenciesDeleteCall) doRequest(alt string) (*http.Response, error) {
11768 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11769 c.urlParams_.Set("alt", alt)
11770 c.urlParams_.Set("prettyPrint", "false")
11771 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11772 urls += "?" + c.urlParams_.Encode()
11773 req, err := http.NewRequest("DELETE", urls, nil)
11774 if err != nil {
11775 return nil, err
11776 }
11777 req.Header = reqHeaders
11778 googleapi.Expand(req.URL, map[string]string{
11779 "name": c.name,
11780 })
11781 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.delete", "request", internallog.HTTPRequest(req, nil))
11782 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11783 }
11784
11785 // Do executes the "apihub.projects.locations.dependencies.delete" call.
11786 // Any non-2xx status code is an error. Response headers are in either
11787 // *Empty.ServerResponse.Header or (if a response was returned at all) in
11788 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11789 // whether the returned error was because http.StatusNotModified was returned.
11790 func (c *ProjectsLocationsDependenciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11791 gensupport.SetOptions(c.urlParams_, opts...)
11792 res, err := c.doRequest("json")
11793 if res != nil && res.StatusCode == http.StatusNotModified {
11794 if res.Body != nil {
11795 res.Body.Close()
11796 }
11797 return nil, gensupport.WrapError(&googleapi.Error{
11798 Code: res.StatusCode,
11799 Header: res.Header,
11800 })
11801 }
11802 if err != nil {
11803 return nil, err
11804 }
11805 defer googleapi.CloseBody(res)
11806 if err := googleapi.CheckResponse(res); err != nil {
11807 return nil, gensupport.WrapError(err)
11808 }
11809 ret := &Empty{
11810 ServerResponse: googleapi.ServerResponse{
11811 Header: res.Header,
11812 HTTPStatusCode: res.StatusCode,
11813 },
11814 }
11815 target := &ret
11816 b, err := gensupport.DecodeResponseBytes(target, res)
11817 if err != nil {
11818 return nil, err
11819 }
11820 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.delete", "response", internallog.HTTPResponse(res, b))
11821 return ret, nil
11822 }
11823
11824 type ProjectsLocationsDependenciesGetCall struct {
11825 s *Service
11826 name string
11827 urlParams_ gensupport.URLParams
11828 ifNoneMatch_ string
11829 ctx_ context.Context
11830 header_ http.Header
11831 }
11832
11833 // Get: Get details about a dependency resource in the API hub.
11834 //
11835 // - name: The name of the dependency resource to retrieve. Format:
11836 // `projects/{project}/locations/{location}/dependencies/{dependency}`.
11837 func (r *ProjectsLocationsDependenciesService) Get(name string) *ProjectsLocationsDependenciesGetCall {
11838 c := &ProjectsLocationsDependenciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11839 c.name = name
11840 return c
11841 }
11842
11843 // Fields allows partial responses to be retrieved. See
11844 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11845 // details.
11846 func (c *ProjectsLocationsDependenciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDependenciesGetCall {
11847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11848 return c
11849 }
11850
11851 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11852 // object's ETag matches the given value. This is useful for getting updates
11853 // only after the object has changed since the last request.
11854 func (c *ProjectsLocationsDependenciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDependenciesGetCall {
11855 c.ifNoneMatch_ = entityTag
11856 return c
11857 }
11858
11859 // Context sets the context to be used in this call's Do method.
11860 func (c *ProjectsLocationsDependenciesGetCall) Context(ctx context.Context) *ProjectsLocationsDependenciesGetCall {
11861 c.ctx_ = ctx
11862 return c
11863 }
11864
11865 // Header returns a http.Header that can be modified by the caller to add
11866 // headers to the request.
11867 func (c *ProjectsLocationsDependenciesGetCall) Header() http.Header {
11868 if c.header_ == nil {
11869 c.header_ = make(http.Header)
11870 }
11871 return c.header_
11872 }
11873
11874 func (c *ProjectsLocationsDependenciesGetCall) doRequest(alt string) (*http.Response, error) {
11875 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11876 if c.ifNoneMatch_ != "" {
11877 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11878 }
11879 c.urlParams_.Set("alt", alt)
11880 c.urlParams_.Set("prettyPrint", "false")
11881 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11882 urls += "?" + c.urlParams_.Encode()
11883 req, err := http.NewRequest("GET", urls, nil)
11884 if err != nil {
11885 return nil, err
11886 }
11887 req.Header = reqHeaders
11888 googleapi.Expand(req.URL, map[string]string{
11889 "name": c.name,
11890 })
11891 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.get", "request", internallog.HTTPRequest(req, nil))
11892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11893 }
11894
11895 // Do executes the "apihub.projects.locations.dependencies.get" call.
11896 // Any non-2xx status code is an error. Response headers are in either
11897 // *GoogleCloudApihubV1Dependency.ServerResponse.Header or (if a response was
11898 // returned at all) in error.(*googleapi.Error).Header. Use
11899 // googleapi.IsNotModified to check whether the returned error was because
11900 // http.StatusNotModified was returned.
11901 func (c *ProjectsLocationsDependenciesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Dependency, error) {
11902 gensupport.SetOptions(c.urlParams_, opts...)
11903 res, err := c.doRequest("json")
11904 if res != nil && res.StatusCode == http.StatusNotModified {
11905 if res.Body != nil {
11906 res.Body.Close()
11907 }
11908 return nil, gensupport.WrapError(&googleapi.Error{
11909 Code: res.StatusCode,
11910 Header: res.Header,
11911 })
11912 }
11913 if err != nil {
11914 return nil, err
11915 }
11916 defer googleapi.CloseBody(res)
11917 if err := googleapi.CheckResponse(res); err != nil {
11918 return nil, gensupport.WrapError(err)
11919 }
11920 ret := &GoogleCloudApihubV1Dependency{
11921 ServerResponse: googleapi.ServerResponse{
11922 Header: res.Header,
11923 HTTPStatusCode: res.StatusCode,
11924 },
11925 }
11926 target := &ret
11927 b, err := gensupport.DecodeResponseBytes(target, res)
11928 if err != nil {
11929 return nil, err
11930 }
11931 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.get", "response", internallog.HTTPResponse(res, b))
11932 return ret, nil
11933 }
11934
11935 type ProjectsLocationsDependenciesListCall struct {
11936 s *Service
11937 parent string
11938 urlParams_ gensupport.URLParams
11939 ifNoneMatch_ string
11940 ctx_ context.Context
11941 header_ http.Header
11942 }
11943
11944 // List: List dependencies based on the provided filter and pagination
11945 // parameters.
11946 //
11947 // - parent: The parent which owns this collection of dependency resources.
11948 // Format: `projects/{project}/locations/{location}`.
11949 func (r *ProjectsLocationsDependenciesService) List(parent string) *ProjectsLocationsDependenciesListCall {
11950 c := &ProjectsLocationsDependenciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11951 c.parent = parent
11952 return c
11953 }
11954
11955 // Filter sets the optional parameter "filter": An expression that filters the
11956 // list of Dependencies. A filter expression consists of a field name, a
11957 // comparison operator, and a value for filtering. The value must be a string.
11958 // Allowed comparison operator is `=`. Filters are not case sensitive. The
11959 // following fields in the `Dependency` are eligible for filtering: *
11960 // `consumer.operation_resource_name` - The operation resource name for the
11961 // consumer entity involved in a dependency. Allowed comparison operators: `=`.
11962 // * `consumer.external_api_resource_name` - The external api resource name for
11963 // the consumer entity involved in a dependency. Allowed comparison operators:
11964 // `=`. * `supplier.operation_resource_name` - The operation resource name for
11965 // the supplier entity involved in a dependency. Allowed comparison operators:
11966 // `=`. * `supplier.external_api_resource_name` - The external api resource
11967 // name for the supplier entity involved in a dependency. Allowed comparison
11968 // operators: `=`. Expressions are combined with either `AND` logic operator or
11969 // `OR` logical operator but not both of them together i.e. only one of the
11970 // `AND` or `OR` operator can be used throughout the filter string and both the
11971 // operators cannot be used together. No other logical operators are supported.
11972 // At most three filter fields are allowed in the filter string and if provided
11973 // more than that then `INVALID_ARGUMENT` error is returned by the API. For
11974 // example, `consumer.operation_resource_name =
11975 // \"projects/p1/locations/global/apis/a1/versions/v1/operations/o1\" OR
11976 // supplier.operation_resource_name =
11977 // \"projects/p1/locations/global/apis/a1/versions/v1/operations/o1\" - The
11978 // dependencies with either consumer or supplier operation resource name as
11979 // _projects/p1/locations/global/apis/a1/versions/v1/operations/o1_.
11980 func (c *ProjectsLocationsDependenciesListCall) Filter(filter string) *ProjectsLocationsDependenciesListCall {
11981 c.urlParams_.Set("filter", filter)
11982 return c
11983 }
11984
11985 // PageSize sets the optional parameter "pageSize": The maximum number of
11986 // dependency resources to return. The service may return fewer than this
11987 // value. If unspecified, at most 50 dependencies will be returned. The maximum
11988 // value is 1000; values above 1000 will be coerced to 1000.
11989 func (c *ProjectsLocationsDependenciesListCall) PageSize(pageSize int64) *ProjectsLocationsDependenciesListCall {
11990 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11991 return c
11992 }
11993
11994 // PageToken sets the optional parameter "pageToken": A page token, received
11995 // from a previous `ListDependencies` call. Provide this to retrieve the
11996 // subsequent page. When paginating, all other parameters provided to
11997 // `ListDependencies` must match the call that provided the page token.
11998 func (c *ProjectsLocationsDependenciesListCall) PageToken(pageToken string) *ProjectsLocationsDependenciesListCall {
11999 c.urlParams_.Set("pageToken", pageToken)
12000 return c
12001 }
12002
12003 // Fields allows partial responses to be retrieved. See
12004 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12005 // details.
12006 func (c *ProjectsLocationsDependenciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDependenciesListCall {
12007 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12008 return c
12009 }
12010
12011 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12012 // object's ETag matches the given value. This is useful for getting updates
12013 // only after the object has changed since the last request.
12014 func (c *ProjectsLocationsDependenciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDependenciesListCall {
12015 c.ifNoneMatch_ = entityTag
12016 return c
12017 }
12018
12019 // Context sets the context to be used in this call's Do method.
12020 func (c *ProjectsLocationsDependenciesListCall) Context(ctx context.Context) *ProjectsLocationsDependenciesListCall {
12021 c.ctx_ = ctx
12022 return c
12023 }
12024
12025 // Header returns a http.Header that can be modified by the caller to add
12026 // headers to the request.
12027 func (c *ProjectsLocationsDependenciesListCall) Header() http.Header {
12028 if c.header_ == nil {
12029 c.header_ = make(http.Header)
12030 }
12031 return c.header_
12032 }
12033
12034 func (c *ProjectsLocationsDependenciesListCall) doRequest(alt string) (*http.Response, error) {
12035 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12036 if c.ifNoneMatch_ != "" {
12037 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12038 }
12039 c.urlParams_.Set("alt", alt)
12040 c.urlParams_.Set("prettyPrint", "false")
12041 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dependencies")
12042 urls += "?" + c.urlParams_.Encode()
12043 req, err := http.NewRequest("GET", urls, nil)
12044 if err != nil {
12045 return nil, err
12046 }
12047 req.Header = reqHeaders
12048 googleapi.Expand(req.URL, map[string]string{
12049 "parent": c.parent,
12050 })
12051 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.list", "request", internallog.HTTPRequest(req, nil))
12052 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12053 }
12054
12055 // Do executes the "apihub.projects.locations.dependencies.list" call.
12056 // Any non-2xx status code is an error. Response headers are in either
12057 // *GoogleCloudApihubV1ListDependenciesResponse.ServerResponse.Header or (if a
12058 // response was returned at all) in error.(*googleapi.Error).Header. Use
12059 // googleapi.IsNotModified to check whether the returned error was because
12060 // http.StatusNotModified was returned.
12061 func (c *ProjectsLocationsDependenciesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListDependenciesResponse, error) {
12062 gensupport.SetOptions(c.urlParams_, opts...)
12063 res, err := c.doRequest("json")
12064 if res != nil && res.StatusCode == http.StatusNotModified {
12065 if res.Body != nil {
12066 res.Body.Close()
12067 }
12068 return nil, gensupport.WrapError(&googleapi.Error{
12069 Code: res.StatusCode,
12070 Header: res.Header,
12071 })
12072 }
12073 if err != nil {
12074 return nil, err
12075 }
12076 defer googleapi.CloseBody(res)
12077 if err := googleapi.CheckResponse(res); err != nil {
12078 return nil, gensupport.WrapError(err)
12079 }
12080 ret := &GoogleCloudApihubV1ListDependenciesResponse{
12081 ServerResponse: googleapi.ServerResponse{
12082 Header: res.Header,
12083 HTTPStatusCode: res.StatusCode,
12084 },
12085 }
12086 target := &ret
12087 b, err := gensupport.DecodeResponseBytes(target, res)
12088 if err != nil {
12089 return nil, err
12090 }
12091 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.list", "response", internallog.HTTPResponse(res, b))
12092 return ret, nil
12093 }
12094
12095 // Pages invokes f for each page of results.
12096 // A non-nil error returned from f will halt the iteration.
12097 // The provided context supersedes any context provided to the Context method.
12098 func (c *ProjectsLocationsDependenciesListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListDependenciesResponse) error) error {
12099 c.ctx_ = ctx
12100 defer c.PageToken(c.urlParams_.Get("pageToken"))
12101 for {
12102 x, err := c.Do()
12103 if err != nil {
12104 return err
12105 }
12106 if err := f(x); err != nil {
12107 return err
12108 }
12109 if x.NextPageToken == "" {
12110 return nil
12111 }
12112 c.PageToken(x.NextPageToken)
12113 }
12114 }
12115
12116 type ProjectsLocationsDependenciesPatchCall struct {
12117 s *Service
12118 name string
12119 googlecloudapihubv1dependency *GoogleCloudApihubV1Dependency
12120 urlParams_ gensupport.URLParams
12121 ctx_ context.Context
12122 header_ http.Header
12123 }
12124
12125 // Patch: Update a dependency based on the update_mask provided in the request.
12126 // The following fields in the dependency can be updated: * description
12127 //
12128 // - name: Identifier. The name of the dependency in the API Hub. Format:
12129 // `projects/{project}/locations/{location}/dependencies/{dependency}`.
12130 func (r *ProjectsLocationsDependenciesService) Patch(name string, googlecloudapihubv1dependency *GoogleCloudApihubV1Dependency) *ProjectsLocationsDependenciesPatchCall {
12131 c := &ProjectsLocationsDependenciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12132 c.name = name
12133 c.googlecloudapihubv1dependency = googlecloudapihubv1dependency
12134 return c
12135 }
12136
12137 // UpdateMask sets the optional parameter "updateMask": Required. The list of
12138 // fields to update.
12139 func (c *ProjectsLocationsDependenciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDependenciesPatchCall {
12140 c.urlParams_.Set("updateMask", updateMask)
12141 return c
12142 }
12143
12144 // Fields allows partial responses to be retrieved. See
12145 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12146 // details.
12147 func (c *ProjectsLocationsDependenciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDependenciesPatchCall {
12148 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12149 return c
12150 }
12151
12152 // Context sets the context to be used in this call's Do method.
12153 func (c *ProjectsLocationsDependenciesPatchCall) Context(ctx context.Context) *ProjectsLocationsDependenciesPatchCall {
12154 c.ctx_ = ctx
12155 return c
12156 }
12157
12158 // Header returns a http.Header that can be modified by the caller to add
12159 // headers to the request.
12160 func (c *ProjectsLocationsDependenciesPatchCall) Header() http.Header {
12161 if c.header_ == nil {
12162 c.header_ = make(http.Header)
12163 }
12164 return c.header_
12165 }
12166
12167 func (c *ProjectsLocationsDependenciesPatchCall) doRequest(alt string) (*http.Response, error) {
12168 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12169 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1dependency)
12170 if err != nil {
12171 return nil, err
12172 }
12173 c.urlParams_.Set("alt", alt)
12174 c.urlParams_.Set("prettyPrint", "false")
12175 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12176 urls += "?" + c.urlParams_.Encode()
12177 req, err := http.NewRequest("PATCH", urls, body)
12178 if err != nil {
12179 return nil, err
12180 }
12181 req.Header = reqHeaders
12182 googleapi.Expand(req.URL, map[string]string{
12183 "name": c.name,
12184 })
12185 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12186 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12187 }
12188
12189 // Do executes the "apihub.projects.locations.dependencies.patch" call.
12190 // Any non-2xx status code is an error. Response headers are in either
12191 // *GoogleCloudApihubV1Dependency.ServerResponse.Header or (if a response was
12192 // returned at all) in error.(*googleapi.Error).Header. Use
12193 // googleapi.IsNotModified to check whether the returned error was because
12194 // http.StatusNotModified was returned.
12195 func (c *ProjectsLocationsDependenciesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Dependency, error) {
12196 gensupport.SetOptions(c.urlParams_, opts...)
12197 res, err := c.doRequest("json")
12198 if res != nil && res.StatusCode == http.StatusNotModified {
12199 if res.Body != nil {
12200 res.Body.Close()
12201 }
12202 return nil, gensupport.WrapError(&googleapi.Error{
12203 Code: res.StatusCode,
12204 Header: res.Header,
12205 })
12206 }
12207 if err != nil {
12208 return nil, err
12209 }
12210 defer googleapi.CloseBody(res)
12211 if err := googleapi.CheckResponse(res); err != nil {
12212 return nil, gensupport.WrapError(err)
12213 }
12214 ret := &GoogleCloudApihubV1Dependency{
12215 ServerResponse: googleapi.ServerResponse{
12216 Header: res.Header,
12217 HTTPStatusCode: res.StatusCode,
12218 },
12219 }
12220 target := &ret
12221 b, err := gensupport.DecodeResponseBytes(target, res)
12222 if err != nil {
12223 return nil, err
12224 }
12225 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.dependencies.patch", "response", internallog.HTTPResponse(res, b))
12226 return ret, nil
12227 }
12228
12229 type ProjectsLocationsDeploymentsCreateCall struct {
12230 s *Service
12231 parent string
12232 googlecloudapihubv1deployment *GoogleCloudApihubV1Deployment
12233 urlParams_ gensupport.URLParams
12234 ctx_ context.Context
12235 header_ http.Header
12236 }
12237
12238 // Create: Create a deployment resource in the API hub. Once a deployment
12239 // resource is created, it can be associated with API versions.
12240 //
12241 // - parent: The parent resource for the deployment resource. Format:
12242 // `projects/{project}/locations/{location}`.
12243 func (r *ProjectsLocationsDeploymentsService) Create(parent string, googlecloudapihubv1deployment *GoogleCloudApihubV1Deployment) *ProjectsLocationsDeploymentsCreateCall {
12244 c := &ProjectsLocationsDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12245 c.parent = parent
12246 c.googlecloudapihubv1deployment = googlecloudapihubv1deployment
12247 return c
12248 }
12249
12250 // DeploymentId sets the optional parameter "deploymentId": The ID to use for
12251 // the deployment resource, which will become the final component of the
12252 // deployment's resource name. This field is optional. * If provided, the same
12253 // will be used. The service will throw an error if the specified id is already
12254 // used by another deployment resource in the API hub. * If not provided, a
12255 // system generated id will be used. This value should be 4-500 characters, and
12256 // valid characters are /a-z[0-9]-_/.
12257 func (c *ProjectsLocationsDeploymentsCreateCall) DeploymentId(deploymentId string) *ProjectsLocationsDeploymentsCreateCall {
12258 c.urlParams_.Set("deploymentId", deploymentId)
12259 return c
12260 }
12261
12262 // Fields allows partial responses to be retrieved. See
12263 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12264 // details.
12265 func (c *ProjectsLocationsDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsCreateCall {
12266 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12267 return c
12268 }
12269
12270 // Context sets the context to be used in this call's Do method.
12271 func (c *ProjectsLocationsDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsCreateCall {
12272 c.ctx_ = ctx
12273 return c
12274 }
12275
12276 // Header returns a http.Header that can be modified by the caller to add
12277 // headers to the request.
12278 func (c *ProjectsLocationsDeploymentsCreateCall) Header() http.Header {
12279 if c.header_ == nil {
12280 c.header_ = make(http.Header)
12281 }
12282 return c.header_
12283 }
12284
12285 func (c *ProjectsLocationsDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
12286 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12287 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1deployment)
12288 if err != nil {
12289 return nil, err
12290 }
12291 c.urlParams_.Set("alt", alt)
12292 c.urlParams_.Set("prettyPrint", "false")
12293 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
12294 urls += "?" + c.urlParams_.Encode()
12295 req, err := http.NewRequest("POST", urls, body)
12296 if err != nil {
12297 return nil, err
12298 }
12299 req.Header = reqHeaders
12300 googleapi.Expand(req.URL, map[string]string{
12301 "parent": c.parent,
12302 })
12303 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.create", "request", internallog.HTTPRequest(req, body.Bytes()))
12304 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12305 }
12306
12307 // Do executes the "apihub.projects.locations.deployments.create" call.
12308 // Any non-2xx status code is an error. Response headers are in either
12309 // *GoogleCloudApihubV1Deployment.ServerResponse.Header or (if a response was
12310 // returned at all) in error.(*googleapi.Error).Header. Use
12311 // googleapi.IsNotModified to check whether the returned error was because
12312 // http.StatusNotModified was returned.
12313 func (c *ProjectsLocationsDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Deployment, error) {
12314 gensupport.SetOptions(c.urlParams_, opts...)
12315 res, err := c.doRequest("json")
12316 if res != nil && res.StatusCode == http.StatusNotModified {
12317 if res.Body != nil {
12318 res.Body.Close()
12319 }
12320 return nil, gensupport.WrapError(&googleapi.Error{
12321 Code: res.StatusCode,
12322 Header: res.Header,
12323 })
12324 }
12325 if err != nil {
12326 return nil, err
12327 }
12328 defer googleapi.CloseBody(res)
12329 if err := googleapi.CheckResponse(res); err != nil {
12330 return nil, gensupport.WrapError(err)
12331 }
12332 ret := &GoogleCloudApihubV1Deployment{
12333 ServerResponse: googleapi.ServerResponse{
12334 Header: res.Header,
12335 HTTPStatusCode: res.StatusCode,
12336 },
12337 }
12338 target := &ret
12339 b, err := gensupport.DecodeResponseBytes(target, res)
12340 if err != nil {
12341 return nil, err
12342 }
12343 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.create", "response", internallog.HTTPResponse(res, b))
12344 return ret, nil
12345 }
12346
12347 type ProjectsLocationsDeploymentsDeleteCall struct {
12348 s *Service
12349 name string
12350 urlParams_ gensupport.URLParams
12351 ctx_ context.Context
12352 header_ http.Header
12353 }
12354
12355 // Delete: Delete a deployment resource in the API hub.
12356 //
12357 // - name: The name of the deployment resource to delete. Format:
12358 // `projects/{project}/locations/{location}/deployments/{deployment}`.
12359 func (r *ProjectsLocationsDeploymentsService) Delete(name string) *ProjectsLocationsDeploymentsDeleteCall {
12360 c := &ProjectsLocationsDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12361 c.name = name
12362 return c
12363 }
12364
12365 // Fields allows partial responses to be retrieved. See
12366 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12367 // details.
12368 func (c *ProjectsLocationsDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteCall {
12369 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12370 return c
12371 }
12372
12373 // Context sets the context to be used in this call's Do method.
12374 func (c *ProjectsLocationsDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteCall {
12375 c.ctx_ = ctx
12376 return c
12377 }
12378
12379 // Header returns a http.Header that can be modified by the caller to add
12380 // headers to the request.
12381 func (c *ProjectsLocationsDeploymentsDeleteCall) Header() http.Header {
12382 if c.header_ == nil {
12383 c.header_ = make(http.Header)
12384 }
12385 return c.header_
12386 }
12387
12388 func (c *ProjectsLocationsDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
12389 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12390 c.urlParams_.Set("alt", alt)
12391 c.urlParams_.Set("prettyPrint", "false")
12392 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12393 urls += "?" + c.urlParams_.Encode()
12394 req, err := http.NewRequest("DELETE", urls, nil)
12395 if err != nil {
12396 return nil, err
12397 }
12398 req.Header = reqHeaders
12399 googleapi.Expand(req.URL, map[string]string{
12400 "name": c.name,
12401 })
12402 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.delete", "request", internallog.HTTPRequest(req, nil))
12403 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12404 }
12405
12406 // Do executes the "apihub.projects.locations.deployments.delete" call.
12407 // Any non-2xx status code is an error. Response headers are in either
12408 // *Empty.ServerResponse.Header or (if a response was returned at all) in
12409 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12410 // whether the returned error was because http.StatusNotModified was returned.
12411 func (c *ProjectsLocationsDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12412 gensupport.SetOptions(c.urlParams_, opts...)
12413 res, err := c.doRequest("json")
12414 if res != nil && res.StatusCode == http.StatusNotModified {
12415 if res.Body != nil {
12416 res.Body.Close()
12417 }
12418 return nil, gensupport.WrapError(&googleapi.Error{
12419 Code: res.StatusCode,
12420 Header: res.Header,
12421 })
12422 }
12423 if err != nil {
12424 return nil, err
12425 }
12426 defer googleapi.CloseBody(res)
12427 if err := googleapi.CheckResponse(res); err != nil {
12428 return nil, gensupport.WrapError(err)
12429 }
12430 ret := &Empty{
12431 ServerResponse: googleapi.ServerResponse{
12432 Header: res.Header,
12433 HTTPStatusCode: res.StatusCode,
12434 },
12435 }
12436 target := &ret
12437 b, err := gensupport.DecodeResponseBytes(target, res)
12438 if err != nil {
12439 return nil, err
12440 }
12441 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.delete", "response", internallog.HTTPResponse(res, b))
12442 return ret, nil
12443 }
12444
12445 type ProjectsLocationsDeploymentsGetCall struct {
12446 s *Service
12447 name string
12448 urlParams_ gensupport.URLParams
12449 ifNoneMatch_ string
12450 ctx_ context.Context
12451 header_ http.Header
12452 }
12453
12454 // Get: Get details about a deployment and the API versions linked to it.
12455 //
12456 // - name: The name of the deployment resource to retrieve. Format:
12457 // `projects/{project}/locations/{location}/deployments/{deployment}`.
12458 func (r *ProjectsLocationsDeploymentsService) Get(name string) *ProjectsLocationsDeploymentsGetCall {
12459 c := &ProjectsLocationsDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12460 c.name = name
12461 return c
12462 }
12463
12464 // Fields allows partial responses to be retrieved. See
12465 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12466 // details.
12467 func (c *ProjectsLocationsDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetCall {
12468 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12469 return c
12470 }
12471
12472 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12473 // object's ETag matches the given value. This is useful for getting updates
12474 // only after the object has changed since the last request.
12475 func (c *ProjectsLocationsDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetCall {
12476 c.ifNoneMatch_ = entityTag
12477 return c
12478 }
12479
12480 // Context sets the context to be used in this call's Do method.
12481 func (c *ProjectsLocationsDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetCall {
12482 c.ctx_ = ctx
12483 return c
12484 }
12485
12486 // Header returns a http.Header that can be modified by the caller to add
12487 // headers to the request.
12488 func (c *ProjectsLocationsDeploymentsGetCall) Header() http.Header {
12489 if c.header_ == nil {
12490 c.header_ = make(http.Header)
12491 }
12492 return c.header_
12493 }
12494
12495 func (c *ProjectsLocationsDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
12496 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12497 if c.ifNoneMatch_ != "" {
12498 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12499 }
12500 c.urlParams_.Set("alt", alt)
12501 c.urlParams_.Set("prettyPrint", "false")
12502 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12503 urls += "?" + c.urlParams_.Encode()
12504 req, err := http.NewRequest("GET", urls, nil)
12505 if err != nil {
12506 return nil, err
12507 }
12508 req.Header = reqHeaders
12509 googleapi.Expand(req.URL, map[string]string{
12510 "name": c.name,
12511 })
12512 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.get", "request", internallog.HTTPRequest(req, nil))
12513 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12514 }
12515
12516 // Do executes the "apihub.projects.locations.deployments.get" call.
12517 // Any non-2xx status code is an error. Response headers are in either
12518 // *GoogleCloudApihubV1Deployment.ServerResponse.Header or (if a response was
12519 // returned at all) in error.(*googleapi.Error).Header. Use
12520 // googleapi.IsNotModified to check whether the returned error was because
12521 // http.StatusNotModified was returned.
12522 func (c *ProjectsLocationsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Deployment, error) {
12523 gensupport.SetOptions(c.urlParams_, opts...)
12524 res, err := c.doRequest("json")
12525 if res != nil && res.StatusCode == http.StatusNotModified {
12526 if res.Body != nil {
12527 res.Body.Close()
12528 }
12529 return nil, gensupport.WrapError(&googleapi.Error{
12530 Code: res.StatusCode,
12531 Header: res.Header,
12532 })
12533 }
12534 if err != nil {
12535 return nil, err
12536 }
12537 defer googleapi.CloseBody(res)
12538 if err := googleapi.CheckResponse(res); err != nil {
12539 return nil, gensupport.WrapError(err)
12540 }
12541 ret := &GoogleCloudApihubV1Deployment{
12542 ServerResponse: googleapi.ServerResponse{
12543 Header: res.Header,
12544 HTTPStatusCode: res.StatusCode,
12545 },
12546 }
12547 target := &ret
12548 b, err := gensupport.DecodeResponseBytes(target, res)
12549 if err != nil {
12550 return nil, err
12551 }
12552 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.get", "response", internallog.HTTPResponse(res, b))
12553 return ret, nil
12554 }
12555
12556 type ProjectsLocationsDeploymentsListCall struct {
12557 s *Service
12558 parent string
12559 urlParams_ gensupport.URLParams
12560 ifNoneMatch_ string
12561 ctx_ context.Context
12562 header_ http.Header
12563 }
12564
12565 // List: List deployment resources in the API hub.
12566 //
12567 // - parent: The parent, which owns this collection of deployment resources.
12568 // Format: `projects/{project}/locations/{location}`.
12569 func (r *ProjectsLocationsDeploymentsService) List(parent string) *ProjectsLocationsDeploymentsListCall {
12570 c := &ProjectsLocationsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12571 c.parent = parent
12572 return c
12573 }
12574
12575 // Filter sets the optional parameter "filter": An expression that filters the
12576 // list of Deployments. A filter expression consists of a field name, a
12577 // comparison operator, and a value for filtering. The value must be a string.
12578 // The comparison operator must be one of: `<`, `>` or `=`. Filters are not
12579 // case sensitive. The following fields in the `Deployments` are eligible for
12580 // filtering: * `display_name` - The display name of the Deployment. Allowed
12581 // comparison operators: `=`. * `create_time` - The time at which the
12582 // Deployment was created. The value should be in the
12583 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
12584 // operators: `>` and `<`. * `resource_uri` - A URI to the deployment resource.
12585 // Allowed comparison operators: `=`. * `api_versions` - The API versions
12586 // linked to this deployment. Allowed comparison operators: `:`. *
12587 // `source_project` - The project/organization at source for the deployment.
12588 // Allowed comparison operators: `=`. * `source_environment` - The environment
12589 // at source for the deployment. Allowed comparison operators: `=`. *
12590 // `deployment_type.enum_values.values.id` - The allowed value id of the
12591 // deployment_type attribute associated with the Deployment. Allowed comparison
12592 // operators: `:`. * `deployment_type.enum_values.values.display_name` - The
12593 // allowed value display name of the deployment_type attribute associated with
12594 // the Deployment. Allowed comparison operators: `:`. *
12595 // `slo.string_values.values` -The allowed string value of the slo attribute
12596 // associated with the deployment. Allowed comparison operators: `:`. *
12597 // `environment.enum_values.values.id` - The allowed value id of the
12598 // environment attribute associated with the deployment. Allowed comparison
12599 // operators: `:`. * `environment.enum_values.values.display_name` - The
12600 // allowed value display name of the environment attribute associated with the
12601 // deployment. Allowed comparison operators: `:`. *
12602 // `attributes.projects/test-project-id/locations/test-location-id/
12603 // attributes/user-defined-attribute-id.enum_values.values.id` - The allowed
12604 // value id of the user defined enum attribute associated with the Resource.
12605 // Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a
12606 // placeholder that can be replaced with any user defined enum attribute name.
12607 // * `attributes.projects/test-project-id/locations/test-location-id/
12608 // attributes/user-defined-attribute-id.enum_values.values.display_name` - The
12609 // allowed value display name of the user defined enum attribute associated
12610 // with the Resource. Allowed comparison operator is `:`. Here
12611 // user-defined-attribute-enum-display-name is a placeholder that can be
12612 // replaced with any user defined enum attribute enum name. *
12613 // `attributes.projects/test-project-id/locations/test-location-id/
12614 // attributes/user-defined-attribute-id.string_values.values` - The allowed
12615 // value of the user defined string attribute associated with the Resource.
12616 // Allowed comparison operator is `:`. Here user-defined-attribute-string is a
12617 // placeholder that can be replaced with any user defined string attribute
12618 // name. * `attributes.projects/test-project-id/locations/test-location-id/
12619 // attributes/user-defined-attribute-id.json_values.values` - The allowed value
12620 // of the user defined JSON attribute associated with the Resource. Allowed
12621 // comparison operator is `:`. Here user-defined-attribute-json is a
12622 // placeholder that can be replaced with any user defined JSON attribute name.
12623 // A filter function is also supported in the filter string. The filter
12624 // function is `id(name)`. The `id(name)` function returns the id of the
12625 // resource name. For example, `id(name) = \"deployment-1\" is equivalent to
12626 // `name =
12627 // \"projects/test-project-id/locations/test-location-id/deployments/deployment-
12628 // 1\" provided the parent is
12629 // `projects/test-project-id/locations/test-location-id`. Expressions are
12630 // combined with either `AND` logic operator or `OR` logical operator but not
12631 // both of them together i.e. only one of the `AND` or `OR` operator can be
12632 // used throughout the filter string and both the operators cannot be used
12633 // together. No other logical operators are supported. At most three filter
12634 // fields are allowed in the filter string and if provided more than that then
12635 // `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: *
12636 // `environment.enum_values.values.id: staging-id` - The allowed value id of
12637 // the environment attribute associated with the Deployment is _staging-id_. *
12638 // `environment.enum_values.values.display_name: \"Staging Deployment\" - The
12639 // allowed value display name of the environment attribute associated with the
12640 // Deployment is `Staging Deployment`. * `environment.enum_values.values.id:
12641 // production-id AND create_time < \"2021-08-15T14:50:00Z\" AND create_time >
12642 // \"2021-08-10T12:00:00Z\" - The allowed value id of the environment
12643 // attribute associated with the Deployment is _production-id_ and Deployment
12644 // was created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00
12645 // UTC_. * `environment.enum_values.values.id: production-id OR
12646 // slo.string_values.values: \"99.99%\" - The allowed value id of the
12647 // environment attribute Deployment is _production-id_ or string value of the
12648 // slo attribute is _99.99%_. * `environment.enum_values.values.id: staging-id
12649 // AND attributes.projects/test-project-id/locations/test-location-id/
12650 // attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test`
12651 // - The filter string specifies that the allowed value id of the environment
12652 // attribute associated with the Deployment is _staging-id_ and the value of
12653 // the user defined attribute of type string is _test_.
12654 func (c *ProjectsLocationsDeploymentsListCall) Filter(filter string) *ProjectsLocationsDeploymentsListCall {
12655 c.urlParams_.Set("filter", filter)
12656 return c
12657 }
12658
12659 // PageSize sets the optional parameter "pageSize": The maximum number of
12660 // deployment resources to return. The service may return fewer than this
12661 // value. If unspecified, at most 50 deployments will be returned. The maximum
12662 // value is 1000; values above 1000 will be coerced to 1000.
12663 func (c *ProjectsLocationsDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsListCall {
12664 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12665 return c
12666 }
12667
12668 // PageToken sets the optional parameter "pageToken": A page token, received
12669 // from a previous `ListDeployments` call. Provide this to retrieve the
12670 // subsequent page. When paginating, all other parameters (except page_size)
12671 // provided to `ListDeployments` must match the call that provided the page
12672 // token.
12673 func (c *ProjectsLocationsDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsListCall {
12674 c.urlParams_.Set("pageToken", pageToken)
12675 return c
12676 }
12677
12678 // Fields allows partial responses to be retrieved. See
12679 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12680 // details.
12681 func (c *ProjectsLocationsDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsListCall {
12682 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12683 return c
12684 }
12685
12686 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12687 // object's ETag matches the given value. This is useful for getting updates
12688 // only after the object has changed since the last request.
12689 func (c *ProjectsLocationsDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsListCall {
12690 c.ifNoneMatch_ = entityTag
12691 return c
12692 }
12693
12694 // Context sets the context to be used in this call's Do method.
12695 func (c *ProjectsLocationsDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsListCall {
12696 c.ctx_ = ctx
12697 return c
12698 }
12699
12700 // Header returns a http.Header that can be modified by the caller to add
12701 // headers to the request.
12702 func (c *ProjectsLocationsDeploymentsListCall) Header() http.Header {
12703 if c.header_ == nil {
12704 c.header_ = make(http.Header)
12705 }
12706 return c.header_
12707 }
12708
12709 func (c *ProjectsLocationsDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
12710 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12711 if c.ifNoneMatch_ != "" {
12712 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12713 }
12714 c.urlParams_.Set("alt", alt)
12715 c.urlParams_.Set("prettyPrint", "false")
12716 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
12717 urls += "?" + c.urlParams_.Encode()
12718 req, err := http.NewRequest("GET", urls, nil)
12719 if err != nil {
12720 return nil, err
12721 }
12722 req.Header = reqHeaders
12723 googleapi.Expand(req.URL, map[string]string{
12724 "parent": c.parent,
12725 })
12726 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.list", "request", internallog.HTTPRequest(req, nil))
12727 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12728 }
12729
12730 // Do executes the "apihub.projects.locations.deployments.list" call.
12731 // Any non-2xx status code is an error. Response headers are in either
12732 // *GoogleCloudApihubV1ListDeploymentsResponse.ServerResponse.Header or (if a
12733 // response was returned at all) in error.(*googleapi.Error).Header. Use
12734 // googleapi.IsNotModified to check whether the returned error was because
12735 // http.StatusNotModified was returned.
12736 func (c *ProjectsLocationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListDeploymentsResponse, error) {
12737 gensupport.SetOptions(c.urlParams_, opts...)
12738 res, err := c.doRequest("json")
12739 if res != nil && res.StatusCode == http.StatusNotModified {
12740 if res.Body != nil {
12741 res.Body.Close()
12742 }
12743 return nil, gensupport.WrapError(&googleapi.Error{
12744 Code: res.StatusCode,
12745 Header: res.Header,
12746 })
12747 }
12748 if err != nil {
12749 return nil, err
12750 }
12751 defer googleapi.CloseBody(res)
12752 if err := googleapi.CheckResponse(res); err != nil {
12753 return nil, gensupport.WrapError(err)
12754 }
12755 ret := &GoogleCloudApihubV1ListDeploymentsResponse{
12756 ServerResponse: googleapi.ServerResponse{
12757 Header: res.Header,
12758 HTTPStatusCode: res.StatusCode,
12759 },
12760 }
12761 target := &ret
12762 b, err := gensupport.DecodeResponseBytes(target, res)
12763 if err != nil {
12764 return nil, err
12765 }
12766 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.list", "response", internallog.HTTPResponse(res, b))
12767 return ret, nil
12768 }
12769
12770 // Pages invokes f for each page of results.
12771 // A non-nil error returned from f will halt the iteration.
12772 // The provided context supersedes any context provided to the Context method.
12773 func (c *ProjectsLocationsDeploymentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListDeploymentsResponse) error) error {
12774 c.ctx_ = ctx
12775 defer c.PageToken(c.urlParams_.Get("pageToken"))
12776 for {
12777 x, err := c.Do()
12778 if err != nil {
12779 return err
12780 }
12781 if err := f(x); err != nil {
12782 return err
12783 }
12784 if x.NextPageToken == "" {
12785 return nil
12786 }
12787 c.PageToken(x.NextPageToken)
12788 }
12789 }
12790
12791 type ProjectsLocationsDeploymentsPatchCall struct {
12792 s *Service
12793 name string
12794 googlecloudapihubv1deployment *GoogleCloudApihubV1Deployment
12795 urlParams_ gensupport.URLParams
12796 ctx_ context.Context
12797 header_ http.Header
12798 }
12799
12800 // Patch: Update a deployment resource in the API hub. The following fields in
12801 // the deployment resource can be updated: * display_name * description *
12802 // documentation * deployment_type * resource_uri * endpoints * slo *
12803 // environment * attributes * source_project * source_environment *
12804 // management_url * source_uri The update_mask should be used to specify the
12805 // fields being updated.
12806 //
12807 // - name: Identifier. The name of the deployment. Format:
12808 // `projects/{project}/locations/{location}/deployments/{deployment}`.
12809 func (r *ProjectsLocationsDeploymentsService) Patch(name string, googlecloudapihubv1deployment *GoogleCloudApihubV1Deployment) *ProjectsLocationsDeploymentsPatchCall {
12810 c := &ProjectsLocationsDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12811 c.name = name
12812 c.googlecloudapihubv1deployment = googlecloudapihubv1deployment
12813 return c
12814 }
12815
12816 // UpdateMask sets the optional parameter "updateMask": Required. The list of
12817 // fields to update.
12818 func (c *ProjectsLocationsDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentsPatchCall {
12819 c.urlParams_.Set("updateMask", updateMask)
12820 return c
12821 }
12822
12823 // Fields allows partial responses to be retrieved. See
12824 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12825 // details.
12826 func (c *ProjectsLocationsDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsPatchCall {
12827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12828 return c
12829 }
12830
12831 // Context sets the context to be used in this call's Do method.
12832 func (c *ProjectsLocationsDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsPatchCall {
12833 c.ctx_ = ctx
12834 return c
12835 }
12836
12837 // Header returns a http.Header that can be modified by the caller to add
12838 // headers to the request.
12839 func (c *ProjectsLocationsDeploymentsPatchCall) Header() http.Header {
12840 if c.header_ == nil {
12841 c.header_ = make(http.Header)
12842 }
12843 return c.header_
12844 }
12845
12846 func (c *ProjectsLocationsDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
12847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12848 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1deployment)
12849 if err != nil {
12850 return nil, err
12851 }
12852 c.urlParams_.Set("alt", alt)
12853 c.urlParams_.Set("prettyPrint", "false")
12854 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12855 urls += "?" + c.urlParams_.Encode()
12856 req, err := http.NewRequest("PATCH", urls, body)
12857 if err != nil {
12858 return nil, err
12859 }
12860 req.Header = reqHeaders
12861 googleapi.Expand(req.URL, map[string]string{
12862 "name": c.name,
12863 })
12864 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12866 }
12867
12868 // Do executes the "apihub.projects.locations.deployments.patch" call.
12869 // Any non-2xx status code is an error. Response headers are in either
12870 // *GoogleCloudApihubV1Deployment.ServerResponse.Header or (if a response was
12871 // returned at all) in error.(*googleapi.Error).Header. Use
12872 // googleapi.IsNotModified to check whether the returned error was because
12873 // http.StatusNotModified was returned.
12874 func (c *ProjectsLocationsDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Deployment, error) {
12875 gensupport.SetOptions(c.urlParams_, opts...)
12876 res, err := c.doRequest("json")
12877 if res != nil && res.StatusCode == http.StatusNotModified {
12878 if res.Body != nil {
12879 res.Body.Close()
12880 }
12881 return nil, gensupport.WrapError(&googleapi.Error{
12882 Code: res.StatusCode,
12883 Header: res.Header,
12884 })
12885 }
12886 if err != nil {
12887 return nil, err
12888 }
12889 defer googleapi.CloseBody(res)
12890 if err := googleapi.CheckResponse(res); err != nil {
12891 return nil, gensupport.WrapError(err)
12892 }
12893 ret := &GoogleCloudApihubV1Deployment{
12894 ServerResponse: googleapi.ServerResponse{
12895 Header: res.Header,
12896 HTTPStatusCode: res.StatusCode,
12897 },
12898 }
12899 target := &ret
12900 b, err := gensupport.DecodeResponseBytes(target, res)
12901 if err != nil {
12902 return nil, err
12903 }
12904 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.deployments.patch", "response", internallog.HTTPResponse(res, b))
12905 return ret, nil
12906 }
12907
12908 type ProjectsLocationsDiscoveredApiObservationsGetCall struct {
12909 s *Service
12910 name string
12911 urlParams_ gensupport.URLParams
12912 ifNoneMatch_ string
12913 ctx_ context.Context
12914 header_ http.Header
12915 }
12916
12917 // Get: Gets a DiscoveredAPIObservation in a given project, location and
12918 // ApiObservation.
12919 //
12920 // - name: The name of the DiscoveredApiObservation to retrieve. Format:
12921 // projects/{project}/locations/{location}/discoveredApiObservations/{discover
12922 // ed_api_observation}.
12923 func (r *ProjectsLocationsDiscoveredApiObservationsService) Get(name string) *ProjectsLocationsDiscoveredApiObservationsGetCall {
12924 c := &ProjectsLocationsDiscoveredApiObservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12925 c.name = name
12926 return c
12927 }
12928
12929 // Fields allows partial responses to be retrieved. See
12930 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12931 // details.
12932 func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsGetCall {
12933 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12934 return c
12935 }
12936
12937 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12938 // object's ETag matches the given value. This is useful for getting updates
12939 // only after the object has changed since the last request.
12940 func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsGetCall {
12941 c.ifNoneMatch_ = entityTag
12942 return c
12943 }
12944
12945 // Context sets the context to be used in this call's Do method.
12946 func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsGetCall {
12947 c.ctx_ = ctx
12948 return c
12949 }
12950
12951 // Header returns a http.Header that can be modified by the caller to add
12952 // headers to the request.
12953 func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) Header() http.Header {
12954 if c.header_ == nil {
12955 c.header_ = make(http.Header)
12956 }
12957 return c.header_
12958 }
12959
12960 func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) doRequest(alt string) (*http.Response, error) {
12961 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12962 if c.ifNoneMatch_ != "" {
12963 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12964 }
12965 c.urlParams_.Set("alt", alt)
12966 c.urlParams_.Set("prettyPrint", "false")
12967 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12968 urls += "?" + c.urlParams_.Encode()
12969 req, err := http.NewRequest("GET", urls, nil)
12970 if err != nil {
12971 return nil, err
12972 }
12973 req.Header = reqHeaders
12974 googleapi.Expand(req.URL, map[string]string{
12975 "name": c.name,
12976 })
12977 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.get", "request", internallog.HTTPRequest(req, nil))
12978 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12979 }
12980
12981 // Do executes the "apihub.projects.locations.discoveredApiObservations.get" call.
12982 // Any non-2xx status code is an error. Response headers are in either
12983 // *GoogleCloudApihubV1DiscoveredApiObservation.ServerResponse.Header or (if a
12984 // response was returned at all) in error.(*googleapi.Error).Header. Use
12985 // googleapi.IsNotModified to check whether the returned error was because
12986 // http.StatusNotModified was returned.
12987 func (c *ProjectsLocationsDiscoveredApiObservationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1DiscoveredApiObservation, error) {
12988 gensupport.SetOptions(c.urlParams_, opts...)
12989 res, err := c.doRequest("json")
12990 if res != nil && res.StatusCode == http.StatusNotModified {
12991 if res.Body != nil {
12992 res.Body.Close()
12993 }
12994 return nil, gensupport.WrapError(&googleapi.Error{
12995 Code: res.StatusCode,
12996 Header: res.Header,
12997 })
12998 }
12999 if err != nil {
13000 return nil, err
13001 }
13002 defer googleapi.CloseBody(res)
13003 if err := googleapi.CheckResponse(res); err != nil {
13004 return nil, gensupport.WrapError(err)
13005 }
13006 ret := &GoogleCloudApihubV1DiscoveredApiObservation{
13007 ServerResponse: googleapi.ServerResponse{
13008 Header: res.Header,
13009 HTTPStatusCode: res.StatusCode,
13010 },
13011 }
13012 target := &ret
13013 b, err := gensupport.DecodeResponseBytes(target, res)
13014 if err != nil {
13015 return nil, err
13016 }
13017 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.get", "response", internallog.HTTPResponse(res, b))
13018 return ret, nil
13019 }
13020
13021 type ProjectsLocationsDiscoveredApiObservationsListCall struct {
13022 s *Service
13023 parent string
13024 urlParams_ gensupport.URLParams
13025 ifNoneMatch_ string
13026 ctx_ context.Context
13027 header_ http.Header
13028 }
13029
13030 // List: Lists all the DiscoveredAPIObservations in a given project and
13031 // location.
13032 //
13033 // - parent: The parent, which owns this collection of ApiObservations. Format:
13034 // projects/{project}/locations/{location}.
13035 func (r *ProjectsLocationsDiscoveredApiObservationsService) List(parent string) *ProjectsLocationsDiscoveredApiObservationsListCall {
13036 c := &ProjectsLocationsDiscoveredApiObservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13037 c.parent = parent
13038 return c
13039 }
13040
13041 // PageSize sets the optional parameter "pageSize": The maximum number of
13042 // ApiObservations to return. The service may return fewer than this value. If
13043 // unspecified, at most 10 ApiObservations will be returned. The maximum value
13044 // is 1000; values above 1000 will be coerced to 1000.
13045 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredApiObservationsListCall {
13046 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13047 return c
13048 }
13049
13050 // PageToken sets the optional parameter "pageToken": A page token, received
13051 // from a previous `ListApiObservations` call. Provide this to retrieve the
13052 // subsequent page. When paginating, all other parameters provided to
13053 // `ListApiObservations` must match the call that provided the page token.
13054 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredApiObservationsListCall {
13055 c.urlParams_.Set("pageToken", pageToken)
13056 return c
13057 }
13058
13059 // Fields allows partial responses to be retrieved. See
13060 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13061 // details.
13062 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsListCall {
13063 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13064 return c
13065 }
13066
13067 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13068 // object's ETag matches the given value. This is useful for getting updates
13069 // only after the object has changed since the last request.
13070 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsListCall {
13071 c.ifNoneMatch_ = entityTag
13072 return c
13073 }
13074
13075 // Context sets the context to be used in this call's Do method.
13076 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsListCall {
13077 c.ctx_ = ctx
13078 return c
13079 }
13080
13081 // Header returns a http.Header that can be modified by the caller to add
13082 // headers to the request.
13083 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) Header() http.Header {
13084 if c.header_ == nil {
13085 c.header_ = make(http.Header)
13086 }
13087 return c.header_
13088 }
13089
13090 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) doRequest(alt string) (*http.Response, error) {
13091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13092 if c.ifNoneMatch_ != "" {
13093 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13094 }
13095 c.urlParams_.Set("alt", alt)
13096 c.urlParams_.Set("prettyPrint", "false")
13097 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredApiObservations")
13098 urls += "?" + c.urlParams_.Encode()
13099 req, err := http.NewRequest("GET", urls, nil)
13100 if err != nil {
13101 return nil, err
13102 }
13103 req.Header = reqHeaders
13104 googleapi.Expand(req.URL, map[string]string{
13105 "parent": c.parent,
13106 })
13107 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.list", "request", internallog.HTTPRequest(req, nil))
13108 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13109 }
13110
13111 // Do executes the "apihub.projects.locations.discoveredApiObservations.list" call.
13112 // Any non-2xx status code is an error. Response headers are in either
13113 // *GoogleCloudApihubV1ListDiscoveredApiObservationsResponse.ServerResponse.Head
13114 // er or (if a response was returned at all) in
13115 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13116 // whether the returned error was because http.StatusNotModified was returned.
13117 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListDiscoveredApiObservationsResponse, error) {
13118 gensupport.SetOptions(c.urlParams_, opts...)
13119 res, err := c.doRequest("json")
13120 if res != nil && res.StatusCode == http.StatusNotModified {
13121 if res.Body != nil {
13122 res.Body.Close()
13123 }
13124 return nil, gensupport.WrapError(&googleapi.Error{
13125 Code: res.StatusCode,
13126 Header: res.Header,
13127 })
13128 }
13129 if err != nil {
13130 return nil, err
13131 }
13132 defer googleapi.CloseBody(res)
13133 if err := googleapi.CheckResponse(res); err != nil {
13134 return nil, gensupport.WrapError(err)
13135 }
13136 ret := &GoogleCloudApihubV1ListDiscoveredApiObservationsResponse{
13137 ServerResponse: googleapi.ServerResponse{
13138 Header: res.Header,
13139 HTTPStatusCode: res.StatusCode,
13140 },
13141 }
13142 target := &ret
13143 b, err := gensupport.DecodeResponseBytes(target, res)
13144 if err != nil {
13145 return nil, err
13146 }
13147 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.list", "response", internallog.HTTPResponse(res, b))
13148 return ret, nil
13149 }
13150
13151 // Pages invokes f for each page of results.
13152 // A non-nil error returned from f will halt the iteration.
13153 // The provided context supersedes any context provided to the Context method.
13154 func (c *ProjectsLocationsDiscoveredApiObservationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListDiscoveredApiObservationsResponse) error) error {
13155 c.ctx_ = ctx
13156 defer c.PageToken(c.urlParams_.Get("pageToken"))
13157 for {
13158 x, err := c.Do()
13159 if err != nil {
13160 return err
13161 }
13162 if err := f(x); err != nil {
13163 return err
13164 }
13165 if x.NextPageToken == "" {
13166 return nil
13167 }
13168 c.PageToken(x.NextPageToken)
13169 }
13170 }
13171
13172 type ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall struct {
13173 s *Service
13174 name string
13175 urlParams_ gensupport.URLParams
13176 ifNoneMatch_ string
13177 ctx_ context.Context
13178 header_ http.Header
13179 }
13180
13181 // Get: Gets a DiscoveredAPIOperation in a given project, location,
13182 // ApiObservation and ApiOperation.
13183 //
13184 // - name: The name of the DiscoveredApiOperation to retrieve. Format:
13185 // projects/{project}/locations/{location}/discoveredApiObservations/{discover
13186 // ed_api_observation}/discoveredApiOperations/{discovered_api_operation}.
13187 func (r *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService) Get(name string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall {
13188 c := &ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13189 c.name = name
13190 return c
13191 }
13192
13193 // Fields allows partial responses to be retrieved. See
13194 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13195 // details.
13196 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall {
13197 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13198 return c
13199 }
13200
13201 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13202 // object's ETag matches the given value. This is useful for getting updates
13203 // only after the object has changed since the last request.
13204 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall {
13205 c.ifNoneMatch_ = entityTag
13206 return c
13207 }
13208
13209 // Context sets the context to be used in this call's Do method.
13210 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall {
13211 c.ctx_ = ctx
13212 return c
13213 }
13214
13215 // Header returns a http.Header that can be modified by the caller to add
13216 // headers to the request.
13217 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Header() http.Header {
13218 if c.header_ == nil {
13219 c.header_ = make(http.Header)
13220 }
13221 return c.header_
13222 }
13223
13224 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) doRequest(alt string) (*http.Response, error) {
13225 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13226 if c.ifNoneMatch_ != "" {
13227 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13228 }
13229 c.urlParams_.Set("alt", alt)
13230 c.urlParams_.Set("prettyPrint", "false")
13231 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13232 urls += "?" + c.urlParams_.Encode()
13233 req, err := http.NewRequest("GET", urls, nil)
13234 if err != nil {
13235 return nil, err
13236 }
13237 req.Header = reqHeaders
13238 googleapi.Expand(req.URL, map[string]string{
13239 "name": c.name,
13240 })
13241 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get", "request", internallog.HTTPRequest(req, nil))
13242 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13243 }
13244
13245 // Do executes the "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get" call.
13246 // Any non-2xx status code is an error. Response headers are in either
13247 // *GoogleCloudApihubV1DiscoveredApiOperation.ServerResponse.Header or (if a
13248 // response was returned at all) in error.(*googleapi.Error).Header. Use
13249 // googleapi.IsNotModified to check whether the returned error was because
13250 // http.StatusNotModified was returned.
13251 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1DiscoveredApiOperation, error) {
13252 gensupport.SetOptions(c.urlParams_, opts...)
13253 res, err := c.doRequest("json")
13254 if res != nil && res.StatusCode == http.StatusNotModified {
13255 if res.Body != nil {
13256 res.Body.Close()
13257 }
13258 return nil, gensupport.WrapError(&googleapi.Error{
13259 Code: res.StatusCode,
13260 Header: res.Header,
13261 })
13262 }
13263 if err != nil {
13264 return nil, err
13265 }
13266 defer googleapi.CloseBody(res)
13267 if err := googleapi.CheckResponse(res); err != nil {
13268 return nil, gensupport.WrapError(err)
13269 }
13270 ret := &GoogleCloudApihubV1DiscoveredApiOperation{
13271 ServerResponse: googleapi.ServerResponse{
13272 Header: res.Header,
13273 HTTPStatusCode: res.StatusCode,
13274 },
13275 }
13276 target := &ret
13277 b, err := gensupport.DecodeResponseBytes(target, res)
13278 if err != nil {
13279 return nil, err
13280 }
13281 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.get", "response", internallog.HTTPResponse(res, b))
13282 return ret, nil
13283 }
13284
13285 type ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall struct {
13286 s *Service
13287 parent string
13288 urlParams_ gensupport.URLParams
13289 ifNoneMatch_ string
13290 ctx_ context.Context
13291 header_ http.Header
13292 }
13293
13294 // List: Lists all the DiscoveredAPIOperations in a given project, location and
13295 // ApiObservation.
13296 //
13297 // - parent: The parent, which owns this collection of DiscoveredApiOperations.
13298 // Format:
13299 // projects/{project}/locations/{location}/discoveredApiObservations/{discover
13300 // ed_api_observation}.
13301 func (r *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsService) List(parent string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall {
13302 c := &ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13303 c.parent = parent
13304 return c
13305 }
13306
13307 // PageSize sets the optional parameter "pageSize": DiscoveredApiOperations
13308 // will be returned. The maximum value is 1000; values above 1000 will be
13309 // coerced to 1000.
13310 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall {
13311 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13312 return c
13313 }
13314
13315 // PageToken sets the optional parameter "pageToken": A page token, received
13316 // from a previous `ListDiscoveredApiApiOperations` call. Provide this to
13317 // retrieve the subsequent page. When paginating, all other parameters provided
13318 // to `ListDiscoveredApiApiOperations` must match the call that provided the
13319 // page token.
13320 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall {
13321 c.urlParams_.Set("pageToken", pageToken)
13322 return c
13323 }
13324
13325 // Fields allows partial responses to be retrieved. See
13326 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13327 // details.
13328 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall {
13329 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13330 return c
13331 }
13332
13333 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13334 // object's ETag matches the given value. This is useful for getting updates
13335 // only after the object has changed since the last request.
13336 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall {
13337 c.ifNoneMatch_ = entityTag
13338 return c
13339 }
13340
13341 // Context sets the context to be used in this call's Do method.
13342 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall {
13343 c.ctx_ = ctx
13344 return c
13345 }
13346
13347 // Header returns a http.Header that can be modified by the caller to add
13348 // headers to the request.
13349 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Header() http.Header {
13350 if c.header_ == nil {
13351 c.header_ = make(http.Header)
13352 }
13353 return c.header_
13354 }
13355
13356 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) doRequest(alt string) (*http.Response, error) {
13357 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13358 if c.ifNoneMatch_ != "" {
13359 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13360 }
13361 c.urlParams_.Set("alt", alt)
13362 c.urlParams_.Set("prettyPrint", "false")
13363 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredApiOperations")
13364 urls += "?" + c.urlParams_.Encode()
13365 req, err := http.NewRequest("GET", urls, nil)
13366 if err != nil {
13367 return nil, err
13368 }
13369 req.Header = reqHeaders
13370 googleapi.Expand(req.URL, map[string]string{
13371 "parent": c.parent,
13372 })
13373 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list", "request", internallog.HTTPRequest(req, nil))
13374 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13375 }
13376
13377 // Do executes the "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list" call.
13378 // Any non-2xx status code is an error. Response headers are in either
13379 // *GoogleCloudApihubV1ListDiscoveredApiOperationsResponse.ServerResponse.Header
13380 //
13381 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
13382 //
13383 // Use googleapi.IsNotModified to check whether the returned error was because
13384 // http.StatusNotModified was returned.
13385 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListDiscoveredApiOperationsResponse, error) {
13386 gensupport.SetOptions(c.urlParams_, opts...)
13387 res, err := c.doRequest("json")
13388 if res != nil && res.StatusCode == http.StatusNotModified {
13389 if res.Body != nil {
13390 res.Body.Close()
13391 }
13392 return nil, gensupport.WrapError(&googleapi.Error{
13393 Code: res.StatusCode,
13394 Header: res.Header,
13395 })
13396 }
13397 if err != nil {
13398 return nil, err
13399 }
13400 defer googleapi.CloseBody(res)
13401 if err := googleapi.CheckResponse(res); err != nil {
13402 return nil, gensupport.WrapError(err)
13403 }
13404 ret := &GoogleCloudApihubV1ListDiscoveredApiOperationsResponse{
13405 ServerResponse: googleapi.ServerResponse{
13406 Header: res.Header,
13407 HTTPStatusCode: res.StatusCode,
13408 },
13409 }
13410 target := &ret
13411 b, err := gensupport.DecodeResponseBytes(target, res)
13412 if err != nil {
13413 return nil, err
13414 }
13415 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.discoveredApiObservations.discoveredApiOperations.list", "response", internallog.HTTPResponse(res, b))
13416 return ret, nil
13417 }
13418
13419 // Pages invokes f for each page of results.
13420 // A non-nil error returned from f will halt the iteration.
13421 // The provided context supersedes any context provided to the Context method.
13422 func (c *ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListDiscoveredApiOperationsResponse) error) error {
13423 c.ctx_ = ctx
13424 defer c.PageToken(c.urlParams_.Get("pageToken"))
13425 for {
13426 x, err := c.Do()
13427 if err != nil {
13428 return err
13429 }
13430 if err := f(x); err != nil {
13431 return err
13432 }
13433 if x.NextPageToken == "" {
13434 return nil
13435 }
13436 c.PageToken(x.NextPageToken)
13437 }
13438 }
13439
13440 type ProjectsLocationsExternalApisCreateCall struct {
13441 s *Service
13442 parent string
13443 googlecloudapihubv1externalapi *GoogleCloudApihubV1ExternalApi
13444 urlParams_ gensupport.URLParams
13445 ctx_ context.Context
13446 header_ http.Header
13447 }
13448
13449 // Create: Create an External API resource in the API hub.
13450 //
13451 // - parent: The parent resource for the External API resource. Format:
13452 // `projects/{project}/locations/{location}`.
13453 func (r *ProjectsLocationsExternalApisService) Create(parent string, googlecloudapihubv1externalapi *GoogleCloudApihubV1ExternalApi) *ProjectsLocationsExternalApisCreateCall {
13454 c := &ProjectsLocationsExternalApisCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13455 c.parent = parent
13456 c.googlecloudapihubv1externalapi = googlecloudapihubv1externalapi
13457 return c
13458 }
13459
13460 // ExternalApiId sets the optional parameter "externalApiId": The ID to use for
13461 // the External API resource, which will become the final component of the
13462 // External API's resource name. This field is optional. * If provided, the
13463 // same will be used. The service will throw an error if the specified id is
13464 // already used by another External API resource in the API hub. * If not
13465 // provided, a system generated id will be used. This value should be 4-500
13466 // characters, and valid characters are /a-z[0-9]-_/.
13467 func (c *ProjectsLocationsExternalApisCreateCall) ExternalApiId(externalApiId string) *ProjectsLocationsExternalApisCreateCall {
13468 c.urlParams_.Set("externalApiId", externalApiId)
13469 return c
13470 }
13471
13472 // Fields allows partial responses to be retrieved. See
13473 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13474 // details.
13475 func (c *ProjectsLocationsExternalApisCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsExternalApisCreateCall {
13476 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13477 return c
13478 }
13479
13480 // Context sets the context to be used in this call's Do method.
13481 func (c *ProjectsLocationsExternalApisCreateCall) Context(ctx context.Context) *ProjectsLocationsExternalApisCreateCall {
13482 c.ctx_ = ctx
13483 return c
13484 }
13485
13486 // Header returns a http.Header that can be modified by the caller to add
13487 // headers to the request.
13488 func (c *ProjectsLocationsExternalApisCreateCall) Header() http.Header {
13489 if c.header_ == nil {
13490 c.header_ = make(http.Header)
13491 }
13492 return c.header_
13493 }
13494
13495 func (c *ProjectsLocationsExternalApisCreateCall) doRequest(alt string) (*http.Response, error) {
13496 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13497 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1externalapi)
13498 if err != nil {
13499 return nil, err
13500 }
13501 c.urlParams_.Set("alt", alt)
13502 c.urlParams_.Set("prettyPrint", "false")
13503 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/externalApis")
13504 urls += "?" + c.urlParams_.Encode()
13505 req, err := http.NewRequest("POST", urls, body)
13506 if err != nil {
13507 return nil, err
13508 }
13509 req.Header = reqHeaders
13510 googleapi.Expand(req.URL, map[string]string{
13511 "parent": c.parent,
13512 })
13513 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.create", "request", internallog.HTTPRequest(req, body.Bytes()))
13514 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13515 }
13516
13517 // Do executes the "apihub.projects.locations.externalApis.create" call.
13518 // Any non-2xx status code is an error. Response headers are in either
13519 // *GoogleCloudApihubV1ExternalApi.ServerResponse.Header or (if a response was
13520 // returned at all) in error.(*googleapi.Error).Header. Use
13521 // googleapi.IsNotModified to check whether the returned error was because
13522 // http.StatusNotModified was returned.
13523 func (c *ProjectsLocationsExternalApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ExternalApi, error) {
13524 gensupport.SetOptions(c.urlParams_, opts...)
13525 res, err := c.doRequest("json")
13526 if res != nil && res.StatusCode == http.StatusNotModified {
13527 if res.Body != nil {
13528 res.Body.Close()
13529 }
13530 return nil, gensupport.WrapError(&googleapi.Error{
13531 Code: res.StatusCode,
13532 Header: res.Header,
13533 })
13534 }
13535 if err != nil {
13536 return nil, err
13537 }
13538 defer googleapi.CloseBody(res)
13539 if err := googleapi.CheckResponse(res); err != nil {
13540 return nil, gensupport.WrapError(err)
13541 }
13542 ret := &GoogleCloudApihubV1ExternalApi{
13543 ServerResponse: googleapi.ServerResponse{
13544 Header: res.Header,
13545 HTTPStatusCode: res.StatusCode,
13546 },
13547 }
13548 target := &ret
13549 b, err := gensupport.DecodeResponseBytes(target, res)
13550 if err != nil {
13551 return nil, err
13552 }
13553 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.create", "response", internallog.HTTPResponse(res, b))
13554 return ret, nil
13555 }
13556
13557 type ProjectsLocationsExternalApisDeleteCall struct {
13558 s *Service
13559 name string
13560 urlParams_ gensupport.URLParams
13561 ctx_ context.Context
13562 header_ http.Header
13563 }
13564
13565 // Delete: Delete an External API resource in the API hub.
13566 //
13567 // - name: The name of the External API resource to delete. Format:
13568 // `projects/{project}/locations/{location}/externalApis/{externalApi}`.
13569 func (r *ProjectsLocationsExternalApisService) Delete(name string) *ProjectsLocationsExternalApisDeleteCall {
13570 c := &ProjectsLocationsExternalApisDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13571 c.name = name
13572 return c
13573 }
13574
13575 // Fields allows partial responses to be retrieved. See
13576 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13577 // details.
13578 func (c *ProjectsLocationsExternalApisDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExternalApisDeleteCall {
13579 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13580 return c
13581 }
13582
13583 // Context sets the context to be used in this call's Do method.
13584 func (c *ProjectsLocationsExternalApisDeleteCall) Context(ctx context.Context) *ProjectsLocationsExternalApisDeleteCall {
13585 c.ctx_ = ctx
13586 return c
13587 }
13588
13589 // Header returns a http.Header that can be modified by the caller to add
13590 // headers to the request.
13591 func (c *ProjectsLocationsExternalApisDeleteCall) Header() http.Header {
13592 if c.header_ == nil {
13593 c.header_ = make(http.Header)
13594 }
13595 return c.header_
13596 }
13597
13598 func (c *ProjectsLocationsExternalApisDeleteCall) doRequest(alt string) (*http.Response, error) {
13599 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13600 c.urlParams_.Set("alt", alt)
13601 c.urlParams_.Set("prettyPrint", "false")
13602 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13603 urls += "?" + c.urlParams_.Encode()
13604 req, err := http.NewRequest("DELETE", urls, nil)
13605 if err != nil {
13606 return nil, err
13607 }
13608 req.Header = reqHeaders
13609 googleapi.Expand(req.URL, map[string]string{
13610 "name": c.name,
13611 })
13612 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.delete", "request", internallog.HTTPRequest(req, nil))
13613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13614 }
13615
13616 // Do executes the "apihub.projects.locations.externalApis.delete" call.
13617 // Any non-2xx status code is an error. Response headers are in either
13618 // *Empty.ServerResponse.Header or (if a response was returned at all) in
13619 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13620 // whether the returned error was because http.StatusNotModified was returned.
13621 func (c *ProjectsLocationsExternalApisDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13622 gensupport.SetOptions(c.urlParams_, opts...)
13623 res, err := c.doRequest("json")
13624 if res != nil && res.StatusCode == http.StatusNotModified {
13625 if res.Body != nil {
13626 res.Body.Close()
13627 }
13628 return nil, gensupport.WrapError(&googleapi.Error{
13629 Code: res.StatusCode,
13630 Header: res.Header,
13631 })
13632 }
13633 if err != nil {
13634 return nil, err
13635 }
13636 defer googleapi.CloseBody(res)
13637 if err := googleapi.CheckResponse(res); err != nil {
13638 return nil, gensupport.WrapError(err)
13639 }
13640 ret := &Empty{
13641 ServerResponse: googleapi.ServerResponse{
13642 Header: res.Header,
13643 HTTPStatusCode: res.StatusCode,
13644 },
13645 }
13646 target := &ret
13647 b, err := gensupport.DecodeResponseBytes(target, res)
13648 if err != nil {
13649 return nil, err
13650 }
13651 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.delete", "response", internallog.HTTPResponse(res, b))
13652 return ret, nil
13653 }
13654
13655 type ProjectsLocationsExternalApisGetCall struct {
13656 s *Service
13657 name string
13658 urlParams_ gensupport.URLParams
13659 ifNoneMatch_ string
13660 ctx_ context.Context
13661 header_ http.Header
13662 }
13663
13664 // Get: Get details about an External API resource in the API hub.
13665 //
13666 // - name: The name of the External API resource to retrieve. Format:
13667 // `projects/{project}/locations/{location}/externalApis/{externalApi}`.
13668 func (r *ProjectsLocationsExternalApisService) Get(name string) *ProjectsLocationsExternalApisGetCall {
13669 c := &ProjectsLocationsExternalApisGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13670 c.name = name
13671 return c
13672 }
13673
13674 // Fields allows partial responses to be retrieved. See
13675 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13676 // details.
13677 func (c *ProjectsLocationsExternalApisGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExternalApisGetCall {
13678 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13679 return c
13680 }
13681
13682 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13683 // object's ETag matches the given value. This is useful for getting updates
13684 // only after the object has changed since the last request.
13685 func (c *ProjectsLocationsExternalApisGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExternalApisGetCall {
13686 c.ifNoneMatch_ = entityTag
13687 return c
13688 }
13689
13690 // Context sets the context to be used in this call's Do method.
13691 func (c *ProjectsLocationsExternalApisGetCall) Context(ctx context.Context) *ProjectsLocationsExternalApisGetCall {
13692 c.ctx_ = ctx
13693 return c
13694 }
13695
13696 // Header returns a http.Header that can be modified by the caller to add
13697 // headers to the request.
13698 func (c *ProjectsLocationsExternalApisGetCall) Header() http.Header {
13699 if c.header_ == nil {
13700 c.header_ = make(http.Header)
13701 }
13702 return c.header_
13703 }
13704
13705 func (c *ProjectsLocationsExternalApisGetCall) doRequest(alt string) (*http.Response, error) {
13706 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13707 if c.ifNoneMatch_ != "" {
13708 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13709 }
13710 c.urlParams_.Set("alt", alt)
13711 c.urlParams_.Set("prettyPrint", "false")
13712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13713 urls += "?" + c.urlParams_.Encode()
13714 req, err := http.NewRequest("GET", urls, nil)
13715 if err != nil {
13716 return nil, err
13717 }
13718 req.Header = reqHeaders
13719 googleapi.Expand(req.URL, map[string]string{
13720 "name": c.name,
13721 })
13722 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.get", "request", internallog.HTTPRequest(req, nil))
13723 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13724 }
13725
13726 // Do executes the "apihub.projects.locations.externalApis.get" call.
13727 // Any non-2xx status code is an error. Response headers are in either
13728 // *GoogleCloudApihubV1ExternalApi.ServerResponse.Header or (if a response was
13729 // returned at all) in error.(*googleapi.Error).Header. Use
13730 // googleapi.IsNotModified to check whether the returned error was because
13731 // http.StatusNotModified was returned.
13732 func (c *ProjectsLocationsExternalApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ExternalApi, error) {
13733 gensupport.SetOptions(c.urlParams_, opts...)
13734 res, err := c.doRequest("json")
13735 if res != nil && res.StatusCode == http.StatusNotModified {
13736 if res.Body != nil {
13737 res.Body.Close()
13738 }
13739 return nil, gensupport.WrapError(&googleapi.Error{
13740 Code: res.StatusCode,
13741 Header: res.Header,
13742 })
13743 }
13744 if err != nil {
13745 return nil, err
13746 }
13747 defer googleapi.CloseBody(res)
13748 if err := googleapi.CheckResponse(res); err != nil {
13749 return nil, gensupport.WrapError(err)
13750 }
13751 ret := &GoogleCloudApihubV1ExternalApi{
13752 ServerResponse: googleapi.ServerResponse{
13753 Header: res.Header,
13754 HTTPStatusCode: res.StatusCode,
13755 },
13756 }
13757 target := &ret
13758 b, err := gensupport.DecodeResponseBytes(target, res)
13759 if err != nil {
13760 return nil, err
13761 }
13762 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.get", "response", internallog.HTTPResponse(res, b))
13763 return ret, nil
13764 }
13765
13766 type ProjectsLocationsExternalApisListCall struct {
13767 s *Service
13768 parent string
13769 urlParams_ gensupport.URLParams
13770 ifNoneMatch_ string
13771 ctx_ context.Context
13772 header_ http.Header
13773 }
13774
13775 // List: List External API resources in the API hub.
13776 //
13777 // - parent: The parent, which owns this collection of External API resources.
13778 // Format: `projects/{project}/locations/{location}`.
13779 func (r *ProjectsLocationsExternalApisService) List(parent string) *ProjectsLocationsExternalApisListCall {
13780 c := &ProjectsLocationsExternalApisListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13781 c.parent = parent
13782 return c
13783 }
13784
13785 // PageSize sets the optional parameter "pageSize": The maximum number of
13786 // External API resources to return. The service may return fewer than this
13787 // value. If unspecified, at most 50 ExternalApis will be returned. The maximum
13788 // value is 1000; values above 1000 will be coerced to 1000.
13789 func (c *ProjectsLocationsExternalApisListCall) PageSize(pageSize int64) *ProjectsLocationsExternalApisListCall {
13790 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13791 return c
13792 }
13793
13794 // PageToken sets the optional parameter "pageToken": A page token, received
13795 // from a previous `ListExternalApis` call. Provide this to retrieve the
13796 // subsequent page. When paginating, all other parameters (except page_size)
13797 // provided to `ListExternalApis` must match the call that provided the page
13798 // token.
13799 func (c *ProjectsLocationsExternalApisListCall) PageToken(pageToken string) *ProjectsLocationsExternalApisListCall {
13800 c.urlParams_.Set("pageToken", pageToken)
13801 return c
13802 }
13803
13804 // Fields allows partial responses to be retrieved. See
13805 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13806 // details.
13807 func (c *ProjectsLocationsExternalApisListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExternalApisListCall {
13808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13809 return c
13810 }
13811
13812 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13813 // object's ETag matches the given value. This is useful for getting updates
13814 // only after the object has changed since the last request.
13815 func (c *ProjectsLocationsExternalApisListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExternalApisListCall {
13816 c.ifNoneMatch_ = entityTag
13817 return c
13818 }
13819
13820 // Context sets the context to be used in this call's Do method.
13821 func (c *ProjectsLocationsExternalApisListCall) Context(ctx context.Context) *ProjectsLocationsExternalApisListCall {
13822 c.ctx_ = ctx
13823 return c
13824 }
13825
13826 // Header returns a http.Header that can be modified by the caller to add
13827 // headers to the request.
13828 func (c *ProjectsLocationsExternalApisListCall) Header() http.Header {
13829 if c.header_ == nil {
13830 c.header_ = make(http.Header)
13831 }
13832 return c.header_
13833 }
13834
13835 func (c *ProjectsLocationsExternalApisListCall) doRequest(alt string) (*http.Response, error) {
13836 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13837 if c.ifNoneMatch_ != "" {
13838 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13839 }
13840 c.urlParams_.Set("alt", alt)
13841 c.urlParams_.Set("prettyPrint", "false")
13842 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/externalApis")
13843 urls += "?" + c.urlParams_.Encode()
13844 req, err := http.NewRequest("GET", urls, nil)
13845 if err != nil {
13846 return nil, err
13847 }
13848 req.Header = reqHeaders
13849 googleapi.Expand(req.URL, map[string]string{
13850 "parent": c.parent,
13851 })
13852 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.list", "request", internallog.HTTPRequest(req, nil))
13853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13854 }
13855
13856 // Do executes the "apihub.projects.locations.externalApis.list" call.
13857 // Any non-2xx status code is an error. Response headers are in either
13858 // *GoogleCloudApihubV1ListExternalApisResponse.ServerResponse.Header or (if a
13859 // response was returned at all) in error.(*googleapi.Error).Header. Use
13860 // googleapi.IsNotModified to check whether the returned error was because
13861 // http.StatusNotModified was returned.
13862 func (c *ProjectsLocationsExternalApisListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListExternalApisResponse, error) {
13863 gensupport.SetOptions(c.urlParams_, opts...)
13864 res, err := c.doRequest("json")
13865 if res != nil && res.StatusCode == http.StatusNotModified {
13866 if res.Body != nil {
13867 res.Body.Close()
13868 }
13869 return nil, gensupport.WrapError(&googleapi.Error{
13870 Code: res.StatusCode,
13871 Header: res.Header,
13872 })
13873 }
13874 if err != nil {
13875 return nil, err
13876 }
13877 defer googleapi.CloseBody(res)
13878 if err := googleapi.CheckResponse(res); err != nil {
13879 return nil, gensupport.WrapError(err)
13880 }
13881 ret := &GoogleCloudApihubV1ListExternalApisResponse{
13882 ServerResponse: googleapi.ServerResponse{
13883 Header: res.Header,
13884 HTTPStatusCode: res.StatusCode,
13885 },
13886 }
13887 target := &ret
13888 b, err := gensupport.DecodeResponseBytes(target, res)
13889 if err != nil {
13890 return nil, err
13891 }
13892 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.list", "response", internallog.HTTPResponse(res, b))
13893 return ret, nil
13894 }
13895
13896 // Pages invokes f for each page of results.
13897 // A non-nil error returned from f will halt the iteration.
13898 // The provided context supersedes any context provided to the Context method.
13899 func (c *ProjectsLocationsExternalApisListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListExternalApisResponse) error) error {
13900 c.ctx_ = ctx
13901 defer c.PageToken(c.urlParams_.Get("pageToken"))
13902 for {
13903 x, err := c.Do()
13904 if err != nil {
13905 return err
13906 }
13907 if err := f(x); err != nil {
13908 return err
13909 }
13910 if x.NextPageToken == "" {
13911 return nil
13912 }
13913 c.PageToken(x.NextPageToken)
13914 }
13915 }
13916
13917 type ProjectsLocationsExternalApisPatchCall struct {
13918 s *Service
13919 name string
13920 googlecloudapihubv1externalapi *GoogleCloudApihubV1ExternalApi
13921 urlParams_ gensupport.URLParams
13922 ctx_ context.Context
13923 header_ http.Header
13924 }
13925
13926 // Patch: Update an External API resource in the API hub. The following fields
13927 // can be updated: * display_name * description * documentation * endpoints *
13928 // paths The update_mask should be used to specify the fields being updated.
13929 //
13930 // - name: Identifier. Format:
13931 // `projects/{project}/locations/{location}/externalApi/{externalApi}`.
13932 func (r *ProjectsLocationsExternalApisService) Patch(name string, googlecloudapihubv1externalapi *GoogleCloudApihubV1ExternalApi) *ProjectsLocationsExternalApisPatchCall {
13933 c := &ProjectsLocationsExternalApisPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13934 c.name = name
13935 c.googlecloudapihubv1externalapi = googlecloudapihubv1externalapi
13936 return c
13937 }
13938
13939 // UpdateMask sets the optional parameter "updateMask": Required. The list of
13940 // fields to update.
13941 func (c *ProjectsLocationsExternalApisPatchCall) UpdateMask(updateMask string) *ProjectsLocationsExternalApisPatchCall {
13942 c.urlParams_.Set("updateMask", updateMask)
13943 return c
13944 }
13945
13946 // Fields allows partial responses to be retrieved. See
13947 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13948 // details.
13949 func (c *ProjectsLocationsExternalApisPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsExternalApisPatchCall {
13950 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13951 return c
13952 }
13953
13954 // Context sets the context to be used in this call's Do method.
13955 func (c *ProjectsLocationsExternalApisPatchCall) Context(ctx context.Context) *ProjectsLocationsExternalApisPatchCall {
13956 c.ctx_ = ctx
13957 return c
13958 }
13959
13960 // Header returns a http.Header that can be modified by the caller to add
13961 // headers to the request.
13962 func (c *ProjectsLocationsExternalApisPatchCall) Header() http.Header {
13963 if c.header_ == nil {
13964 c.header_ = make(http.Header)
13965 }
13966 return c.header_
13967 }
13968
13969 func (c *ProjectsLocationsExternalApisPatchCall) doRequest(alt string) (*http.Response, error) {
13970 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13971 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1externalapi)
13972 if err != nil {
13973 return nil, err
13974 }
13975 c.urlParams_.Set("alt", alt)
13976 c.urlParams_.Set("prettyPrint", "false")
13977 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13978 urls += "?" + c.urlParams_.Encode()
13979 req, err := http.NewRequest("PATCH", urls, body)
13980 if err != nil {
13981 return nil, err
13982 }
13983 req.Header = reqHeaders
13984 googleapi.Expand(req.URL, map[string]string{
13985 "name": c.name,
13986 })
13987 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13988 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13989 }
13990
13991 // Do executes the "apihub.projects.locations.externalApis.patch" call.
13992 // Any non-2xx status code is an error. Response headers are in either
13993 // *GoogleCloudApihubV1ExternalApi.ServerResponse.Header or (if a response was
13994 // returned at all) in error.(*googleapi.Error).Header. Use
13995 // googleapi.IsNotModified to check whether the returned error was because
13996 // http.StatusNotModified was returned.
13997 func (c *ProjectsLocationsExternalApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ExternalApi, error) {
13998 gensupport.SetOptions(c.urlParams_, opts...)
13999 res, err := c.doRequest("json")
14000 if res != nil && res.StatusCode == http.StatusNotModified {
14001 if res.Body != nil {
14002 res.Body.Close()
14003 }
14004 return nil, gensupport.WrapError(&googleapi.Error{
14005 Code: res.StatusCode,
14006 Header: res.Header,
14007 })
14008 }
14009 if err != nil {
14010 return nil, err
14011 }
14012 defer googleapi.CloseBody(res)
14013 if err := googleapi.CheckResponse(res); err != nil {
14014 return nil, gensupport.WrapError(err)
14015 }
14016 ret := &GoogleCloudApihubV1ExternalApi{
14017 ServerResponse: googleapi.ServerResponse{
14018 Header: res.Header,
14019 HTTPStatusCode: res.StatusCode,
14020 },
14021 }
14022 target := &ret
14023 b, err := gensupport.DecodeResponseBytes(target, res)
14024 if err != nil {
14025 return nil, err
14026 }
14027 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.externalApis.patch", "response", internallog.HTTPResponse(res, b))
14028 return ret, nil
14029 }
14030
14031 type ProjectsLocationsHostProjectRegistrationsCreateCall struct {
14032 s *Service
14033 parent string
14034 googlecloudapihubv1hostprojectregistration *GoogleCloudApihubV1HostProjectRegistration
14035 urlParams_ gensupport.URLParams
14036 ctx_ context.Context
14037 header_ http.Header
14038 }
14039
14040 // Create: Create a host project registration. A Google cloud project can be
14041 // registered as a host project if it is not attached as a runtime project to
14042 // another host project. A project can be registered as a host project only
14043 // once. Subsequent register calls for the same project will fail.
14044 //
14045 // - parent: The parent resource for the host project. Format:
14046 // `projects/{project}/locations/{location}`.
14047 func (r *ProjectsLocationsHostProjectRegistrationsService) Create(parent string, googlecloudapihubv1hostprojectregistration *GoogleCloudApihubV1HostProjectRegistration) *ProjectsLocationsHostProjectRegistrationsCreateCall {
14048 c := &ProjectsLocationsHostProjectRegistrationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14049 c.parent = parent
14050 c.googlecloudapihubv1hostprojectregistration = googlecloudapihubv1hostprojectregistration
14051 return c
14052 }
14053
14054 // HostProjectRegistrationId sets the optional parameter
14055 // "hostProjectRegistrationId": Required. The ID to use for the Host Project
14056 // Registration, which will become the final component of the host project
14057 // registration's resource name. The ID must be the same as the Google cloud
14058 // project specified in the host_project_registration.gcp_project field.
14059 func (c *ProjectsLocationsHostProjectRegistrationsCreateCall) HostProjectRegistrationId(hostProjectRegistrationId string) *ProjectsLocationsHostProjectRegistrationsCreateCall {
14060 c.urlParams_.Set("hostProjectRegistrationId", hostProjectRegistrationId)
14061 return c
14062 }
14063
14064 // Fields allows partial responses to be retrieved. See
14065 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14066 // details.
14067 func (c *ProjectsLocationsHostProjectRegistrationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHostProjectRegistrationsCreateCall {
14068 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14069 return c
14070 }
14071
14072 // Context sets the context to be used in this call's Do method.
14073 func (c *ProjectsLocationsHostProjectRegistrationsCreateCall) Context(ctx context.Context) *ProjectsLocationsHostProjectRegistrationsCreateCall {
14074 c.ctx_ = ctx
14075 return c
14076 }
14077
14078 // Header returns a http.Header that can be modified by the caller to add
14079 // headers to the request.
14080 func (c *ProjectsLocationsHostProjectRegistrationsCreateCall) Header() http.Header {
14081 if c.header_ == nil {
14082 c.header_ = make(http.Header)
14083 }
14084 return c.header_
14085 }
14086
14087 func (c *ProjectsLocationsHostProjectRegistrationsCreateCall) doRequest(alt string) (*http.Response, error) {
14088 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14089 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1hostprojectregistration)
14090 if err != nil {
14091 return nil, err
14092 }
14093 c.urlParams_.Set("alt", alt)
14094 c.urlParams_.Set("prettyPrint", "false")
14095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostProjectRegistrations")
14096 urls += "?" + c.urlParams_.Encode()
14097 req, err := http.NewRequest("POST", urls, body)
14098 if err != nil {
14099 return nil, err
14100 }
14101 req.Header = reqHeaders
14102 googleapi.Expand(req.URL, map[string]string{
14103 "parent": c.parent,
14104 })
14105 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.hostProjectRegistrations.create", "request", internallog.HTTPRequest(req, body.Bytes()))
14106 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14107 }
14108
14109 // Do executes the "apihub.projects.locations.hostProjectRegistrations.create" call.
14110 // Any non-2xx status code is an error. Response headers are in either
14111 // *GoogleCloudApihubV1HostProjectRegistration.ServerResponse.Header or (if a
14112 // response was returned at all) in error.(*googleapi.Error).Header. Use
14113 // googleapi.IsNotModified to check whether the returned error was because
14114 // http.StatusNotModified was returned.
14115 func (c *ProjectsLocationsHostProjectRegistrationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1HostProjectRegistration, error) {
14116 gensupport.SetOptions(c.urlParams_, opts...)
14117 res, err := c.doRequest("json")
14118 if res != nil && res.StatusCode == http.StatusNotModified {
14119 if res.Body != nil {
14120 res.Body.Close()
14121 }
14122 return nil, gensupport.WrapError(&googleapi.Error{
14123 Code: res.StatusCode,
14124 Header: res.Header,
14125 })
14126 }
14127 if err != nil {
14128 return nil, err
14129 }
14130 defer googleapi.CloseBody(res)
14131 if err := googleapi.CheckResponse(res); err != nil {
14132 return nil, gensupport.WrapError(err)
14133 }
14134 ret := &GoogleCloudApihubV1HostProjectRegistration{
14135 ServerResponse: googleapi.ServerResponse{
14136 Header: res.Header,
14137 HTTPStatusCode: res.StatusCode,
14138 },
14139 }
14140 target := &ret
14141 b, err := gensupport.DecodeResponseBytes(target, res)
14142 if err != nil {
14143 return nil, err
14144 }
14145 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.hostProjectRegistrations.create", "response", internallog.HTTPResponse(res, b))
14146 return ret, nil
14147 }
14148
14149 type ProjectsLocationsHostProjectRegistrationsGetCall struct {
14150 s *Service
14151 name string
14152 urlParams_ gensupport.URLParams
14153 ifNoneMatch_ string
14154 ctx_ context.Context
14155 header_ http.Header
14156 }
14157
14158 // Get: Get a host project registration.
14159 //
14160 // - name: Host project registration resource name.
14161 // projects/{project}/locations/{location}/hostProjectRegistrations/{host_proj
14162 // ect_registration_id}.
14163 func (r *ProjectsLocationsHostProjectRegistrationsService) Get(name string) *ProjectsLocationsHostProjectRegistrationsGetCall {
14164 c := &ProjectsLocationsHostProjectRegistrationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14165 c.name = name
14166 return c
14167 }
14168
14169 // Fields allows partial responses to be retrieved. See
14170 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14171 // details.
14172 func (c *ProjectsLocationsHostProjectRegistrationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHostProjectRegistrationsGetCall {
14173 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14174 return c
14175 }
14176
14177 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14178 // object's ETag matches the given value. This is useful for getting updates
14179 // only after the object has changed since the last request.
14180 func (c *ProjectsLocationsHostProjectRegistrationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHostProjectRegistrationsGetCall {
14181 c.ifNoneMatch_ = entityTag
14182 return c
14183 }
14184
14185 // Context sets the context to be used in this call's Do method.
14186 func (c *ProjectsLocationsHostProjectRegistrationsGetCall) Context(ctx context.Context) *ProjectsLocationsHostProjectRegistrationsGetCall {
14187 c.ctx_ = ctx
14188 return c
14189 }
14190
14191 // Header returns a http.Header that can be modified by the caller to add
14192 // headers to the request.
14193 func (c *ProjectsLocationsHostProjectRegistrationsGetCall) Header() http.Header {
14194 if c.header_ == nil {
14195 c.header_ = make(http.Header)
14196 }
14197 return c.header_
14198 }
14199
14200 func (c *ProjectsLocationsHostProjectRegistrationsGetCall) doRequest(alt string) (*http.Response, error) {
14201 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14202 if c.ifNoneMatch_ != "" {
14203 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14204 }
14205 c.urlParams_.Set("alt", alt)
14206 c.urlParams_.Set("prettyPrint", "false")
14207 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14208 urls += "?" + c.urlParams_.Encode()
14209 req, err := http.NewRequest("GET", urls, nil)
14210 if err != nil {
14211 return nil, err
14212 }
14213 req.Header = reqHeaders
14214 googleapi.Expand(req.URL, map[string]string{
14215 "name": c.name,
14216 })
14217 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.hostProjectRegistrations.get", "request", internallog.HTTPRequest(req, nil))
14218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14219 }
14220
14221 // Do executes the "apihub.projects.locations.hostProjectRegistrations.get" call.
14222 // Any non-2xx status code is an error. Response headers are in either
14223 // *GoogleCloudApihubV1HostProjectRegistration.ServerResponse.Header or (if a
14224 // response was returned at all) in error.(*googleapi.Error).Header. Use
14225 // googleapi.IsNotModified to check whether the returned error was because
14226 // http.StatusNotModified was returned.
14227 func (c *ProjectsLocationsHostProjectRegistrationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1HostProjectRegistration, error) {
14228 gensupport.SetOptions(c.urlParams_, opts...)
14229 res, err := c.doRequest("json")
14230 if res != nil && res.StatusCode == http.StatusNotModified {
14231 if res.Body != nil {
14232 res.Body.Close()
14233 }
14234 return nil, gensupport.WrapError(&googleapi.Error{
14235 Code: res.StatusCode,
14236 Header: res.Header,
14237 })
14238 }
14239 if err != nil {
14240 return nil, err
14241 }
14242 defer googleapi.CloseBody(res)
14243 if err := googleapi.CheckResponse(res); err != nil {
14244 return nil, gensupport.WrapError(err)
14245 }
14246 ret := &GoogleCloudApihubV1HostProjectRegistration{
14247 ServerResponse: googleapi.ServerResponse{
14248 Header: res.Header,
14249 HTTPStatusCode: res.StatusCode,
14250 },
14251 }
14252 target := &ret
14253 b, err := gensupport.DecodeResponseBytes(target, res)
14254 if err != nil {
14255 return nil, err
14256 }
14257 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.hostProjectRegistrations.get", "response", internallog.HTTPResponse(res, b))
14258 return ret, nil
14259 }
14260
14261 type ProjectsLocationsHostProjectRegistrationsListCall struct {
14262 s *Service
14263 parent string
14264 urlParams_ gensupport.URLParams
14265 ifNoneMatch_ string
14266 ctx_ context.Context
14267 header_ http.Header
14268 }
14269
14270 // List: Lists host project registrations.
14271 //
14272 // - parent: The parent, which owns this collection of host projects. Format:
14273 // `projects/*/locations/*`.
14274 func (r *ProjectsLocationsHostProjectRegistrationsService) List(parent string) *ProjectsLocationsHostProjectRegistrationsListCall {
14275 c := &ProjectsLocationsHostProjectRegistrationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14276 c.parent = parent
14277 return c
14278 }
14279
14280 // Filter sets the optional parameter "filter": An expression that filters the
14281 // list of HostProjectRegistrations. A filter expression consists of a field
14282 // name, a comparison operator, and a value for filtering. The value must be a
14283 // string. All standard operators as documented at https://google.aip.dev/160
14284 // are supported. The following fields in the `HostProjectRegistration` are
14285 // eligible for filtering: * `name` - The name of the HostProjectRegistration.
14286 // * `create_time` - The time at which the HostProjectRegistration was created.
14287 // The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339]
14288 // format. * `gcp_project` - The Google cloud project associated with the
14289 // HostProjectRegistration.
14290 func (c *ProjectsLocationsHostProjectRegistrationsListCall) Filter(filter string) *ProjectsLocationsHostProjectRegistrationsListCall {
14291 c.urlParams_.Set("filter", filter)
14292 return c
14293 }
14294
14295 // OrderBy sets the optional parameter "orderBy": Hint for how to order the
14296 // results.
14297 func (c *ProjectsLocationsHostProjectRegistrationsListCall) OrderBy(orderBy string) *ProjectsLocationsHostProjectRegistrationsListCall {
14298 c.urlParams_.Set("orderBy", orderBy)
14299 return c
14300 }
14301
14302 // PageSize sets the optional parameter "pageSize": The maximum number of host
14303 // project registrations to return. The service may return fewer than this
14304 // value. If unspecified, at most 50 host project registrations will be
14305 // returned. The maximum value is 1000; values above 1000 will be coerced to
14306 // 1000.
14307 func (c *ProjectsLocationsHostProjectRegistrationsListCall) PageSize(pageSize int64) *ProjectsLocationsHostProjectRegistrationsListCall {
14308 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14309 return c
14310 }
14311
14312 // PageToken sets the optional parameter "pageToken": A page token, received
14313 // from a previous `ListHostProjectRegistrations` call. Provide this to
14314 // retrieve the subsequent page. When paginating, all other parameters (except
14315 // page_size) provided to `ListHostProjectRegistrations` must match the call
14316 // that provided the page token.
14317 func (c *ProjectsLocationsHostProjectRegistrationsListCall) PageToken(pageToken string) *ProjectsLocationsHostProjectRegistrationsListCall {
14318 c.urlParams_.Set("pageToken", pageToken)
14319 return c
14320 }
14321
14322 // Fields allows partial responses to be retrieved. See
14323 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14324 // details.
14325 func (c *ProjectsLocationsHostProjectRegistrationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHostProjectRegistrationsListCall {
14326 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14327 return c
14328 }
14329
14330 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14331 // object's ETag matches the given value. This is useful for getting updates
14332 // only after the object has changed since the last request.
14333 func (c *ProjectsLocationsHostProjectRegistrationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHostProjectRegistrationsListCall {
14334 c.ifNoneMatch_ = entityTag
14335 return c
14336 }
14337
14338 // Context sets the context to be used in this call's Do method.
14339 func (c *ProjectsLocationsHostProjectRegistrationsListCall) Context(ctx context.Context) *ProjectsLocationsHostProjectRegistrationsListCall {
14340 c.ctx_ = ctx
14341 return c
14342 }
14343
14344 // Header returns a http.Header that can be modified by the caller to add
14345 // headers to the request.
14346 func (c *ProjectsLocationsHostProjectRegistrationsListCall) Header() http.Header {
14347 if c.header_ == nil {
14348 c.header_ = make(http.Header)
14349 }
14350 return c.header_
14351 }
14352
14353 func (c *ProjectsLocationsHostProjectRegistrationsListCall) doRequest(alt string) (*http.Response, error) {
14354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14355 if c.ifNoneMatch_ != "" {
14356 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14357 }
14358 c.urlParams_.Set("alt", alt)
14359 c.urlParams_.Set("prettyPrint", "false")
14360 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostProjectRegistrations")
14361 urls += "?" + c.urlParams_.Encode()
14362 req, err := http.NewRequest("GET", urls, nil)
14363 if err != nil {
14364 return nil, err
14365 }
14366 req.Header = reqHeaders
14367 googleapi.Expand(req.URL, map[string]string{
14368 "parent": c.parent,
14369 })
14370 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.hostProjectRegistrations.list", "request", internallog.HTTPRequest(req, nil))
14371 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14372 }
14373
14374 // Do executes the "apihub.projects.locations.hostProjectRegistrations.list" call.
14375 // Any non-2xx status code is an error. Response headers are in either
14376 // *GoogleCloudApihubV1ListHostProjectRegistrationsResponse.ServerResponse.Heade
14377 // r or (if a response was returned at all) in error.(*googleapi.Error).Header.
14378 // Use googleapi.IsNotModified to check whether the returned error was because
14379 // http.StatusNotModified was returned.
14380 func (c *ProjectsLocationsHostProjectRegistrationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListHostProjectRegistrationsResponse, error) {
14381 gensupport.SetOptions(c.urlParams_, opts...)
14382 res, err := c.doRequest("json")
14383 if res != nil && res.StatusCode == http.StatusNotModified {
14384 if res.Body != nil {
14385 res.Body.Close()
14386 }
14387 return nil, gensupport.WrapError(&googleapi.Error{
14388 Code: res.StatusCode,
14389 Header: res.Header,
14390 })
14391 }
14392 if err != nil {
14393 return nil, err
14394 }
14395 defer googleapi.CloseBody(res)
14396 if err := googleapi.CheckResponse(res); err != nil {
14397 return nil, gensupport.WrapError(err)
14398 }
14399 ret := &GoogleCloudApihubV1ListHostProjectRegistrationsResponse{
14400 ServerResponse: googleapi.ServerResponse{
14401 Header: res.Header,
14402 HTTPStatusCode: res.StatusCode,
14403 },
14404 }
14405 target := &ret
14406 b, err := gensupport.DecodeResponseBytes(target, res)
14407 if err != nil {
14408 return nil, err
14409 }
14410 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.hostProjectRegistrations.list", "response", internallog.HTTPResponse(res, b))
14411 return ret, nil
14412 }
14413
14414 // Pages invokes f for each page of results.
14415 // A non-nil error returned from f will halt the iteration.
14416 // The provided context supersedes any context provided to the Context method.
14417 func (c *ProjectsLocationsHostProjectRegistrationsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListHostProjectRegistrationsResponse) error) error {
14418 c.ctx_ = ctx
14419 defer c.PageToken(c.urlParams_.Get("pageToken"))
14420 for {
14421 x, err := c.Do()
14422 if err != nil {
14423 return err
14424 }
14425 if err := f(x); err != nil {
14426 return err
14427 }
14428 if x.NextPageToken == "" {
14429 return nil
14430 }
14431 c.PageToken(x.NextPageToken)
14432 }
14433 }
14434
14435 type ProjectsLocationsOperationsCancelCall struct {
14436 s *Service
14437 name string
14438 googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
14439 urlParams_ gensupport.URLParams
14440 ctx_ context.Context
14441 header_ http.Header
14442 }
14443
14444 // Cancel: Starts asynchronous cancellation on a long-running operation. The
14445 // server makes a best effort to cancel the operation, but success is not
14446 // guaranteed. If the server doesn't support this method, it returns
14447 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
14448 // other methods to check whether the cancellation succeeded or whether the
14449 // operation completed despite cancellation. On successful cancellation, the
14450 // operation is not deleted; instead, it becomes an operation with an
14451 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
14452 // `Code.CANCELLED`.
14453 //
14454 // - name: The name of the operation resource to be cancelled.
14455 func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
14456 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14457 c.name = name
14458 c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
14459 return c
14460 }
14461
14462 // Fields allows partial responses to be retrieved. See
14463 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14464 // details.
14465 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
14466 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14467 return c
14468 }
14469
14470 // Context sets the context to be used in this call's Do method.
14471 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
14472 c.ctx_ = ctx
14473 return c
14474 }
14475
14476 // Header returns a http.Header that can be modified by the caller to add
14477 // headers to the request.
14478 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
14479 if c.header_ == nil {
14480 c.header_ = make(http.Header)
14481 }
14482 return c.header_
14483 }
14484
14485 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
14486 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14487 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlelongrunningcanceloperationrequest)
14488 if err != nil {
14489 return nil, err
14490 }
14491 c.urlParams_.Set("alt", alt)
14492 c.urlParams_.Set("prettyPrint", "false")
14493 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
14494 urls += "?" + c.urlParams_.Encode()
14495 req, err := http.NewRequest("POST", urls, body)
14496 if err != nil {
14497 return nil, err
14498 }
14499 req.Header = reqHeaders
14500 googleapi.Expand(req.URL, map[string]string{
14501 "name": c.name,
14502 })
14503 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
14504 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14505 }
14506
14507 // Do executes the "apihub.projects.locations.operations.cancel" call.
14508 // Any non-2xx status code is an error. Response headers are in either
14509 // *Empty.ServerResponse.Header or (if a response was returned at all) in
14510 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14511 // whether the returned error was because http.StatusNotModified was returned.
14512 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14513 gensupport.SetOptions(c.urlParams_, opts...)
14514 res, err := c.doRequest("json")
14515 if res != nil && res.StatusCode == http.StatusNotModified {
14516 if res.Body != nil {
14517 res.Body.Close()
14518 }
14519 return nil, gensupport.WrapError(&googleapi.Error{
14520 Code: res.StatusCode,
14521 Header: res.Header,
14522 })
14523 }
14524 if err != nil {
14525 return nil, err
14526 }
14527 defer googleapi.CloseBody(res)
14528 if err := googleapi.CheckResponse(res); err != nil {
14529 return nil, gensupport.WrapError(err)
14530 }
14531 ret := &Empty{
14532 ServerResponse: googleapi.ServerResponse{
14533 Header: res.Header,
14534 HTTPStatusCode: res.StatusCode,
14535 },
14536 }
14537 target := &ret
14538 b, err := gensupport.DecodeResponseBytes(target, res)
14539 if err != nil {
14540 return nil, err
14541 }
14542 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
14543 return ret, nil
14544 }
14545
14546 type ProjectsLocationsOperationsDeleteCall struct {
14547 s *Service
14548 name string
14549 urlParams_ gensupport.URLParams
14550 ctx_ context.Context
14551 header_ http.Header
14552 }
14553
14554 // Delete: Deletes a long-running operation. This method indicates that the
14555 // client is no longer interested in the operation result. It does not cancel
14556 // the operation. If the server doesn't support this method, it returns
14557 // `google.rpc.Code.UNIMPLEMENTED`.
14558 //
14559 // - name: The name of the operation resource to be deleted.
14560 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
14561 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14562 c.name = name
14563 return c
14564 }
14565
14566 // Fields allows partial responses to be retrieved. See
14567 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14568 // details.
14569 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
14570 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14571 return c
14572 }
14573
14574 // Context sets the context to be used in this call's Do method.
14575 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
14576 c.ctx_ = ctx
14577 return c
14578 }
14579
14580 // Header returns a http.Header that can be modified by the caller to add
14581 // headers to the request.
14582 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
14583 if c.header_ == nil {
14584 c.header_ = make(http.Header)
14585 }
14586 return c.header_
14587 }
14588
14589 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
14590 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14591 c.urlParams_.Set("alt", alt)
14592 c.urlParams_.Set("prettyPrint", "false")
14593 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14594 urls += "?" + c.urlParams_.Encode()
14595 req, err := http.NewRequest("DELETE", urls, nil)
14596 if err != nil {
14597 return nil, err
14598 }
14599 req.Header = reqHeaders
14600 googleapi.Expand(req.URL, map[string]string{
14601 "name": c.name,
14602 })
14603 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
14604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14605 }
14606
14607 // Do executes the "apihub.projects.locations.operations.delete" call.
14608 // Any non-2xx status code is an error. Response headers are in either
14609 // *Empty.ServerResponse.Header or (if a response was returned at all) in
14610 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14611 // whether the returned error was because http.StatusNotModified was returned.
14612 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14613 gensupport.SetOptions(c.urlParams_, opts...)
14614 res, err := c.doRequest("json")
14615 if res != nil && res.StatusCode == http.StatusNotModified {
14616 if res.Body != nil {
14617 res.Body.Close()
14618 }
14619 return nil, gensupport.WrapError(&googleapi.Error{
14620 Code: res.StatusCode,
14621 Header: res.Header,
14622 })
14623 }
14624 if err != nil {
14625 return nil, err
14626 }
14627 defer googleapi.CloseBody(res)
14628 if err := googleapi.CheckResponse(res); err != nil {
14629 return nil, gensupport.WrapError(err)
14630 }
14631 ret := &Empty{
14632 ServerResponse: googleapi.ServerResponse{
14633 Header: res.Header,
14634 HTTPStatusCode: res.StatusCode,
14635 },
14636 }
14637 target := &ret
14638 b, err := gensupport.DecodeResponseBytes(target, res)
14639 if err != nil {
14640 return nil, err
14641 }
14642 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
14643 return ret, nil
14644 }
14645
14646 type ProjectsLocationsOperationsGetCall struct {
14647 s *Service
14648 name string
14649 urlParams_ gensupport.URLParams
14650 ifNoneMatch_ string
14651 ctx_ context.Context
14652 header_ http.Header
14653 }
14654
14655 // Get: Gets the latest state of a long-running operation. Clients can use this
14656 // method to poll the operation result at intervals as recommended by the API
14657 // service.
14658 //
14659 // - name: The name of the operation resource.
14660 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
14661 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14662 c.name = name
14663 return c
14664 }
14665
14666 // Fields allows partial responses to be retrieved. See
14667 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14668 // details.
14669 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
14670 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14671 return c
14672 }
14673
14674 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14675 // object's ETag matches the given value. This is useful for getting updates
14676 // only after the object has changed since the last request.
14677 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
14678 c.ifNoneMatch_ = entityTag
14679 return c
14680 }
14681
14682 // Context sets the context to be used in this call's Do method.
14683 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
14684 c.ctx_ = ctx
14685 return c
14686 }
14687
14688 // Header returns a http.Header that can be modified by the caller to add
14689 // headers to the request.
14690 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
14691 if c.header_ == nil {
14692 c.header_ = make(http.Header)
14693 }
14694 return c.header_
14695 }
14696
14697 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
14698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14699 if c.ifNoneMatch_ != "" {
14700 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14701 }
14702 c.urlParams_.Set("alt", alt)
14703 c.urlParams_.Set("prettyPrint", "false")
14704 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14705 urls += "?" + c.urlParams_.Encode()
14706 req, err := http.NewRequest("GET", urls, nil)
14707 if err != nil {
14708 return nil, err
14709 }
14710 req.Header = reqHeaders
14711 googleapi.Expand(req.URL, map[string]string{
14712 "name": c.name,
14713 })
14714 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
14715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14716 }
14717
14718 // Do executes the "apihub.projects.locations.operations.get" call.
14719 // Any non-2xx status code is an error. Response headers are in either
14720 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
14721 // returned at all) in error.(*googleapi.Error).Header. Use
14722 // googleapi.IsNotModified to check whether the returned error was because
14723 // http.StatusNotModified was returned.
14724 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
14725 gensupport.SetOptions(c.urlParams_, opts...)
14726 res, err := c.doRequest("json")
14727 if res != nil && res.StatusCode == http.StatusNotModified {
14728 if res.Body != nil {
14729 res.Body.Close()
14730 }
14731 return nil, gensupport.WrapError(&googleapi.Error{
14732 Code: res.StatusCode,
14733 Header: res.Header,
14734 })
14735 }
14736 if err != nil {
14737 return nil, err
14738 }
14739 defer googleapi.CloseBody(res)
14740 if err := googleapi.CheckResponse(res); err != nil {
14741 return nil, gensupport.WrapError(err)
14742 }
14743 ret := &GoogleLongrunningOperation{
14744 ServerResponse: googleapi.ServerResponse{
14745 Header: res.Header,
14746 HTTPStatusCode: res.StatusCode,
14747 },
14748 }
14749 target := &ret
14750 b, err := gensupport.DecodeResponseBytes(target, res)
14751 if err != nil {
14752 return nil, err
14753 }
14754 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
14755 return ret, nil
14756 }
14757
14758 type ProjectsLocationsOperationsListCall struct {
14759 s *Service
14760 name string
14761 urlParams_ gensupport.URLParams
14762 ifNoneMatch_ string
14763 ctx_ context.Context
14764 header_ http.Header
14765 }
14766
14767 // List: Lists operations that match the specified filter in the request. If
14768 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
14769 //
14770 // - name: The name of the operation's parent resource.
14771 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
14772 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14773 c.name = name
14774 return c
14775 }
14776
14777 // Filter sets the optional parameter "filter": The standard list filter.
14778 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
14779 c.urlParams_.Set("filter", filter)
14780 return c
14781 }
14782
14783 // PageSize sets the optional parameter "pageSize": The standard list page
14784 // size.
14785 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
14786 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14787 return c
14788 }
14789
14790 // PageToken sets the optional parameter "pageToken": The standard list page
14791 // token.
14792 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
14793 c.urlParams_.Set("pageToken", pageToken)
14794 return c
14795 }
14796
14797 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
14798 // When set to `true`, operations that are reachable are returned as normal,
14799 // and those that are unreachable are returned in the
14800 // ListOperationsResponse.unreachable field. This can only be `true` when
14801 // reading across collections. For example, when `parent` is set to
14802 // "projects/example/locations/-". This field is not supported by default and
14803 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
14804 // otherwise in service or product specific documentation.
14805 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
14806 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
14807 return c
14808 }
14809
14810 // Fields allows partial responses to be retrieved. See
14811 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14812 // details.
14813 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
14814 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14815 return c
14816 }
14817
14818 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14819 // object's ETag matches the given value. This is useful for getting updates
14820 // only after the object has changed since the last request.
14821 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
14822 c.ifNoneMatch_ = entityTag
14823 return c
14824 }
14825
14826 // Context sets the context to be used in this call's Do method.
14827 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
14828 c.ctx_ = ctx
14829 return c
14830 }
14831
14832 // Header returns a http.Header that can be modified by the caller to add
14833 // headers to the request.
14834 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
14835 if c.header_ == nil {
14836 c.header_ = make(http.Header)
14837 }
14838 return c.header_
14839 }
14840
14841 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
14842 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14843 if c.ifNoneMatch_ != "" {
14844 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14845 }
14846 c.urlParams_.Set("alt", alt)
14847 c.urlParams_.Set("prettyPrint", "false")
14848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
14849 urls += "?" + c.urlParams_.Encode()
14850 req, err := http.NewRequest("GET", urls, nil)
14851 if err != nil {
14852 return nil, err
14853 }
14854 req.Header = reqHeaders
14855 googleapi.Expand(req.URL, map[string]string{
14856 "name": c.name,
14857 })
14858 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
14859 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14860 }
14861
14862 // Do executes the "apihub.projects.locations.operations.list" call.
14863 // Any non-2xx status code is an error. Response headers are in either
14864 // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
14865 // response was returned at all) in error.(*googleapi.Error).Header. Use
14866 // googleapi.IsNotModified to check whether the returned error was because
14867 // http.StatusNotModified was returned.
14868 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
14869 gensupport.SetOptions(c.urlParams_, opts...)
14870 res, err := c.doRequest("json")
14871 if res != nil && res.StatusCode == http.StatusNotModified {
14872 if res.Body != nil {
14873 res.Body.Close()
14874 }
14875 return nil, gensupport.WrapError(&googleapi.Error{
14876 Code: res.StatusCode,
14877 Header: res.Header,
14878 })
14879 }
14880 if err != nil {
14881 return nil, err
14882 }
14883 defer googleapi.CloseBody(res)
14884 if err := googleapi.CheckResponse(res); err != nil {
14885 return nil, gensupport.WrapError(err)
14886 }
14887 ret := &GoogleLongrunningListOperationsResponse{
14888 ServerResponse: googleapi.ServerResponse{
14889 Header: res.Header,
14890 HTTPStatusCode: res.StatusCode,
14891 },
14892 }
14893 target := &ret
14894 b, err := gensupport.DecodeResponseBytes(target, res)
14895 if err != nil {
14896 return nil, err
14897 }
14898 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
14899 return ret, nil
14900 }
14901
14902 // Pages invokes f for each page of results.
14903 // A non-nil error returned from f will halt the iteration.
14904 // The provided context supersedes any context provided to the Context method.
14905 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
14906 c.ctx_ = ctx
14907 defer c.PageToken(c.urlParams_.Get("pageToken"))
14908 for {
14909 x, err := c.Do()
14910 if err != nil {
14911 return err
14912 }
14913 if err := f(x); err != nil {
14914 return err
14915 }
14916 if x.NextPageToken == "" {
14917 return nil
14918 }
14919 c.PageToken(x.NextPageToken)
14920 }
14921 }
14922
14923 type ProjectsLocationsPluginsCreateCall struct {
14924 s *Service
14925 parent string
14926 googlecloudapihubv1plugin *GoogleCloudApihubV1Plugin
14927 urlParams_ gensupport.URLParams
14928 ctx_ context.Context
14929 header_ http.Header
14930 }
14931
14932 // Create: Create an API Hub plugin resource in the API hub. Once a plugin is
14933 // created, it can be used to create plugin instances.
14934 //
14935 // - parent: The parent resource where this plugin will be created. Format:
14936 // `projects/{project}/locations/{location}`.
14937 func (r *ProjectsLocationsPluginsService) Create(parent string, googlecloudapihubv1plugin *GoogleCloudApihubV1Plugin) *ProjectsLocationsPluginsCreateCall {
14938 c := &ProjectsLocationsPluginsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14939 c.parent = parent
14940 c.googlecloudapihubv1plugin = googlecloudapihubv1plugin
14941 return c
14942 }
14943
14944 // PluginId sets the optional parameter "pluginId": The ID to use for the
14945 // Plugin resource, which will become the final component of the Plugin's
14946 // resource name. This field is optional. * If provided, the same will be used.
14947 // The service will throw an error if the specified id is already used by
14948 // another Plugin resource in the API hub instance. * If not provided, a system
14949 // generated id will be used. This value should be 4-63 characters, overall
14950 // resource name which will be of format
14951 // `projects/{project}/locations/{location}/plugins/{plugin}`, its length is
14952 // limited to 1000 characters and valid characters are /a-z[0-9]-_/.
14953 func (c *ProjectsLocationsPluginsCreateCall) PluginId(pluginId string) *ProjectsLocationsPluginsCreateCall {
14954 c.urlParams_.Set("pluginId", pluginId)
14955 return c
14956 }
14957
14958 // Fields allows partial responses to be retrieved. See
14959 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14960 // details.
14961 func (c *ProjectsLocationsPluginsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsCreateCall {
14962 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14963 return c
14964 }
14965
14966 // Context sets the context to be used in this call's Do method.
14967 func (c *ProjectsLocationsPluginsCreateCall) Context(ctx context.Context) *ProjectsLocationsPluginsCreateCall {
14968 c.ctx_ = ctx
14969 return c
14970 }
14971
14972 // Header returns a http.Header that can be modified by the caller to add
14973 // headers to the request.
14974 func (c *ProjectsLocationsPluginsCreateCall) Header() http.Header {
14975 if c.header_ == nil {
14976 c.header_ = make(http.Header)
14977 }
14978 return c.header_
14979 }
14980
14981 func (c *ProjectsLocationsPluginsCreateCall) doRequest(alt string) (*http.Response, error) {
14982 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14983 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1plugin)
14984 if err != nil {
14985 return nil, err
14986 }
14987 c.urlParams_.Set("alt", alt)
14988 c.urlParams_.Set("prettyPrint", "false")
14989 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/plugins")
14990 urls += "?" + c.urlParams_.Encode()
14991 req, err := http.NewRequest("POST", urls, body)
14992 if err != nil {
14993 return nil, err
14994 }
14995 req.Header = reqHeaders
14996 googleapi.Expand(req.URL, map[string]string{
14997 "parent": c.parent,
14998 })
14999 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.create", "request", internallog.HTTPRequest(req, body.Bytes()))
15000 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15001 }
15002
15003 // Do executes the "apihub.projects.locations.plugins.create" call.
15004 // Any non-2xx status code is an error. Response headers are in either
15005 // *GoogleCloudApihubV1Plugin.ServerResponse.Header or (if a response was
15006 // returned at all) in error.(*googleapi.Error).Header. Use
15007 // googleapi.IsNotModified to check whether the returned error was because
15008 // http.StatusNotModified was returned.
15009 func (c *ProjectsLocationsPluginsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Plugin, error) {
15010 gensupport.SetOptions(c.urlParams_, opts...)
15011 res, err := c.doRequest("json")
15012 if res != nil && res.StatusCode == http.StatusNotModified {
15013 if res.Body != nil {
15014 res.Body.Close()
15015 }
15016 return nil, gensupport.WrapError(&googleapi.Error{
15017 Code: res.StatusCode,
15018 Header: res.Header,
15019 })
15020 }
15021 if err != nil {
15022 return nil, err
15023 }
15024 defer googleapi.CloseBody(res)
15025 if err := googleapi.CheckResponse(res); err != nil {
15026 return nil, gensupport.WrapError(err)
15027 }
15028 ret := &GoogleCloudApihubV1Plugin{
15029 ServerResponse: googleapi.ServerResponse{
15030 Header: res.Header,
15031 HTTPStatusCode: res.StatusCode,
15032 },
15033 }
15034 target := &ret
15035 b, err := gensupport.DecodeResponseBytes(target, res)
15036 if err != nil {
15037 return nil, err
15038 }
15039 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.create", "response", internallog.HTTPResponse(res, b))
15040 return ret, nil
15041 }
15042
15043 type ProjectsLocationsPluginsDeleteCall struct {
15044 s *Service
15045 name string
15046 urlParams_ gensupport.URLParams
15047 ctx_ context.Context
15048 header_ http.Header
15049 }
15050
15051 // Delete: Delete a Plugin in API hub. Note, only user owned plugins can be
15052 // deleted via this method.
15053 //
15054 // - name: The name of the Plugin resource to delete. Format:
15055 // `projects/{project}/locations/{location}/plugins/{plugin}`.
15056 func (r *ProjectsLocationsPluginsService) Delete(name string) *ProjectsLocationsPluginsDeleteCall {
15057 c := &ProjectsLocationsPluginsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15058 c.name = name
15059 return c
15060 }
15061
15062 // Fields allows partial responses to be retrieved. See
15063 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15064 // details.
15065 func (c *ProjectsLocationsPluginsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsDeleteCall {
15066 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15067 return c
15068 }
15069
15070 // Context sets the context to be used in this call's Do method.
15071 func (c *ProjectsLocationsPluginsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPluginsDeleteCall {
15072 c.ctx_ = ctx
15073 return c
15074 }
15075
15076 // Header returns a http.Header that can be modified by the caller to add
15077 // headers to the request.
15078 func (c *ProjectsLocationsPluginsDeleteCall) Header() http.Header {
15079 if c.header_ == nil {
15080 c.header_ = make(http.Header)
15081 }
15082 return c.header_
15083 }
15084
15085 func (c *ProjectsLocationsPluginsDeleteCall) doRequest(alt string) (*http.Response, error) {
15086 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15087 c.urlParams_.Set("alt", alt)
15088 c.urlParams_.Set("prettyPrint", "false")
15089 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15090 urls += "?" + c.urlParams_.Encode()
15091 req, err := http.NewRequest("DELETE", urls, nil)
15092 if err != nil {
15093 return nil, err
15094 }
15095 req.Header = reqHeaders
15096 googleapi.Expand(req.URL, map[string]string{
15097 "name": c.name,
15098 })
15099 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.delete", "request", internallog.HTTPRequest(req, nil))
15100 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15101 }
15102
15103 // Do executes the "apihub.projects.locations.plugins.delete" call.
15104 // Any non-2xx status code is an error. Response headers are in either
15105 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
15106 // returned at all) in error.(*googleapi.Error).Header. Use
15107 // googleapi.IsNotModified to check whether the returned error was because
15108 // http.StatusNotModified was returned.
15109 func (c *ProjectsLocationsPluginsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
15110 gensupport.SetOptions(c.urlParams_, opts...)
15111 res, err := c.doRequest("json")
15112 if res != nil && res.StatusCode == http.StatusNotModified {
15113 if res.Body != nil {
15114 res.Body.Close()
15115 }
15116 return nil, gensupport.WrapError(&googleapi.Error{
15117 Code: res.StatusCode,
15118 Header: res.Header,
15119 })
15120 }
15121 if err != nil {
15122 return nil, err
15123 }
15124 defer googleapi.CloseBody(res)
15125 if err := googleapi.CheckResponse(res); err != nil {
15126 return nil, gensupport.WrapError(err)
15127 }
15128 ret := &GoogleLongrunningOperation{
15129 ServerResponse: googleapi.ServerResponse{
15130 Header: res.Header,
15131 HTTPStatusCode: res.StatusCode,
15132 },
15133 }
15134 target := &ret
15135 b, err := gensupport.DecodeResponseBytes(target, res)
15136 if err != nil {
15137 return nil, err
15138 }
15139 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.delete", "response", internallog.HTTPResponse(res, b))
15140 return ret, nil
15141 }
15142
15143 type ProjectsLocationsPluginsDisableCall struct {
15144 s *Service
15145 name string
15146 googlecloudapihubv1disablepluginrequest *GoogleCloudApihubV1DisablePluginRequest
15147 urlParams_ gensupport.URLParams
15148 ctx_ context.Context
15149 header_ http.Header
15150 }
15151
15152 // Disable: Disables a plugin. The `state` of the plugin after disabling is
15153 // `DISABLED`
15154 //
15155 // - name: The name of the plugin to disable. Format:
15156 // `projects/{project}/locations/{location}/plugins/{plugin}`.
15157 func (r *ProjectsLocationsPluginsService) Disable(name string, googlecloudapihubv1disablepluginrequest *GoogleCloudApihubV1DisablePluginRequest) *ProjectsLocationsPluginsDisableCall {
15158 c := &ProjectsLocationsPluginsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15159 c.name = name
15160 c.googlecloudapihubv1disablepluginrequest = googlecloudapihubv1disablepluginrequest
15161 return c
15162 }
15163
15164 // Fields allows partial responses to be retrieved. See
15165 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15166 // details.
15167 func (c *ProjectsLocationsPluginsDisableCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsDisableCall {
15168 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15169 return c
15170 }
15171
15172 // Context sets the context to be used in this call's Do method.
15173 func (c *ProjectsLocationsPluginsDisableCall) Context(ctx context.Context) *ProjectsLocationsPluginsDisableCall {
15174 c.ctx_ = ctx
15175 return c
15176 }
15177
15178 // Header returns a http.Header that can be modified by the caller to add
15179 // headers to the request.
15180 func (c *ProjectsLocationsPluginsDisableCall) Header() http.Header {
15181 if c.header_ == nil {
15182 c.header_ = make(http.Header)
15183 }
15184 return c.header_
15185 }
15186
15187 func (c *ProjectsLocationsPluginsDisableCall) doRequest(alt string) (*http.Response, error) {
15188 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15189 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1disablepluginrequest)
15190 if err != nil {
15191 return nil, err
15192 }
15193 c.urlParams_.Set("alt", alt)
15194 c.urlParams_.Set("prettyPrint", "false")
15195 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable")
15196 urls += "?" + c.urlParams_.Encode()
15197 req, err := http.NewRequest("POST", urls, body)
15198 if err != nil {
15199 return nil, err
15200 }
15201 req.Header = reqHeaders
15202 googleapi.Expand(req.URL, map[string]string{
15203 "name": c.name,
15204 })
15205 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.disable", "request", internallog.HTTPRequest(req, body.Bytes()))
15206 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15207 }
15208
15209 // Do executes the "apihub.projects.locations.plugins.disable" call.
15210 // Any non-2xx status code is an error. Response headers are in either
15211 // *GoogleCloudApihubV1Plugin.ServerResponse.Header or (if a response was
15212 // returned at all) in error.(*googleapi.Error).Header. Use
15213 // googleapi.IsNotModified to check whether the returned error was because
15214 // http.StatusNotModified was returned.
15215 func (c *ProjectsLocationsPluginsDisableCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Plugin, error) {
15216 gensupport.SetOptions(c.urlParams_, opts...)
15217 res, err := c.doRequest("json")
15218 if res != nil && res.StatusCode == http.StatusNotModified {
15219 if res.Body != nil {
15220 res.Body.Close()
15221 }
15222 return nil, gensupport.WrapError(&googleapi.Error{
15223 Code: res.StatusCode,
15224 Header: res.Header,
15225 })
15226 }
15227 if err != nil {
15228 return nil, err
15229 }
15230 defer googleapi.CloseBody(res)
15231 if err := googleapi.CheckResponse(res); err != nil {
15232 return nil, gensupport.WrapError(err)
15233 }
15234 ret := &GoogleCloudApihubV1Plugin{
15235 ServerResponse: googleapi.ServerResponse{
15236 Header: res.Header,
15237 HTTPStatusCode: res.StatusCode,
15238 },
15239 }
15240 target := &ret
15241 b, err := gensupport.DecodeResponseBytes(target, res)
15242 if err != nil {
15243 return nil, err
15244 }
15245 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.disable", "response", internallog.HTTPResponse(res, b))
15246 return ret, nil
15247 }
15248
15249 type ProjectsLocationsPluginsEnableCall struct {
15250 s *Service
15251 name string
15252 googlecloudapihubv1enablepluginrequest *GoogleCloudApihubV1EnablePluginRequest
15253 urlParams_ gensupport.URLParams
15254 ctx_ context.Context
15255 header_ http.Header
15256 }
15257
15258 // Enable: Enables a plugin. The `state` of the plugin after enabling is
15259 // `ENABLED`
15260 //
15261 // - name: The name of the plugin to enable. Format:
15262 // `projects/{project}/locations/{location}/plugins/{plugin}`.
15263 func (r *ProjectsLocationsPluginsService) Enable(name string, googlecloudapihubv1enablepluginrequest *GoogleCloudApihubV1EnablePluginRequest) *ProjectsLocationsPluginsEnableCall {
15264 c := &ProjectsLocationsPluginsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15265 c.name = name
15266 c.googlecloudapihubv1enablepluginrequest = googlecloudapihubv1enablepluginrequest
15267 return c
15268 }
15269
15270 // Fields allows partial responses to be retrieved. See
15271 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15272 // details.
15273 func (c *ProjectsLocationsPluginsEnableCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsEnableCall {
15274 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15275 return c
15276 }
15277
15278 // Context sets the context to be used in this call's Do method.
15279 func (c *ProjectsLocationsPluginsEnableCall) Context(ctx context.Context) *ProjectsLocationsPluginsEnableCall {
15280 c.ctx_ = ctx
15281 return c
15282 }
15283
15284 // Header returns a http.Header that can be modified by the caller to add
15285 // headers to the request.
15286 func (c *ProjectsLocationsPluginsEnableCall) Header() http.Header {
15287 if c.header_ == nil {
15288 c.header_ = make(http.Header)
15289 }
15290 return c.header_
15291 }
15292
15293 func (c *ProjectsLocationsPluginsEnableCall) doRequest(alt string) (*http.Response, error) {
15294 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15295 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1enablepluginrequest)
15296 if err != nil {
15297 return nil, err
15298 }
15299 c.urlParams_.Set("alt", alt)
15300 c.urlParams_.Set("prettyPrint", "false")
15301 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable")
15302 urls += "?" + c.urlParams_.Encode()
15303 req, err := http.NewRequest("POST", urls, body)
15304 if err != nil {
15305 return nil, err
15306 }
15307 req.Header = reqHeaders
15308 googleapi.Expand(req.URL, map[string]string{
15309 "name": c.name,
15310 })
15311 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.enable", "request", internallog.HTTPRequest(req, body.Bytes()))
15312 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15313 }
15314
15315 // Do executes the "apihub.projects.locations.plugins.enable" call.
15316 // Any non-2xx status code is an error. Response headers are in either
15317 // *GoogleCloudApihubV1Plugin.ServerResponse.Header or (if a response was
15318 // returned at all) in error.(*googleapi.Error).Header. Use
15319 // googleapi.IsNotModified to check whether the returned error was because
15320 // http.StatusNotModified was returned.
15321 func (c *ProjectsLocationsPluginsEnableCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Plugin, error) {
15322 gensupport.SetOptions(c.urlParams_, opts...)
15323 res, err := c.doRequest("json")
15324 if res != nil && res.StatusCode == http.StatusNotModified {
15325 if res.Body != nil {
15326 res.Body.Close()
15327 }
15328 return nil, gensupport.WrapError(&googleapi.Error{
15329 Code: res.StatusCode,
15330 Header: res.Header,
15331 })
15332 }
15333 if err != nil {
15334 return nil, err
15335 }
15336 defer googleapi.CloseBody(res)
15337 if err := googleapi.CheckResponse(res); err != nil {
15338 return nil, gensupport.WrapError(err)
15339 }
15340 ret := &GoogleCloudApihubV1Plugin{
15341 ServerResponse: googleapi.ServerResponse{
15342 Header: res.Header,
15343 HTTPStatusCode: res.StatusCode,
15344 },
15345 }
15346 target := &ret
15347 b, err := gensupport.DecodeResponseBytes(target, res)
15348 if err != nil {
15349 return nil, err
15350 }
15351 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.enable", "response", internallog.HTTPResponse(res, b))
15352 return ret, nil
15353 }
15354
15355 type ProjectsLocationsPluginsGetCall struct {
15356 s *Service
15357 name string
15358 urlParams_ gensupport.URLParams
15359 ifNoneMatch_ string
15360 ctx_ context.Context
15361 header_ http.Header
15362 }
15363
15364 // Get: Get an API Hub plugin.
15365 //
15366 // - name: The name of the plugin to retrieve. Format:
15367 // `projects/{project}/locations/{location}/plugins/{plugin}`.
15368 func (r *ProjectsLocationsPluginsService) Get(name string) *ProjectsLocationsPluginsGetCall {
15369 c := &ProjectsLocationsPluginsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15370 c.name = name
15371 return c
15372 }
15373
15374 // Fields allows partial responses to be retrieved. See
15375 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15376 // details.
15377 func (c *ProjectsLocationsPluginsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsGetCall {
15378 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15379 return c
15380 }
15381
15382 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15383 // object's ETag matches the given value. This is useful for getting updates
15384 // only after the object has changed since the last request.
15385 func (c *ProjectsLocationsPluginsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPluginsGetCall {
15386 c.ifNoneMatch_ = entityTag
15387 return c
15388 }
15389
15390 // Context sets the context to be used in this call's Do method.
15391 func (c *ProjectsLocationsPluginsGetCall) Context(ctx context.Context) *ProjectsLocationsPluginsGetCall {
15392 c.ctx_ = ctx
15393 return c
15394 }
15395
15396 // Header returns a http.Header that can be modified by the caller to add
15397 // headers to the request.
15398 func (c *ProjectsLocationsPluginsGetCall) Header() http.Header {
15399 if c.header_ == nil {
15400 c.header_ = make(http.Header)
15401 }
15402 return c.header_
15403 }
15404
15405 func (c *ProjectsLocationsPluginsGetCall) doRequest(alt string) (*http.Response, error) {
15406 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15407 if c.ifNoneMatch_ != "" {
15408 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15409 }
15410 c.urlParams_.Set("alt", alt)
15411 c.urlParams_.Set("prettyPrint", "false")
15412 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15413 urls += "?" + c.urlParams_.Encode()
15414 req, err := http.NewRequest("GET", urls, nil)
15415 if err != nil {
15416 return nil, err
15417 }
15418 req.Header = reqHeaders
15419 googleapi.Expand(req.URL, map[string]string{
15420 "name": c.name,
15421 })
15422 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.get", "request", internallog.HTTPRequest(req, nil))
15423 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15424 }
15425
15426 // Do executes the "apihub.projects.locations.plugins.get" call.
15427 // Any non-2xx status code is an error. Response headers are in either
15428 // *GoogleCloudApihubV1Plugin.ServerResponse.Header or (if a response was
15429 // returned at all) in error.(*googleapi.Error).Header. Use
15430 // googleapi.IsNotModified to check whether the returned error was because
15431 // http.StatusNotModified was returned.
15432 func (c *ProjectsLocationsPluginsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1Plugin, error) {
15433 gensupport.SetOptions(c.urlParams_, opts...)
15434 res, err := c.doRequest("json")
15435 if res != nil && res.StatusCode == http.StatusNotModified {
15436 if res.Body != nil {
15437 res.Body.Close()
15438 }
15439 return nil, gensupport.WrapError(&googleapi.Error{
15440 Code: res.StatusCode,
15441 Header: res.Header,
15442 })
15443 }
15444 if err != nil {
15445 return nil, err
15446 }
15447 defer googleapi.CloseBody(res)
15448 if err := googleapi.CheckResponse(res); err != nil {
15449 return nil, gensupport.WrapError(err)
15450 }
15451 ret := &GoogleCloudApihubV1Plugin{
15452 ServerResponse: googleapi.ServerResponse{
15453 Header: res.Header,
15454 HTTPStatusCode: res.StatusCode,
15455 },
15456 }
15457 target := &ret
15458 b, err := gensupport.DecodeResponseBytes(target, res)
15459 if err != nil {
15460 return nil, err
15461 }
15462 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.get", "response", internallog.HTTPResponse(res, b))
15463 return ret, nil
15464 }
15465
15466 type ProjectsLocationsPluginsGetStyleGuideCall struct {
15467 s *Service
15468 name string
15469 urlParams_ gensupport.URLParams
15470 ifNoneMatch_ string
15471 ctx_ context.Context
15472 header_ http.Header
15473 }
15474
15475 // GetStyleGuide: Get the style guide being used for linting.
15476 //
15477 // - name: The name of the spec to retrieve. Format:
15478 // `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`.
15479 func (r *ProjectsLocationsPluginsService) GetStyleGuide(name string) *ProjectsLocationsPluginsGetStyleGuideCall {
15480 c := &ProjectsLocationsPluginsGetStyleGuideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15481 c.name = name
15482 return c
15483 }
15484
15485 // Fields allows partial responses to be retrieved. See
15486 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15487 // details.
15488 func (c *ProjectsLocationsPluginsGetStyleGuideCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsGetStyleGuideCall {
15489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15490 return c
15491 }
15492
15493 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15494 // object's ETag matches the given value. This is useful for getting updates
15495 // only after the object has changed since the last request.
15496 func (c *ProjectsLocationsPluginsGetStyleGuideCall) IfNoneMatch(entityTag string) *ProjectsLocationsPluginsGetStyleGuideCall {
15497 c.ifNoneMatch_ = entityTag
15498 return c
15499 }
15500
15501 // Context sets the context to be used in this call's Do method.
15502 func (c *ProjectsLocationsPluginsGetStyleGuideCall) Context(ctx context.Context) *ProjectsLocationsPluginsGetStyleGuideCall {
15503 c.ctx_ = ctx
15504 return c
15505 }
15506
15507 // Header returns a http.Header that can be modified by the caller to add
15508 // headers to the request.
15509 func (c *ProjectsLocationsPluginsGetStyleGuideCall) Header() http.Header {
15510 if c.header_ == nil {
15511 c.header_ = make(http.Header)
15512 }
15513 return c.header_
15514 }
15515
15516 func (c *ProjectsLocationsPluginsGetStyleGuideCall) doRequest(alt string) (*http.Response, error) {
15517 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15518 if c.ifNoneMatch_ != "" {
15519 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15520 }
15521 c.urlParams_.Set("alt", alt)
15522 c.urlParams_.Set("prettyPrint", "false")
15523 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15524 urls += "?" + c.urlParams_.Encode()
15525 req, err := http.NewRequest("GET", urls, nil)
15526 if err != nil {
15527 return nil, err
15528 }
15529 req.Header = reqHeaders
15530 googleapi.Expand(req.URL, map[string]string{
15531 "name": c.name,
15532 })
15533 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.getStyleGuide", "request", internallog.HTTPRequest(req, nil))
15534 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15535 }
15536
15537 // Do executes the "apihub.projects.locations.plugins.getStyleGuide" call.
15538 // Any non-2xx status code is an error. Response headers are in either
15539 // *GoogleCloudApihubV1StyleGuide.ServerResponse.Header or (if a response was
15540 // returned at all) in error.(*googleapi.Error).Header. Use
15541 // googleapi.IsNotModified to check whether the returned error was because
15542 // http.StatusNotModified was returned.
15543 func (c *ProjectsLocationsPluginsGetStyleGuideCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1StyleGuide, error) {
15544 gensupport.SetOptions(c.urlParams_, opts...)
15545 res, err := c.doRequest("json")
15546 if res != nil && res.StatusCode == http.StatusNotModified {
15547 if res.Body != nil {
15548 res.Body.Close()
15549 }
15550 return nil, gensupport.WrapError(&googleapi.Error{
15551 Code: res.StatusCode,
15552 Header: res.Header,
15553 })
15554 }
15555 if err != nil {
15556 return nil, err
15557 }
15558 defer googleapi.CloseBody(res)
15559 if err := googleapi.CheckResponse(res); err != nil {
15560 return nil, gensupport.WrapError(err)
15561 }
15562 ret := &GoogleCloudApihubV1StyleGuide{
15563 ServerResponse: googleapi.ServerResponse{
15564 Header: res.Header,
15565 HTTPStatusCode: res.StatusCode,
15566 },
15567 }
15568 target := &ret
15569 b, err := gensupport.DecodeResponseBytes(target, res)
15570 if err != nil {
15571 return nil, err
15572 }
15573 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.getStyleGuide", "response", internallog.HTTPResponse(res, b))
15574 return ret, nil
15575 }
15576
15577 type ProjectsLocationsPluginsListCall struct {
15578 s *Service
15579 parent string
15580 urlParams_ gensupport.URLParams
15581 ifNoneMatch_ string
15582 ctx_ context.Context
15583 header_ http.Header
15584 }
15585
15586 // List: List all the plugins in a given project and location.
15587 //
15588 // - parent: The parent resource where this plugin will be created. Format:
15589 // `projects/{project}/locations/{location}`.
15590 func (r *ProjectsLocationsPluginsService) List(parent string) *ProjectsLocationsPluginsListCall {
15591 c := &ProjectsLocationsPluginsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15592 c.parent = parent
15593 return c
15594 }
15595
15596 // Filter sets the optional parameter "filter": An expression that filters the
15597 // list of plugins. A filter expression consists of a field name, a comparison
15598 // operator, and a value for filtering. The value must be a string. The
15599 // comparison operator must be one of: `<`, `>` or `=`. Filters are not case
15600 // sensitive. The following fields in the `Plugins` are eligible for filtering:
15601 // * `plugin_category` - The category of the Plugin. Allowed comparison
15602 // operators: `=`. Expressions are combined with either `AND` logic operator or
15603 // `OR` logical operator but not both of them together i.e. only one of the
15604 // `AND` or `OR` operator can be used throughout the filter string and both the
15605 // operators cannot be used together. No other logical operators are supported.
15606 // At most three filter fields are allowed in the filter string and if provided
15607 // more than that then `INVALID_ARGUMENT` error is returned by the API. Here
15608 // are a few examples: * `plugin_category = ON_RAMP` - The plugin is of
15609 // category on ramp.
15610 func (c *ProjectsLocationsPluginsListCall) Filter(filter string) *ProjectsLocationsPluginsListCall {
15611 c.urlParams_.Set("filter", filter)
15612 return c
15613 }
15614
15615 // PageSize sets the optional parameter "pageSize": The maximum number of hub
15616 // plugins to return. The service may return fewer than this value. If
15617 // unspecified, at most 50 hub plugins will be returned. The maximum value is
15618 // 1000; values above 1000 will be coerced to 1000.
15619 func (c *ProjectsLocationsPluginsListCall) PageSize(pageSize int64) *ProjectsLocationsPluginsListCall {
15620 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15621 return c
15622 }
15623
15624 // PageToken sets the optional parameter "pageToken": A page token, received
15625 // from a previous `ListPlugins` call. Provide this to retrieve the subsequent
15626 // page. When paginating, all other parameters (except page_size) provided to
15627 // `ListPlugins` must match the call that provided the page token.
15628 func (c *ProjectsLocationsPluginsListCall) PageToken(pageToken string) *ProjectsLocationsPluginsListCall {
15629 c.urlParams_.Set("pageToken", pageToken)
15630 return c
15631 }
15632
15633 // Fields allows partial responses to be retrieved. See
15634 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15635 // details.
15636 func (c *ProjectsLocationsPluginsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsListCall {
15637 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15638 return c
15639 }
15640
15641 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15642 // object's ETag matches the given value. This is useful for getting updates
15643 // only after the object has changed since the last request.
15644 func (c *ProjectsLocationsPluginsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPluginsListCall {
15645 c.ifNoneMatch_ = entityTag
15646 return c
15647 }
15648
15649 // Context sets the context to be used in this call's Do method.
15650 func (c *ProjectsLocationsPluginsListCall) Context(ctx context.Context) *ProjectsLocationsPluginsListCall {
15651 c.ctx_ = ctx
15652 return c
15653 }
15654
15655 // Header returns a http.Header that can be modified by the caller to add
15656 // headers to the request.
15657 func (c *ProjectsLocationsPluginsListCall) Header() http.Header {
15658 if c.header_ == nil {
15659 c.header_ = make(http.Header)
15660 }
15661 return c.header_
15662 }
15663
15664 func (c *ProjectsLocationsPluginsListCall) doRequest(alt string) (*http.Response, error) {
15665 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15666 if c.ifNoneMatch_ != "" {
15667 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15668 }
15669 c.urlParams_.Set("alt", alt)
15670 c.urlParams_.Set("prettyPrint", "false")
15671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/plugins")
15672 urls += "?" + c.urlParams_.Encode()
15673 req, err := http.NewRequest("GET", urls, nil)
15674 if err != nil {
15675 return nil, err
15676 }
15677 req.Header = reqHeaders
15678 googleapi.Expand(req.URL, map[string]string{
15679 "parent": c.parent,
15680 })
15681 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.list", "request", internallog.HTTPRequest(req, nil))
15682 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15683 }
15684
15685 // Do executes the "apihub.projects.locations.plugins.list" call.
15686 // Any non-2xx status code is an error. Response headers are in either
15687 // *GoogleCloudApihubV1ListPluginsResponse.ServerResponse.Header or (if a
15688 // response was returned at all) in error.(*googleapi.Error).Header. Use
15689 // googleapi.IsNotModified to check whether the returned error was because
15690 // http.StatusNotModified was returned.
15691 func (c *ProjectsLocationsPluginsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListPluginsResponse, error) {
15692 gensupport.SetOptions(c.urlParams_, opts...)
15693 res, err := c.doRequest("json")
15694 if res != nil && res.StatusCode == http.StatusNotModified {
15695 if res.Body != nil {
15696 res.Body.Close()
15697 }
15698 return nil, gensupport.WrapError(&googleapi.Error{
15699 Code: res.StatusCode,
15700 Header: res.Header,
15701 })
15702 }
15703 if err != nil {
15704 return nil, err
15705 }
15706 defer googleapi.CloseBody(res)
15707 if err := googleapi.CheckResponse(res); err != nil {
15708 return nil, gensupport.WrapError(err)
15709 }
15710 ret := &GoogleCloudApihubV1ListPluginsResponse{
15711 ServerResponse: googleapi.ServerResponse{
15712 Header: res.Header,
15713 HTTPStatusCode: res.StatusCode,
15714 },
15715 }
15716 target := &ret
15717 b, err := gensupport.DecodeResponseBytes(target, res)
15718 if err != nil {
15719 return nil, err
15720 }
15721 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.list", "response", internallog.HTTPResponse(res, b))
15722 return ret, nil
15723 }
15724
15725 // Pages invokes f for each page of results.
15726 // A non-nil error returned from f will halt the iteration.
15727 // The provided context supersedes any context provided to the Context method.
15728 func (c *ProjectsLocationsPluginsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListPluginsResponse) error) error {
15729 c.ctx_ = ctx
15730 defer c.PageToken(c.urlParams_.Get("pageToken"))
15731 for {
15732 x, err := c.Do()
15733 if err != nil {
15734 return err
15735 }
15736 if err := f(x); err != nil {
15737 return err
15738 }
15739 if x.NextPageToken == "" {
15740 return nil
15741 }
15742 c.PageToken(x.NextPageToken)
15743 }
15744 }
15745
15746 type ProjectsLocationsPluginsUpdateStyleGuideCall struct {
15747 s *Service
15748 name string
15749 googlecloudapihubv1styleguide *GoogleCloudApihubV1StyleGuide
15750 urlParams_ gensupport.URLParams
15751 ctx_ context.Context
15752 header_ http.Header
15753 }
15754
15755 // UpdateStyleGuide: Update the styleGuide to be used for liniting in by API
15756 // hub.
15757 //
15758 // - name: Identifier. The name of the style guide. Format:
15759 // `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`.
15760 func (r *ProjectsLocationsPluginsService) UpdateStyleGuide(name string, googlecloudapihubv1styleguide *GoogleCloudApihubV1StyleGuide) *ProjectsLocationsPluginsUpdateStyleGuideCall {
15761 c := &ProjectsLocationsPluginsUpdateStyleGuideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15762 c.name = name
15763 c.googlecloudapihubv1styleguide = googlecloudapihubv1styleguide
15764 return c
15765 }
15766
15767 // UpdateMask sets the optional parameter "updateMask": The list of fields to
15768 // update.
15769 func (c *ProjectsLocationsPluginsUpdateStyleGuideCall) UpdateMask(updateMask string) *ProjectsLocationsPluginsUpdateStyleGuideCall {
15770 c.urlParams_.Set("updateMask", updateMask)
15771 return c
15772 }
15773
15774 // Fields allows partial responses to be retrieved. See
15775 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15776 // details.
15777 func (c *ProjectsLocationsPluginsUpdateStyleGuideCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsUpdateStyleGuideCall {
15778 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15779 return c
15780 }
15781
15782 // Context sets the context to be used in this call's Do method.
15783 func (c *ProjectsLocationsPluginsUpdateStyleGuideCall) Context(ctx context.Context) *ProjectsLocationsPluginsUpdateStyleGuideCall {
15784 c.ctx_ = ctx
15785 return c
15786 }
15787
15788 // Header returns a http.Header that can be modified by the caller to add
15789 // headers to the request.
15790 func (c *ProjectsLocationsPluginsUpdateStyleGuideCall) Header() http.Header {
15791 if c.header_ == nil {
15792 c.header_ = make(http.Header)
15793 }
15794 return c.header_
15795 }
15796
15797 func (c *ProjectsLocationsPluginsUpdateStyleGuideCall) doRequest(alt string) (*http.Response, error) {
15798 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15799 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1styleguide)
15800 if err != nil {
15801 return nil, err
15802 }
15803 c.urlParams_.Set("alt", alt)
15804 c.urlParams_.Set("prettyPrint", "false")
15805 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15806 urls += "?" + c.urlParams_.Encode()
15807 req, err := http.NewRequest("PATCH", urls, body)
15808 if err != nil {
15809 return nil, err
15810 }
15811 req.Header = reqHeaders
15812 googleapi.Expand(req.URL, map[string]string{
15813 "name": c.name,
15814 })
15815 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.updateStyleGuide", "request", internallog.HTTPRequest(req, body.Bytes()))
15816 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15817 }
15818
15819 // Do executes the "apihub.projects.locations.plugins.updateStyleGuide" call.
15820 // Any non-2xx status code is an error. Response headers are in either
15821 // *GoogleCloudApihubV1StyleGuide.ServerResponse.Header or (if a response was
15822 // returned at all) in error.(*googleapi.Error).Header. Use
15823 // googleapi.IsNotModified to check whether the returned error was because
15824 // http.StatusNotModified was returned.
15825 func (c *ProjectsLocationsPluginsUpdateStyleGuideCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1StyleGuide, error) {
15826 gensupport.SetOptions(c.urlParams_, opts...)
15827 res, err := c.doRequest("json")
15828 if res != nil && res.StatusCode == http.StatusNotModified {
15829 if res.Body != nil {
15830 res.Body.Close()
15831 }
15832 return nil, gensupport.WrapError(&googleapi.Error{
15833 Code: res.StatusCode,
15834 Header: res.Header,
15835 })
15836 }
15837 if err != nil {
15838 return nil, err
15839 }
15840 defer googleapi.CloseBody(res)
15841 if err := googleapi.CheckResponse(res); err != nil {
15842 return nil, gensupport.WrapError(err)
15843 }
15844 ret := &GoogleCloudApihubV1StyleGuide{
15845 ServerResponse: googleapi.ServerResponse{
15846 Header: res.Header,
15847 HTTPStatusCode: res.StatusCode,
15848 },
15849 }
15850 target := &ret
15851 b, err := gensupport.DecodeResponseBytes(target, res)
15852 if err != nil {
15853 return nil, err
15854 }
15855 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.updateStyleGuide", "response", internallog.HTTPResponse(res, b))
15856 return ret, nil
15857 }
15858
15859 type ProjectsLocationsPluginsInstancesCreateCall struct {
15860 s *Service
15861 parent string
15862 googlecloudapihubv1plugininstance *GoogleCloudApihubV1PluginInstance
15863 urlParams_ gensupport.URLParams
15864 ctx_ context.Context
15865 header_ http.Header
15866 }
15867
15868 // Create: Creates a Plugin instance in the API hub.
15869 //
15870 // - parent: The parent of the plugin instance resource. Format:
15871 // `projects/{project}/locations/{location}/plugins/{plugin}`.
15872 func (r *ProjectsLocationsPluginsInstancesService) Create(parent string, googlecloudapihubv1plugininstance *GoogleCloudApihubV1PluginInstance) *ProjectsLocationsPluginsInstancesCreateCall {
15873 c := &ProjectsLocationsPluginsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15874 c.parent = parent
15875 c.googlecloudapihubv1plugininstance = googlecloudapihubv1plugininstance
15876 return c
15877 }
15878
15879 // PluginInstanceId sets the optional parameter "pluginInstanceId": The ID to
15880 // use for the plugin instance, which will become the final component of the
15881 // plugin instance's resource name. This field is optional. * If provided, the
15882 // same will be used. The service will throw an error if the specified id is
15883 // already used by another plugin instance in the plugin resource. * If not
15884 // provided, a system generated id will be used. This value should be 4-63
15885 // characters, and valid characters are /a-z[0-9]-_/.
15886 func (c *ProjectsLocationsPluginsInstancesCreateCall) PluginInstanceId(pluginInstanceId string) *ProjectsLocationsPluginsInstancesCreateCall {
15887 c.urlParams_.Set("pluginInstanceId", pluginInstanceId)
15888 return c
15889 }
15890
15891 // Fields allows partial responses to be retrieved. See
15892 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15893 // details.
15894 func (c *ProjectsLocationsPluginsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesCreateCall {
15895 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15896 return c
15897 }
15898
15899 // Context sets the context to be used in this call's Do method.
15900 func (c *ProjectsLocationsPluginsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesCreateCall {
15901 c.ctx_ = ctx
15902 return c
15903 }
15904
15905 // Header returns a http.Header that can be modified by the caller to add
15906 // headers to the request.
15907 func (c *ProjectsLocationsPluginsInstancesCreateCall) Header() http.Header {
15908 if c.header_ == nil {
15909 c.header_ = make(http.Header)
15910 }
15911 return c.header_
15912 }
15913
15914 func (c *ProjectsLocationsPluginsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
15915 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15916 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1plugininstance)
15917 if err != nil {
15918 return nil, err
15919 }
15920 c.urlParams_.Set("alt", alt)
15921 c.urlParams_.Set("prettyPrint", "false")
15922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
15923 urls += "?" + c.urlParams_.Encode()
15924 req, err := http.NewRequest("POST", urls, body)
15925 if err != nil {
15926 return nil, err
15927 }
15928 req.Header = reqHeaders
15929 googleapi.Expand(req.URL, map[string]string{
15930 "parent": c.parent,
15931 })
15932 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.create", "request", internallog.HTTPRequest(req, body.Bytes()))
15933 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15934 }
15935
15936 // Do executes the "apihub.projects.locations.plugins.instances.create" call.
15937 // Any non-2xx status code is an error. Response headers are in either
15938 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
15939 // returned at all) in error.(*googleapi.Error).Header. Use
15940 // googleapi.IsNotModified to check whether the returned error was because
15941 // http.StatusNotModified was returned.
15942 func (c *ProjectsLocationsPluginsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
15943 gensupport.SetOptions(c.urlParams_, opts...)
15944 res, err := c.doRequest("json")
15945 if res != nil && res.StatusCode == http.StatusNotModified {
15946 if res.Body != nil {
15947 res.Body.Close()
15948 }
15949 return nil, gensupport.WrapError(&googleapi.Error{
15950 Code: res.StatusCode,
15951 Header: res.Header,
15952 })
15953 }
15954 if err != nil {
15955 return nil, err
15956 }
15957 defer googleapi.CloseBody(res)
15958 if err := googleapi.CheckResponse(res); err != nil {
15959 return nil, gensupport.WrapError(err)
15960 }
15961 ret := &GoogleLongrunningOperation{
15962 ServerResponse: googleapi.ServerResponse{
15963 Header: res.Header,
15964 HTTPStatusCode: res.StatusCode,
15965 },
15966 }
15967 target := &ret
15968 b, err := gensupport.DecodeResponseBytes(target, res)
15969 if err != nil {
15970 return nil, err
15971 }
15972 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.create", "response", internallog.HTTPResponse(res, b))
15973 return ret, nil
15974 }
15975
15976 type ProjectsLocationsPluginsInstancesDeleteCall struct {
15977 s *Service
15978 name string
15979 urlParams_ gensupport.URLParams
15980 ctx_ context.Context
15981 header_ http.Header
15982 }
15983
15984 // Delete: Deletes a plugin instance in the API hub.
15985 //
15986 // - name: The name of the plugin instance to delete. Format:
15987 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
15988 // ce}`.
15989 func (r *ProjectsLocationsPluginsInstancesService) Delete(name string) *ProjectsLocationsPluginsInstancesDeleteCall {
15990 c := &ProjectsLocationsPluginsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15991 c.name = name
15992 return c
15993 }
15994
15995 // Fields allows partial responses to be retrieved. See
15996 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15997 // details.
15998 func (c *ProjectsLocationsPluginsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesDeleteCall {
15999 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16000 return c
16001 }
16002
16003 // Context sets the context to be used in this call's Do method.
16004 func (c *ProjectsLocationsPluginsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesDeleteCall {
16005 c.ctx_ = ctx
16006 return c
16007 }
16008
16009 // Header returns a http.Header that can be modified by the caller to add
16010 // headers to the request.
16011 func (c *ProjectsLocationsPluginsInstancesDeleteCall) Header() http.Header {
16012 if c.header_ == nil {
16013 c.header_ = make(http.Header)
16014 }
16015 return c.header_
16016 }
16017
16018 func (c *ProjectsLocationsPluginsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
16019 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16020 c.urlParams_.Set("alt", alt)
16021 c.urlParams_.Set("prettyPrint", "false")
16022 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16023 urls += "?" + c.urlParams_.Encode()
16024 req, err := http.NewRequest("DELETE", urls, nil)
16025 if err != nil {
16026 return nil, err
16027 }
16028 req.Header = reqHeaders
16029 googleapi.Expand(req.URL, map[string]string{
16030 "name": c.name,
16031 })
16032 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.delete", "request", internallog.HTTPRequest(req, nil))
16033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16034 }
16035
16036 // Do executes the "apihub.projects.locations.plugins.instances.delete" call.
16037 // Any non-2xx status code is an error. Response headers are in either
16038 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
16039 // returned at all) in error.(*googleapi.Error).Header. Use
16040 // googleapi.IsNotModified to check whether the returned error was because
16041 // http.StatusNotModified was returned.
16042 func (c *ProjectsLocationsPluginsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16043 gensupport.SetOptions(c.urlParams_, opts...)
16044 res, err := c.doRequest("json")
16045 if res != nil && res.StatusCode == http.StatusNotModified {
16046 if res.Body != nil {
16047 res.Body.Close()
16048 }
16049 return nil, gensupport.WrapError(&googleapi.Error{
16050 Code: res.StatusCode,
16051 Header: res.Header,
16052 })
16053 }
16054 if err != nil {
16055 return nil, err
16056 }
16057 defer googleapi.CloseBody(res)
16058 if err := googleapi.CheckResponse(res); err != nil {
16059 return nil, gensupport.WrapError(err)
16060 }
16061 ret := &GoogleLongrunningOperation{
16062 ServerResponse: googleapi.ServerResponse{
16063 Header: res.Header,
16064 HTTPStatusCode: res.StatusCode,
16065 },
16066 }
16067 target := &ret
16068 b, err := gensupport.DecodeResponseBytes(target, res)
16069 if err != nil {
16070 return nil, err
16071 }
16072 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.delete", "response", internallog.HTTPResponse(res, b))
16073 return ret, nil
16074 }
16075
16076 type ProjectsLocationsPluginsInstancesDisableActionCall struct {
16077 s *Service
16078 name string
16079 googlecloudapihubv1disableplugininstanceactionrequest *GoogleCloudApihubV1DisablePluginInstanceActionRequest
16080 urlParams_ gensupport.URLParams
16081 ctx_ context.Context
16082 header_ http.Header
16083 }
16084
16085 // DisableAction: Disables a plugin instance in the API hub.
16086 //
16087 // - name: The name of the plugin instance to disable. Format:
16088 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
16089 // ce}`.
16090 func (r *ProjectsLocationsPluginsInstancesService) DisableAction(name string, googlecloudapihubv1disableplugininstanceactionrequest *GoogleCloudApihubV1DisablePluginInstanceActionRequest) *ProjectsLocationsPluginsInstancesDisableActionCall {
16091 c := &ProjectsLocationsPluginsInstancesDisableActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16092 c.name = name
16093 c.googlecloudapihubv1disableplugininstanceactionrequest = googlecloudapihubv1disableplugininstanceactionrequest
16094 return c
16095 }
16096
16097 // Fields allows partial responses to be retrieved. See
16098 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16099 // details.
16100 func (c *ProjectsLocationsPluginsInstancesDisableActionCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesDisableActionCall {
16101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16102 return c
16103 }
16104
16105 // Context sets the context to be used in this call's Do method.
16106 func (c *ProjectsLocationsPluginsInstancesDisableActionCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesDisableActionCall {
16107 c.ctx_ = ctx
16108 return c
16109 }
16110
16111 // Header returns a http.Header that can be modified by the caller to add
16112 // headers to the request.
16113 func (c *ProjectsLocationsPluginsInstancesDisableActionCall) Header() http.Header {
16114 if c.header_ == nil {
16115 c.header_ = make(http.Header)
16116 }
16117 return c.header_
16118 }
16119
16120 func (c *ProjectsLocationsPluginsInstancesDisableActionCall) doRequest(alt string) (*http.Response, error) {
16121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16122 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1disableplugininstanceactionrequest)
16123 if err != nil {
16124 return nil, err
16125 }
16126 c.urlParams_.Set("alt", alt)
16127 c.urlParams_.Set("prettyPrint", "false")
16128 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disableAction")
16129 urls += "?" + c.urlParams_.Encode()
16130 req, err := http.NewRequest("POST", urls, body)
16131 if err != nil {
16132 return nil, err
16133 }
16134 req.Header = reqHeaders
16135 googleapi.Expand(req.URL, map[string]string{
16136 "name": c.name,
16137 })
16138 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.disableAction", "request", internallog.HTTPRequest(req, body.Bytes()))
16139 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16140 }
16141
16142 // Do executes the "apihub.projects.locations.plugins.instances.disableAction" call.
16143 // Any non-2xx status code is an error. Response headers are in either
16144 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
16145 // returned at all) in error.(*googleapi.Error).Header. Use
16146 // googleapi.IsNotModified to check whether the returned error was because
16147 // http.StatusNotModified was returned.
16148 func (c *ProjectsLocationsPluginsInstancesDisableActionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16149 gensupport.SetOptions(c.urlParams_, opts...)
16150 res, err := c.doRequest("json")
16151 if res != nil && res.StatusCode == http.StatusNotModified {
16152 if res.Body != nil {
16153 res.Body.Close()
16154 }
16155 return nil, gensupport.WrapError(&googleapi.Error{
16156 Code: res.StatusCode,
16157 Header: res.Header,
16158 })
16159 }
16160 if err != nil {
16161 return nil, err
16162 }
16163 defer googleapi.CloseBody(res)
16164 if err := googleapi.CheckResponse(res); err != nil {
16165 return nil, gensupport.WrapError(err)
16166 }
16167 ret := &GoogleLongrunningOperation{
16168 ServerResponse: googleapi.ServerResponse{
16169 Header: res.Header,
16170 HTTPStatusCode: res.StatusCode,
16171 },
16172 }
16173 target := &ret
16174 b, err := gensupport.DecodeResponseBytes(target, res)
16175 if err != nil {
16176 return nil, err
16177 }
16178 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.disableAction", "response", internallog.HTTPResponse(res, b))
16179 return ret, nil
16180 }
16181
16182 type ProjectsLocationsPluginsInstancesEnableActionCall struct {
16183 s *Service
16184 name string
16185 googlecloudapihubv1enableplugininstanceactionrequest *GoogleCloudApihubV1EnablePluginInstanceActionRequest
16186 urlParams_ gensupport.URLParams
16187 ctx_ context.Context
16188 header_ http.Header
16189 }
16190
16191 // EnableAction: Enables a plugin instance in the API hub.
16192 //
16193 // - name: The name of the plugin instance to enable. Format:
16194 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
16195 // ce}`.
16196 func (r *ProjectsLocationsPluginsInstancesService) EnableAction(name string, googlecloudapihubv1enableplugininstanceactionrequest *GoogleCloudApihubV1EnablePluginInstanceActionRequest) *ProjectsLocationsPluginsInstancesEnableActionCall {
16197 c := &ProjectsLocationsPluginsInstancesEnableActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16198 c.name = name
16199 c.googlecloudapihubv1enableplugininstanceactionrequest = googlecloudapihubv1enableplugininstanceactionrequest
16200 return c
16201 }
16202
16203 // Fields allows partial responses to be retrieved. See
16204 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16205 // details.
16206 func (c *ProjectsLocationsPluginsInstancesEnableActionCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesEnableActionCall {
16207 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16208 return c
16209 }
16210
16211 // Context sets the context to be used in this call's Do method.
16212 func (c *ProjectsLocationsPluginsInstancesEnableActionCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesEnableActionCall {
16213 c.ctx_ = ctx
16214 return c
16215 }
16216
16217 // Header returns a http.Header that can be modified by the caller to add
16218 // headers to the request.
16219 func (c *ProjectsLocationsPluginsInstancesEnableActionCall) Header() http.Header {
16220 if c.header_ == nil {
16221 c.header_ = make(http.Header)
16222 }
16223 return c.header_
16224 }
16225
16226 func (c *ProjectsLocationsPluginsInstancesEnableActionCall) doRequest(alt string) (*http.Response, error) {
16227 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16228 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1enableplugininstanceactionrequest)
16229 if err != nil {
16230 return nil, err
16231 }
16232 c.urlParams_.Set("alt", alt)
16233 c.urlParams_.Set("prettyPrint", "false")
16234 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enableAction")
16235 urls += "?" + c.urlParams_.Encode()
16236 req, err := http.NewRequest("POST", urls, body)
16237 if err != nil {
16238 return nil, err
16239 }
16240 req.Header = reqHeaders
16241 googleapi.Expand(req.URL, map[string]string{
16242 "name": c.name,
16243 })
16244 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.enableAction", "request", internallog.HTTPRequest(req, body.Bytes()))
16245 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16246 }
16247
16248 // Do executes the "apihub.projects.locations.plugins.instances.enableAction" call.
16249 // Any non-2xx status code is an error. Response headers are in either
16250 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
16251 // returned at all) in error.(*googleapi.Error).Header. Use
16252 // googleapi.IsNotModified to check whether the returned error was because
16253 // http.StatusNotModified was returned.
16254 func (c *ProjectsLocationsPluginsInstancesEnableActionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16255 gensupport.SetOptions(c.urlParams_, opts...)
16256 res, err := c.doRequest("json")
16257 if res != nil && res.StatusCode == http.StatusNotModified {
16258 if res.Body != nil {
16259 res.Body.Close()
16260 }
16261 return nil, gensupport.WrapError(&googleapi.Error{
16262 Code: res.StatusCode,
16263 Header: res.Header,
16264 })
16265 }
16266 if err != nil {
16267 return nil, err
16268 }
16269 defer googleapi.CloseBody(res)
16270 if err := googleapi.CheckResponse(res); err != nil {
16271 return nil, gensupport.WrapError(err)
16272 }
16273 ret := &GoogleLongrunningOperation{
16274 ServerResponse: googleapi.ServerResponse{
16275 Header: res.Header,
16276 HTTPStatusCode: res.StatusCode,
16277 },
16278 }
16279 target := &ret
16280 b, err := gensupport.DecodeResponseBytes(target, res)
16281 if err != nil {
16282 return nil, err
16283 }
16284 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.enableAction", "response", internallog.HTTPResponse(res, b))
16285 return ret, nil
16286 }
16287
16288 type ProjectsLocationsPluginsInstancesExecuteActionCall struct {
16289 s *Service
16290 name string
16291 googlecloudapihubv1executeplugininstanceactionrequest *GoogleCloudApihubV1ExecutePluginInstanceActionRequest
16292 urlParams_ gensupport.URLParams
16293 ctx_ context.Context
16294 header_ http.Header
16295 }
16296
16297 // ExecuteAction: Executes a plugin instance in the API hub.
16298 //
16299 // - name: The name of the plugin instance to execute. Format:
16300 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
16301 // ce}`.
16302 func (r *ProjectsLocationsPluginsInstancesService) ExecuteAction(name string, googlecloudapihubv1executeplugininstanceactionrequest *GoogleCloudApihubV1ExecutePluginInstanceActionRequest) *ProjectsLocationsPluginsInstancesExecuteActionCall {
16303 c := &ProjectsLocationsPluginsInstancesExecuteActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16304 c.name = name
16305 c.googlecloudapihubv1executeplugininstanceactionrequest = googlecloudapihubv1executeplugininstanceactionrequest
16306 return c
16307 }
16308
16309 // Fields allows partial responses to be retrieved. See
16310 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16311 // details.
16312 func (c *ProjectsLocationsPluginsInstancesExecuteActionCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesExecuteActionCall {
16313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16314 return c
16315 }
16316
16317 // Context sets the context to be used in this call's Do method.
16318 func (c *ProjectsLocationsPluginsInstancesExecuteActionCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesExecuteActionCall {
16319 c.ctx_ = ctx
16320 return c
16321 }
16322
16323 // Header returns a http.Header that can be modified by the caller to add
16324 // headers to the request.
16325 func (c *ProjectsLocationsPluginsInstancesExecuteActionCall) Header() http.Header {
16326 if c.header_ == nil {
16327 c.header_ = make(http.Header)
16328 }
16329 return c.header_
16330 }
16331
16332 func (c *ProjectsLocationsPluginsInstancesExecuteActionCall) doRequest(alt string) (*http.Response, error) {
16333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16334 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1executeplugininstanceactionrequest)
16335 if err != nil {
16336 return nil, err
16337 }
16338 c.urlParams_.Set("alt", alt)
16339 c.urlParams_.Set("prettyPrint", "false")
16340 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:executeAction")
16341 urls += "?" + c.urlParams_.Encode()
16342 req, err := http.NewRequest("POST", urls, body)
16343 if err != nil {
16344 return nil, err
16345 }
16346 req.Header = reqHeaders
16347 googleapi.Expand(req.URL, map[string]string{
16348 "name": c.name,
16349 })
16350 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.executeAction", "request", internallog.HTTPRequest(req, body.Bytes()))
16351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16352 }
16353
16354 // Do executes the "apihub.projects.locations.plugins.instances.executeAction" call.
16355 // Any non-2xx status code is an error. Response headers are in either
16356 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
16357 // returned at all) in error.(*googleapi.Error).Header. Use
16358 // googleapi.IsNotModified to check whether the returned error was because
16359 // http.StatusNotModified was returned.
16360 func (c *ProjectsLocationsPluginsInstancesExecuteActionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
16361 gensupport.SetOptions(c.urlParams_, opts...)
16362 res, err := c.doRequest("json")
16363 if res != nil && res.StatusCode == http.StatusNotModified {
16364 if res.Body != nil {
16365 res.Body.Close()
16366 }
16367 return nil, gensupport.WrapError(&googleapi.Error{
16368 Code: res.StatusCode,
16369 Header: res.Header,
16370 })
16371 }
16372 if err != nil {
16373 return nil, err
16374 }
16375 defer googleapi.CloseBody(res)
16376 if err := googleapi.CheckResponse(res); err != nil {
16377 return nil, gensupport.WrapError(err)
16378 }
16379 ret := &GoogleLongrunningOperation{
16380 ServerResponse: googleapi.ServerResponse{
16381 Header: res.Header,
16382 HTTPStatusCode: res.StatusCode,
16383 },
16384 }
16385 target := &ret
16386 b, err := gensupport.DecodeResponseBytes(target, res)
16387 if err != nil {
16388 return nil, err
16389 }
16390 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.executeAction", "response", internallog.HTTPResponse(res, b))
16391 return ret, nil
16392 }
16393
16394 type ProjectsLocationsPluginsInstancesGetCall struct {
16395 s *Service
16396 name string
16397 urlParams_ gensupport.URLParams
16398 ifNoneMatch_ string
16399 ctx_ context.Context
16400 header_ http.Header
16401 }
16402
16403 // Get: Get an API Hub plugin instance.
16404 //
16405 // - name: The name of the plugin instance to retrieve. Format:
16406 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
16407 // ce}`.
16408 func (r *ProjectsLocationsPluginsInstancesService) Get(name string) *ProjectsLocationsPluginsInstancesGetCall {
16409 c := &ProjectsLocationsPluginsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16410 c.name = name
16411 return c
16412 }
16413
16414 // Fields allows partial responses to be retrieved. See
16415 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16416 // details.
16417 func (c *ProjectsLocationsPluginsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesGetCall {
16418 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16419 return c
16420 }
16421
16422 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16423 // object's ETag matches the given value. This is useful for getting updates
16424 // only after the object has changed since the last request.
16425 func (c *ProjectsLocationsPluginsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPluginsInstancesGetCall {
16426 c.ifNoneMatch_ = entityTag
16427 return c
16428 }
16429
16430 // Context sets the context to be used in this call's Do method.
16431 func (c *ProjectsLocationsPluginsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesGetCall {
16432 c.ctx_ = ctx
16433 return c
16434 }
16435
16436 // Header returns a http.Header that can be modified by the caller to add
16437 // headers to the request.
16438 func (c *ProjectsLocationsPluginsInstancesGetCall) Header() http.Header {
16439 if c.header_ == nil {
16440 c.header_ = make(http.Header)
16441 }
16442 return c.header_
16443 }
16444
16445 func (c *ProjectsLocationsPluginsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
16446 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16447 if c.ifNoneMatch_ != "" {
16448 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16449 }
16450 c.urlParams_.Set("alt", alt)
16451 c.urlParams_.Set("prettyPrint", "false")
16452 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16453 urls += "?" + c.urlParams_.Encode()
16454 req, err := http.NewRequest("GET", urls, nil)
16455 if err != nil {
16456 return nil, err
16457 }
16458 req.Header = reqHeaders
16459 googleapi.Expand(req.URL, map[string]string{
16460 "name": c.name,
16461 })
16462 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.get", "request", internallog.HTTPRequest(req, nil))
16463 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16464 }
16465
16466 // Do executes the "apihub.projects.locations.plugins.instances.get" call.
16467 // Any non-2xx status code is an error. Response headers are in either
16468 // *GoogleCloudApihubV1PluginInstance.ServerResponse.Header or (if a response
16469 // was returned at all) in error.(*googleapi.Error).Header. Use
16470 // googleapi.IsNotModified to check whether the returned error was because
16471 // http.StatusNotModified was returned.
16472 func (c *ProjectsLocationsPluginsInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1PluginInstance, error) {
16473 gensupport.SetOptions(c.urlParams_, opts...)
16474 res, err := c.doRequest("json")
16475 if res != nil && res.StatusCode == http.StatusNotModified {
16476 if res.Body != nil {
16477 res.Body.Close()
16478 }
16479 return nil, gensupport.WrapError(&googleapi.Error{
16480 Code: res.StatusCode,
16481 Header: res.Header,
16482 })
16483 }
16484 if err != nil {
16485 return nil, err
16486 }
16487 defer googleapi.CloseBody(res)
16488 if err := googleapi.CheckResponse(res); err != nil {
16489 return nil, gensupport.WrapError(err)
16490 }
16491 ret := &GoogleCloudApihubV1PluginInstance{
16492 ServerResponse: googleapi.ServerResponse{
16493 Header: res.Header,
16494 HTTPStatusCode: res.StatusCode,
16495 },
16496 }
16497 target := &ret
16498 b, err := gensupport.DecodeResponseBytes(target, res)
16499 if err != nil {
16500 return nil, err
16501 }
16502 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.get", "response", internallog.HTTPResponse(res, b))
16503 return ret, nil
16504 }
16505
16506 type ProjectsLocationsPluginsInstancesListCall struct {
16507 s *Service
16508 parent string
16509 urlParams_ gensupport.URLParams
16510 ifNoneMatch_ string
16511 ctx_ context.Context
16512 header_ http.Header
16513 }
16514
16515 // List: List all the plugins in a given project and location. `-` can be used
16516 // as wildcard value for {plugin_id}
16517 //
16518 // - parent: The parent resource where this plugin will be created. Format:
16519 // `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin
16520 // instances for multiple plugins, use the - character instead of the plugin
16521 // ID.
16522 func (r *ProjectsLocationsPluginsInstancesService) List(parent string) *ProjectsLocationsPluginsInstancesListCall {
16523 c := &ProjectsLocationsPluginsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16524 c.parent = parent
16525 return c
16526 }
16527
16528 // Filter sets the optional parameter "filter": An expression that filters the
16529 // list of plugin instances. A filter expression consists of a field name, a
16530 // comparison operator, and a value for filtering. The value must be a string.
16531 // The comparison operator must be one of: `<`, `>` or `=`. Filters are not
16532 // case sensitive. The following fields in the `PluginInstances` are eligible
16533 // for filtering: * `state` - The state of the Plugin Instance. Allowed
16534 // comparison operators: `=`. * `source_project_id` - The source project id of
16535 // the Plugin Instance. Allowed comparison operators: `=`. A filter function is
16536 // also supported in the filter string. The filter function is `id(name)`. The
16537 // `id(name)` function returns the id of the resource name. For example,
16538 // `id(name) = \"plugin-instance-1\" is equivalent to `name =
16539 // \"projects/test-project-id/locations/test-location-id/plugins/plugin-1/instan
16540 // ces/plugin-instance-1\" provided the parent is
16541 // `projects/test-project-id/locations/test-location-id/plugins/plugin-1`.
16542 // Expressions are combined with either `AND` logic operator or `OR` logical
16543 // operator but not both of them together i.e. only one of the `AND` or `OR`
16544 // operator can be used throughout the filter string and both the operators
16545 // cannot be used together. No other logical operators are supported. At most
16546 // three filter fields are allowed in the filter string and if provided more
16547 // than that then `INVALID_ARGUMENT` error is returned by the API. Here are a
16548 // few examples: * `state = ENABLED` - The plugin instance is in enabled state.
16549 func (c *ProjectsLocationsPluginsInstancesListCall) Filter(filter string) *ProjectsLocationsPluginsInstancesListCall {
16550 c.urlParams_.Set("filter", filter)
16551 return c
16552 }
16553
16554 // PageSize sets the optional parameter "pageSize": The maximum number of hub
16555 // plugins to return. The service may return fewer than this value. If
16556 // unspecified, at most 50 hub plugins will be returned. The maximum value is
16557 // 1000; values above 1000 will be coerced to 1000.
16558 func (c *ProjectsLocationsPluginsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsPluginsInstancesListCall {
16559 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16560 return c
16561 }
16562
16563 // PageToken sets the optional parameter "pageToken": A page token, received
16564 // from a previous `ListPluginInstances` call. Provide this to retrieve the
16565 // subsequent page. When paginating, all other parameters provided to
16566 // `ListPluginInstances` must match the call that provided the page token.
16567 func (c *ProjectsLocationsPluginsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsPluginsInstancesListCall {
16568 c.urlParams_.Set("pageToken", pageToken)
16569 return c
16570 }
16571
16572 // Fields allows partial responses to be retrieved. See
16573 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16574 // details.
16575 func (c *ProjectsLocationsPluginsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesListCall {
16576 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16577 return c
16578 }
16579
16580 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16581 // object's ETag matches the given value. This is useful for getting updates
16582 // only after the object has changed since the last request.
16583 func (c *ProjectsLocationsPluginsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPluginsInstancesListCall {
16584 c.ifNoneMatch_ = entityTag
16585 return c
16586 }
16587
16588 // Context sets the context to be used in this call's Do method.
16589 func (c *ProjectsLocationsPluginsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesListCall {
16590 c.ctx_ = ctx
16591 return c
16592 }
16593
16594 // Header returns a http.Header that can be modified by the caller to add
16595 // headers to the request.
16596 func (c *ProjectsLocationsPluginsInstancesListCall) Header() http.Header {
16597 if c.header_ == nil {
16598 c.header_ = make(http.Header)
16599 }
16600 return c.header_
16601 }
16602
16603 func (c *ProjectsLocationsPluginsInstancesListCall) doRequest(alt string) (*http.Response, error) {
16604 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16605 if c.ifNoneMatch_ != "" {
16606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16607 }
16608 c.urlParams_.Set("alt", alt)
16609 c.urlParams_.Set("prettyPrint", "false")
16610 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
16611 urls += "?" + c.urlParams_.Encode()
16612 req, err := http.NewRequest("GET", urls, nil)
16613 if err != nil {
16614 return nil, err
16615 }
16616 req.Header = reqHeaders
16617 googleapi.Expand(req.URL, map[string]string{
16618 "parent": c.parent,
16619 })
16620 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.list", "request", internallog.HTTPRequest(req, nil))
16621 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16622 }
16623
16624 // Do executes the "apihub.projects.locations.plugins.instances.list" call.
16625 // Any non-2xx status code is an error. Response headers are in either
16626 // *GoogleCloudApihubV1ListPluginInstancesResponse.ServerResponse.Header or (if
16627 // a response was returned at all) in error.(*googleapi.Error).Header. Use
16628 // googleapi.IsNotModified to check whether the returned error was because
16629 // http.StatusNotModified was returned.
16630 func (c *ProjectsLocationsPluginsInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListPluginInstancesResponse, error) {
16631 gensupport.SetOptions(c.urlParams_, opts...)
16632 res, err := c.doRequest("json")
16633 if res != nil && res.StatusCode == http.StatusNotModified {
16634 if res.Body != nil {
16635 res.Body.Close()
16636 }
16637 return nil, gensupport.WrapError(&googleapi.Error{
16638 Code: res.StatusCode,
16639 Header: res.Header,
16640 })
16641 }
16642 if err != nil {
16643 return nil, err
16644 }
16645 defer googleapi.CloseBody(res)
16646 if err := googleapi.CheckResponse(res); err != nil {
16647 return nil, gensupport.WrapError(err)
16648 }
16649 ret := &GoogleCloudApihubV1ListPluginInstancesResponse{
16650 ServerResponse: googleapi.ServerResponse{
16651 Header: res.Header,
16652 HTTPStatusCode: res.StatusCode,
16653 },
16654 }
16655 target := &ret
16656 b, err := gensupport.DecodeResponseBytes(target, res)
16657 if err != nil {
16658 return nil, err
16659 }
16660 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.list", "response", internallog.HTTPResponse(res, b))
16661 return ret, nil
16662 }
16663
16664 // Pages invokes f for each page of results.
16665 // A non-nil error returned from f will halt the iteration.
16666 // The provided context supersedes any context provided to the Context method.
16667 func (c *ProjectsLocationsPluginsInstancesListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListPluginInstancesResponse) error) error {
16668 c.ctx_ = ctx
16669 defer c.PageToken(c.urlParams_.Get("pageToken"))
16670 for {
16671 x, err := c.Do()
16672 if err != nil {
16673 return err
16674 }
16675 if err := f(x); err != nil {
16676 return err
16677 }
16678 if x.NextPageToken == "" {
16679 return nil
16680 }
16681 c.PageToken(x.NextPageToken)
16682 }
16683 }
16684
16685 type ProjectsLocationsPluginsInstancesManageSourceDataCall struct {
16686 s *Service
16687 name string
16688 googlecloudapihubv1manageplugininstancesourcedatarequest *GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest
16689 urlParams_ gensupport.URLParams
16690 ctx_ context.Context
16691 header_ http.Header
16692 }
16693
16694 // ManageSourceData: Manages data for a given plugin instance.
16695 //
16696 // - name: The name of the plugin instance for which data needs to be managed.
16697 // Format:
16698 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
16699 // ce}`.
16700 func (r *ProjectsLocationsPluginsInstancesService) ManageSourceData(name string, googlecloudapihubv1manageplugininstancesourcedatarequest *GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest) *ProjectsLocationsPluginsInstancesManageSourceDataCall {
16701 c := &ProjectsLocationsPluginsInstancesManageSourceDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16702 c.name = name
16703 c.googlecloudapihubv1manageplugininstancesourcedatarequest = googlecloudapihubv1manageplugininstancesourcedatarequest
16704 return c
16705 }
16706
16707 // Fields allows partial responses to be retrieved. See
16708 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16709 // details.
16710 func (c *ProjectsLocationsPluginsInstancesManageSourceDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesManageSourceDataCall {
16711 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16712 return c
16713 }
16714
16715 // Context sets the context to be used in this call's Do method.
16716 func (c *ProjectsLocationsPluginsInstancesManageSourceDataCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesManageSourceDataCall {
16717 c.ctx_ = ctx
16718 return c
16719 }
16720
16721 // Header returns a http.Header that can be modified by the caller to add
16722 // headers to the request.
16723 func (c *ProjectsLocationsPluginsInstancesManageSourceDataCall) Header() http.Header {
16724 if c.header_ == nil {
16725 c.header_ = make(http.Header)
16726 }
16727 return c.header_
16728 }
16729
16730 func (c *ProjectsLocationsPluginsInstancesManageSourceDataCall) doRequest(alt string) (*http.Response, error) {
16731 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16732 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1manageplugininstancesourcedatarequest)
16733 if err != nil {
16734 return nil, err
16735 }
16736 c.urlParams_.Set("alt", alt)
16737 c.urlParams_.Set("prettyPrint", "false")
16738 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:manageSourceData")
16739 urls += "?" + c.urlParams_.Encode()
16740 req, err := http.NewRequest("POST", urls, body)
16741 if err != nil {
16742 return nil, err
16743 }
16744 req.Header = reqHeaders
16745 googleapi.Expand(req.URL, map[string]string{
16746 "name": c.name,
16747 })
16748 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.manageSourceData", "request", internallog.HTTPRequest(req, body.Bytes()))
16749 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16750 }
16751
16752 // Do executes the "apihub.projects.locations.plugins.instances.manageSourceData" call.
16753 // Any non-2xx status code is an error. Response headers are in either
16754 // *GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse.ServerResponse.Hea
16755 // der or (if a response was returned at all) in
16756 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16757 // whether the returned error was because http.StatusNotModified was returned.
16758 func (c *ProjectsLocationsPluginsInstancesManageSourceDataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse, error) {
16759 gensupport.SetOptions(c.urlParams_, opts...)
16760 res, err := c.doRequest("json")
16761 if res != nil && res.StatusCode == http.StatusNotModified {
16762 if res.Body != nil {
16763 res.Body.Close()
16764 }
16765 return nil, gensupport.WrapError(&googleapi.Error{
16766 Code: res.StatusCode,
16767 Header: res.Header,
16768 })
16769 }
16770 if err != nil {
16771 return nil, err
16772 }
16773 defer googleapi.CloseBody(res)
16774 if err := googleapi.CheckResponse(res); err != nil {
16775 return nil, gensupport.WrapError(err)
16776 }
16777 ret := &GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse{
16778 ServerResponse: googleapi.ServerResponse{
16779 Header: res.Header,
16780 HTTPStatusCode: res.StatusCode,
16781 },
16782 }
16783 target := &ret
16784 b, err := gensupport.DecodeResponseBytes(target, res)
16785 if err != nil {
16786 return nil, err
16787 }
16788 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.manageSourceData", "response", internallog.HTTPResponse(res, b))
16789 return ret, nil
16790 }
16791
16792 type ProjectsLocationsPluginsInstancesPatchCall struct {
16793 s *Service
16794 name string
16795 googlecloudapihubv1plugininstance *GoogleCloudApihubV1PluginInstance
16796 urlParams_ gensupport.URLParams
16797 ctx_ context.Context
16798 header_ http.Header
16799 }
16800
16801 // Patch: Updates a plugin instance in the API hub. The following fields in the
16802 // plugin_instance can be updated currently: * display_name *
16803 // schedule_cron_expression The update_mask should be used to specify the
16804 // fields being updated. To update the auth_config and additional_config of the
16805 // plugin instance, use the ApplyPluginInstanceConfig method.
16806 //
16807 // - name: Identifier. The unique name of the plugin instance resource. Format:
16808 // `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instan
16809 // ce}`.
16810 func (r *ProjectsLocationsPluginsInstancesService) Patch(name string, googlecloudapihubv1plugininstance *GoogleCloudApihubV1PluginInstance) *ProjectsLocationsPluginsInstancesPatchCall {
16811 c := &ProjectsLocationsPluginsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16812 c.name = name
16813 c.googlecloudapihubv1plugininstance = googlecloudapihubv1plugininstance
16814 return c
16815 }
16816
16817 // UpdateMask sets the optional parameter "updateMask": The list of fields to
16818 // update.
16819 func (c *ProjectsLocationsPluginsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPluginsInstancesPatchCall {
16820 c.urlParams_.Set("updateMask", updateMask)
16821 return c
16822 }
16823
16824 // Fields allows partial responses to be retrieved. See
16825 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16826 // details.
16827 func (c *ProjectsLocationsPluginsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsInstancesPatchCall {
16828 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16829 return c
16830 }
16831
16832 // Context sets the context to be used in this call's Do method.
16833 func (c *ProjectsLocationsPluginsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsPluginsInstancesPatchCall {
16834 c.ctx_ = ctx
16835 return c
16836 }
16837
16838 // Header returns a http.Header that can be modified by the caller to add
16839 // headers to the request.
16840 func (c *ProjectsLocationsPluginsInstancesPatchCall) Header() http.Header {
16841 if c.header_ == nil {
16842 c.header_ = make(http.Header)
16843 }
16844 return c.header_
16845 }
16846
16847 func (c *ProjectsLocationsPluginsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
16848 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16849 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1plugininstance)
16850 if err != nil {
16851 return nil, err
16852 }
16853 c.urlParams_.Set("alt", alt)
16854 c.urlParams_.Set("prettyPrint", "false")
16855 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16856 urls += "?" + c.urlParams_.Encode()
16857 req, err := http.NewRequest("PATCH", urls, body)
16858 if err != nil {
16859 return nil, err
16860 }
16861 req.Header = reqHeaders
16862 googleapi.Expand(req.URL, map[string]string{
16863 "name": c.name,
16864 })
16865 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
16866 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16867 }
16868
16869 // Do executes the "apihub.projects.locations.plugins.instances.patch" call.
16870 // Any non-2xx status code is an error. Response headers are in either
16871 // *GoogleCloudApihubV1PluginInstance.ServerResponse.Header or (if a response
16872 // was returned at all) in error.(*googleapi.Error).Header. Use
16873 // googleapi.IsNotModified to check whether the returned error was because
16874 // http.StatusNotModified was returned.
16875 func (c *ProjectsLocationsPluginsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1PluginInstance, error) {
16876 gensupport.SetOptions(c.urlParams_, opts...)
16877 res, err := c.doRequest("json")
16878 if res != nil && res.StatusCode == http.StatusNotModified {
16879 if res.Body != nil {
16880 res.Body.Close()
16881 }
16882 return nil, gensupport.WrapError(&googleapi.Error{
16883 Code: res.StatusCode,
16884 Header: res.Header,
16885 })
16886 }
16887 if err != nil {
16888 return nil, err
16889 }
16890 defer googleapi.CloseBody(res)
16891 if err := googleapi.CheckResponse(res); err != nil {
16892 return nil, gensupport.WrapError(err)
16893 }
16894 ret := &GoogleCloudApihubV1PluginInstance{
16895 ServerResponse: googleapi.ServerResponse{
16896 Header: res.Header,
16897 HTTPStatusCode: res.StatusCode,
16898 },
16899 }
16900 target := &ret
16901 b, err := gensupport.DecodeResponseBytes(target, res)
16902 if err != nil {
16903 return nil, err
16904 }
16905 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.instances.patch", "response", internallog.HTTPResponse(res, b))
16906 return ret, nil
16907 }
16908
16909 type ProjectsLocationsPluginsStyleGuideGetContentsCall struct {
16910 s *Service
16911 name string
16912 urlParams_ gensupport.URLParams
16913 ifNoneMatch_ string
16914 ctx_ context.Context
16915 header_ http.Header
16916 }
16917
16918 // GetContents: Get the contents of the style guide.
16919 //
16920 // - name: The name of the StyleGuide whose contents need to be retrieved.
16921 // There is exactly one style guide resource per project per location. The
16922 // expected format is
16923 // `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`.
16924 func (r *ProjectsLocationsPluginsStyleGuideService) GetContents(name string) *ProjectsLocationsPluginsStyleGuideGetContentsCall {
16925 c := &ProjectsLocationsPluginsStyleGuideGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16926 c.name = name
16927 return c
16928 }
16929
16930 // Fields allows partial responses to be retrieved. See
16931 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16932 // details.
16933 func (c *ProjectsLocationsPluginsStyleGuideGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPluginsStyleGuideGetContentsCall {
16934 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16935 return c
16936 }
16937
16938 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16939 // object's ETag matches the given value. This is useful for getting updates
16940 // only after the object has changed since the last request.
16941 func (c *ProjectsLocationsPluginsStyleGuideGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPluginsStyleGuideGetContentsCall {
16942 c.ifNoneMatch_ = entityTag
16943 return c
16944 }
16945
16946 // Context sets the context to be used in this call's Do method.
16947 func (c *ProjectsLocationsPluginsStyleGuideGetContentsCall) Context(ctx context.Context) *ProjectsLocationsPluginsStyleGuideGetContentsCall {
16948 c.ctx_ = ctx
16949 return c
16950 }
16951
16952 // Header returns a http.Header that can be modified by the caller to add
16953 // headers to the request.
16954 func (c *ProjectsLocationsPluginsStyleGuideGetContentsCall) Header() http.Header {
16955 if c.header_ == nil {
16956 c.header_ = make(http.Header)
16957 }
16958 return c.header_
16959 }
16960
16961 func (c *ProjectsLocationsPluginsStyleGuideGetContentsCall) doRequest(alt string) (*http.Response, error) {
16962 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16963 if c.ifNoneMatch_ != "" {
16964 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16965 }
16966 c.urlParams_.Set("alt", alt)
16967 c.urlParams_.Set("prettyPrint", "false")
16968 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:contents")
16969 urls += "?" + c.urlParams_.Encode()
16970 req, err := http.NewRequest("GET", urls, nil)
16971 if err != nil {
16972 return nil, err
16973 }
16974 req.Header = reqHeaders
16975 googleapi.Expand(req.URL, map[string]string{
16976 "name": c.name,
16977 })
16978 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.styleGuide.getContents", "request", internallog.HTTPRequest(req, nil))
16979 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16980 }
16981
16982 // Do executes the "apihub.projects.locations.plugins.styleGuide.getContents" call.
16983 // Any non-2xx status code is an error. Response headers are in either
16984 // *GoogleCloudApihubV1StyleGuideContents.ServerResponse.Header or (if a
16985 // response was returned at all) in error.(*googleapi.Error).Header. Use
16986 // googleapi.IsNotModified to check whether the returned error was because
16987 // http.StatusNotModified was returned.
16988 func (c *ProjectsLocationsPluginsStyleGuideGetContentsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1StyleGuideContents, error) {
16989 gensupport.SetOptions(c.urlParams_, opts...)
16990 res, err := c.doRequest("json")
16991 if res != nil && res.StatusCode == http.StatusNotModified {
16992 if res.Body != nil {
16993 res.Body.Close()
16994 }
16995 return nil, gensupport.WrapError(&googleapi.Error{
16996 Code: res.StatusCode,
16997 Header: res.Header,
16998 })
16999 }
17000 if err != nil {
17001 return nil, err
17002 }
17003 defer googleapi.CloseBody(res)
17004 if err := googleapi.CheckResponse(res); err != nil {
17005 return nil, gensupport.WrapError(err)
17006 }
17007 ret := &GoogleCloudApihubV1StyleGuideContents{
17008 ServerResponse: googleapi.ServerResponse{
17009 Header: res.Header,
17010 HTTPStatusCode: res.StatusCode,
17011 },
17012 }
17013 target := &ret
17014 b, err := gensupport.DecodeResponseBytes(target, res)
17015 if err != nil {
17016 return nil, err
17017 }
17018 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.plugins.styleGuide.getContents", "response", internallog.HTTPResponse(res, b))
17019 return ret, nil
17020 }
17021
17022 type ProjectsLocationsRuntimeProjectAttachmentsCreateCall struct {
17023 s *Service
17024 parent string
17025 googlecloudapihubv1runtimeprojectattachment *GoogleCloudApihubV1RuntimeProjectAttachment
17026 urlParams_ gensupport.URLParams
17027 ctx_ context.Context
17028 header_ http.Header
17029 }
17030
17031 // Create: Attaches a runtime project to the host project.
17032 //
17033 // - parent: The parent resource for the Runtime Project Attachment. Format:
17034 // `projects/{project}/locations/{location}`.
17035 func (r *ProjectsLocationsRuntimeProjectAttachmentsService) Create(parent string, googlecloudapihubv1runtimeprojectattachment *GoogleCloudApihubV1RuntimeProjectAttachment) *ProjectsLocationsRuntimeProjectAttachmentsCreateCall {
17036 c := &ProjectsLocationsRuntimeProjectAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17037 c.parent = parent
17038 c.googlecloudapihubv1runtimeprojectattachment = googlecloudapihubv1runtimeprojectattachment
17039 return c
17040 }
17041
17042 // RuntimeProjectAttachmentId sets the optional parameter
17043 // "runtimeProjectAttachmentId": Required. The ID to use for the Runtime
17044 // Project Attachment, which will become the final component of the Runtime
17045 // Project Attachment's name. The ID must be the same as the project ID of the
17046 // Google cloud project specified in the
17047 // runtime_project_attachment.runtime_project field.
17048 func (c *ProjectsLocationsRuntimeProjectAttachmentsCreateCall) RuntimeProjectAttachmentId(runtimeProjectAttachmentId string) *ProjectsLocationsRuntimeProjectAttachmentsCreateCall {
17049 c.urlParams_.Set("runtimeProjectAttachmentId", runtimeProjectAttachmentId)
17050 return c
17051 }
17052
17053 // Fields allows partial responses to be retrieved. See
17054 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17055 // details.
17056 func (c *ProjectsLocationsRuntimeProjectAttachmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeProjectAttachmentsCreateCall {
17057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17058 return c
17059 }
17060
17061 // Context sets the context to be used in this call's Do method.
17062 func (c *ProjectsLocationsRuntimeProjectAttachmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsRuntimeProjectAttachmentsCreateCall {
17063 c.ctx_ = ctx
17064 return c
17065 }
17066
17067 // Header returns a http.Header that can be modified by the caller to add
17068 // headers to the request.
17069 func (c *ProjectsLocationsRuntimeProjectAttachmentsCreateCall) Header() http.Header {
17070 if c.header_ == nil {
17071 c.header_ = make(http.Header)
17072 }
17073 return c.header_
17074 }
17075
17076 func (c *ProjectsLocationsRuntimeProjectAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) {
17077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17078 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudapihubv1runtimeprojectattachment)
17079 if err != nil {
17080 return nil, err
17081 }
17082 c.urlParams_.Set("alt", alt)
17083 c.urlParams_.Set("prettyPrint", "false")
17084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runtimeProjectAttachments")
17085 urls += "?" + c.urlParams_.Encode()
17086 req, err := http.NewRequest("POST", urls, body)
17087 if err != nil {
17088 return nil, err
17089 }
17090 req.Header = reqHeaders
17091 googleapi.Expand(req.URL, map[string]string{
17092 "parent": c.parent,
17093 })
17094 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.create", "request", internallog.HTTPRequest(req, body.Bytes()))
17095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17096 }
17097
17098 // Do executes the "apihub.projects.locations.runtimeProjectAttachments.create" call.
17099 // Any non-2xx status code is an error. Response headers are in either
17100 // *GoogleCloudApihubV1RuntimeProjectAttachment.ServerResponse.Header or (if a
17101 // response was returned at all) in error.(*googleapi.Error).Header. Use
17102 // googleapi.IsNotModified to check whether the returned error was because
17103 // http.StatusNotModified was returned.
17104 func (c *ProjectsLocationsRuntimeProjectAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1RuntimeProjectAttachment, error) {
17105 gensupport.SetOptions(c.urlParams_, opts...)
17106 res, err := c.doRequest("json")
17107 if res != nil && res.StatusCode == http.StatusNotModified {
17108 if res.Body != nil {
17109 res.Body.Close()
17110 }
17111 return nil, gensupport.WrapError(&googleapi.Error{
17112 Code: res.StatusCode,
17113 Header: res.Header,
17114 })
17115 }
17116 if err != nil {
17117 return nil, err
17118 }
17119 defer googleapi.CloseBody(res)
17120 if err := googleapi.CheckResponse(res); err != nil {
17121 return nil, gensupport.WrapError(err)
17122 }
17123 ret := &GoogleCloudApihubV1RuntimeProjectAttachment{
17124 ServerResponse: googleapi.ServerResponse{
17125 Header: res.Header,
17126 HTTPStatusCode: res.StatusCode,
17127 },
17128 }
17129 target := &ret
17130 b, err := gensupport.DecodeResponseBytes(target, res)
17131 if err != nil {
17132 return nil, err
17133 }
17134 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.create", "response", internallog.HTTPResponse(res, b))
17135 return ret, nil
17136 }
17137
17138 type ProjectsLocationsRuntimeProjectAttachmentsDeleteCall struct {
17139 s *Service
17140 name string
17141 urlParams_ gensupport.URLParams
17142 ctx_ context.Context
17143 header_ http.Header
17144 }
17145
17146 // Delete: Delete a runtime project attachment in the API Hub. This call will
17147 // detach the runtime project from the host project.
17148 //
17149 // - name: The name of the Runtime Project Attachment to delete. Format:
17150 // `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime
17151 // _project_attachment}`.
17152 func (r *ProjectsLocationsRuntimeProjectAttachmentsService) Delete(name string) *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall {
17153 c := &ProjectsLocationsRuntimeProjectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17154 c.name = name
17155 return c
17156 }
17157
17158 // Fields allows partial responses to be retrieved. See
17159 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17160 // details.
17161 func (c *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall {
17162 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17163 return c
17164 }
17165
17166 // Context sets the context to be used in this call's Do method.
17167 func (c *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall {
17168 c.ctx_ = ctx
17169 return c
17170 }
17171
17172 // Header returns a http.Header that can be modified by the caller to add
17173 // headers to the request.
17174 func (c *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall) Header() http.Header {
17175 if c.header_ == nil {
17176 c.header_ = make(http.Header)
17177 }
17178 return c.header_
17179 }
17180
17181 func (c *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
17182 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17183 c.urlParams_.Set("alt", alt)
17184 c.urlParams_.Set("prettyPrint", "false")
17185 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
17186 urls += "?" + c.urlParams_.Encode()
17187 req, err := http.NewRequest("DELETE", urls, nil)
17188 if err != nil {
17189 return nil, err
17190 }
17191 req.Header = reqHeaders
17192 googleapi.Expand(req.URL, map[string]string{
17193 "name": c.name,
17194 })
17195 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.delete", "request", internallog.HTTPRequest(req, nil))
17196 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17197 }
17198
17199 // Do executes the "apihub.projects.locations.runtimeProjectAttachments.delete" call.
17200 // Any non-2xx status code is an error. Response headers are in either
17201 // *Empty.ServerResponse.Header or (if a response was returned at all) in
17202 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17203 // whether the returned error was because http.StatusNotModified was returned.
17204 func (c *ProjectsLocationsRuntimeProjectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17205 gensupport.SetOptions(c.urlParams_, opts...)
17206 res, err := c.doRequest("json")
17207 if res != nil && res.StatusCode == http.StatusNotModified {
17208 if res.Body != nil {
17209 res.Body.Close()
17210 }
17211 return nil, gensupport.WrapError(&googleapi.Error{
17212 Code: res.StatusCode,
17213 Header: res.Header,
17214 })
17215 }
17216 if err != nil {
17217 return nil, err
17218 }
17219 defer googleapi.CloseBody(res)
17220 if err := googleapi.CheckResponse(res); err != nil {
17221 return nil, gensupport.WrapError(err)
17222 }
17223 ret := &Empty{
17224 ServerResponse: googleapi.ServerResponse{
17225 Header: res.Header,
17226 HTTPStatusCode: res.StatusCode,
17227 },
17228 }
17229 target := &ret
17230 b, err := gensupport.DecodeResponseBytes(target, res)
17231 if err != nil {
17232 return nil, err
17233 }
17234 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.delete", "response", internallog.HTTPResponse(res, b))
17235 return ret, nil
17236 }
17237
17238 type ProjectsLocationsRuntimeProjectAttachmentsGetCall struct {
17239 s *Service
17240 name string
17241 urlParams_ gensupport.URLParams
17242 ifNoneMatch_ string
17243 ctx_ context.Context
17244 header_ http.Header
17245 }
17246
17247 // Get: Gets a runtime project attachment.
17248 //
17249 // - name: The name of the API resource to retrieve. Format:
17250 // `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime
17251 // _project_attachment}`.
17252 func (r *ProjectsLocationsRuntimeProjectAttachmentsService) Get(name string) *ProjectsLocationsRuntimeProjectAttachmentsGetCall {
17253 c := &ProjectsLocationsRuntimeProjectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17254 c.name = name
17255 return c
17256 }
17257
17258 // Fields allows partial responses to be retrieved. See
17259 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17260 // details.
17261 func (c *ProjectsLocationsRuntimeProjectAttachmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeProjectAttachmentsGetCall {
17262 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17263 return c
17264 }
17265
17266 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17267 // object's ETag matches the given value. This is useful for getting updates
17268 // only after the object has changed since the last request.
17269 func (c *ProjectsLocationsRuntimeProjectAttachmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeProjectAttachmentsGetCall {
17270 c.ifNoneMatch_ = entityTag
17271 return c
17272 }
17273
17274 // Context sets the context to be used in this call's Do method.
17275 func (c *ProjectsLocationsRuntimeProjectAttachmentsGetCall) Context(ctx context.Context) *ProjectsLocationsRuntimeProjectAttachmentsGetCall {
17276 c.ctx_ = ctx
17277 return c
17278 }
17279
17280 // Header returns a http.Header that can be modified by the caller to add
17281 // headers to the request.
17282 func (c *ProjectsLocationsRuntimeProjectAttachmentsGetCall) Header() http.Header {
17283 if c.header_ == nil {
17284 c.header_ = make(http.Header)
17285 }
17286 return c.header_
17287 }
17288
17289 func (c *ProjectsLocationsRuntimeProjectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
17290 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17291 if c.ifNoneMatch_ != "" {
17292 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17293 }
17294 c.urlParams_.Set("alt", alt)
17295 c.urlParams_.Set("prettyPrint", "false")
17296 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
17297 urls += "?" + c.urlParams_.Encode()
17298 req, err := http.NewRequest("GET", urls, nil)
17299 if err != nil {
17300 return nil, err
17301 }
17302 req.Header = reqHeaders
17303 googleapi.Expand(req.URL, map[string]string{
17304 "name": c.name,
17305 })
17306 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.get", "request", internallog.HTTPRequest(req, nil))
17307 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17308 }
17309
17310 // Do executes the "apihub.projects.locations.runtimeProjectAttachments.get" call.
17311 // Any non-2xx status code is an error. Response headers are in either
17312 // *GoogleCloudApihubV1RuntimeProjectAttachment.ServerResponse.Header or (if a
17313 // response was returned at all) in error.(*googleapi.Error).Header. Use
17314 // googleapi.IsNotModified to check whether the returned error was because
17315 // http.StatusNotModified was returned.
17316 func (c *ProjectsLocationsRuntimeProjectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1RuntimeProjectAttachment, error) {
17317 gensupport.SetOptions(c.urlParams_, opts...)
17318 res, err := c.doRequest("json")
17319 if res != nil && res.StatusCode == http.StatusNotModified {
17320 if res.Body != nil {
17321 res.Body.Close()
17322 }
17323 return nil, gensupport.WrapError(&googleapi.Error{
17324 Code: res.StatusCode,
17325 Header: res.Header,
17326 })
17327 }
17328 if err != nil {
17329 return nil, err
17330 }
17331 defer googleapi.CloseBody(res)
17332 if err := googleapi.CheckResponse(res); err != nil {
17333 return nil, gensupport.WrapError(err)
17334 }
17335 ret := &GoogleCloudApihubV1RuntimeProjectAttachment{
17336 ServerResponse: googleapi.ServerResponse{
17337 Header: res.Header,
17338 HTTPStatusCode: res.StatusCode,
17339 },
17340 }
17341 target := &ret
17342 b, err := gensupport.DecodeResponseBytes(target, res)
17343 if err != nil {
17344 return nil, err
17345 }
17346 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.get", "response", internallog.HTTPResponse(res, b))
17347 return ret, nil
17348 }
17349
17350 type ProjectsLocationsRuntimeProjectAttachmentsListCall struct {
17351 s *Service
17352 parent string
17353 urlParams_ gensupport.URLParams
17354 ifNoneMatch_ string
17355 ctx_ context.Context
17356 header_ http.Header
17357 }
17358
17359 // List: List runtime projects attached to the host project.
17360 //
17361 // - parent: The parent, which owns this collection of runtime project
17362 // attachments. Format: `projects/{project}/locations/{location}`.
17363 func (r *ProjectsLocationsRuntimeProjectAttachmentsService) List(parent string) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17364 c := &ProjectsLocationsRuntimeProjectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17365 c.parent = parent
17366 return c
17367 }
17368
17369 // Filter sets the optional parameter "filter": An expression that filters the
17370 // list of RuntimeProjectAttachments. A filter expression consists of a field
17371 // name, a comparison operator, and a value for filtering. The value must be a
17372 // string. All standard operators as documented at https://google.aip.dev/160
17373 // are supported. The following fields in the `RuntimeProjectAttachment` are
17374 // eligible for filtering: * `name` - The name of the RuntimeProjectAttachment.
17375 // * `create_time` - The time at which the RuntimeProjectAttachment was
17376 // created. The value should be in the
17377 // (RFC3339)[https://tools.ietf.org/html/rfc3339] format. * `runtime_project` -
17378 // The Google cloud project associated with the RuntimeProjectAttachment.
17379 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) Filter(filter string) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17380 c.urlParams_.Set("filter", filter)
17381 return c
17382 }
17383
17384 // OrderBy sets the optional parameter "orderBy": Hint for how to order the
17385 // results.
17386 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) OrderBy(orderBy string) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17387 c.urlParams_.Set("orderBy", orderBy)
17388 return c
17389 }
17390
17391 // PageSize sets the optional parameter "pageSize": The maximum number of
17392 // runtime project attachments to return. The service may return fewer than
17393 // this value. If unspecified, at most 50 runtime project attachments will be
17394 // returned. The maximum value is 1000; values above 1000 will be coerced to
17395 // 1000.
17396 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) PageSize(pageSize int64) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17397 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17398 return c
17399 }
17400
17401 // PageToken sets the optional parameter "pageToken": A page token, received
17402 // from a previous `ListRuntimeProjectAttachments` call. Provide this to
17403 // retrieve the subsequent page. When paginating, all other parameters (except
17404 // page_size) provided to `ListRuntimeProjectAttachments` must match the call
17405 // that provided the page token.
17406 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) PageToken(pageToken string) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17407 c.urlParams_.Set("pageToken", pageToken)
17408 return c
17409 }
17410
17411 // Fields allows partial responses to be retrieved. See
17412 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
17413 // details.
17414 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17415 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17416 return c
17417 }
17418
17419 // IfNoneMatch sets an optional parameter which makes the operation fail if the
17420 // object's ETag matches the given value. This is useful for getting updates
17421 // only after the object has changed since the last request.
17422 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17423 c.ifNoneMatch_ = entityTag
17424 return c
17425 }
17426
17427 // Context sets the context to be used in this call's Do method.
17428 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) Context(ctx context.Context) *ProjectsLocationsRuntimeProjectAttachmentsListCall {
17429 c.ctx_ = ctx
17430 return c
17431 }
17432
17433 // Header returns a http.Header that can be modified by the caller to add
17434 // headers to the request.
17435 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) Header() http.Header {
17436 if c.header_ == nil {
17437 c.header_ = make(http.Header)
17438 }
17439 return c.header_
17440 }
17441
17442 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) doRequest(alt string) (*http.Response, error) {
17443 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17444 if c.ifNoneMatch_ != "" {
17445 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17446 }
17447 c.urlParams_.Set("alt", alt)
17448 c.urlParams_.Set("prettyPrint", "false")
17449 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runtimeProjectAttachments")
17450 urls += "?" + c.urlParams_.Encode()
17451 req, err := http.NewRequest("GET", urls, nil)
17452 if err != nil {
17453 return nil, err
17454 }
17455 req.Header = reqHeaders
17456 googleapi.Expand(req.URL, map[string]string{
17457 "parent": c.parent,
17458 })
17459 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.list", "request", internallog.HTTPRequest(req, nil))
17460 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17461 }
17462
17463 // Do executes the "apihub.projects.locations.runtimeProjectAttachments.list" call.
17464 // Any non-2xx status code is an error. Response headers are in either
17465 // *GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse.ServerResponse.Head
17466 // er or (if a response was returned at all) in
17467 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17468 // whether the returned error was because http.StatusNotModified was returned.
17469 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse, error) {
17470 gensupport.SetOptions(c.urlParams_, opts...)
17471 res, err := c.doRequest("json")
17472 if res != nil && res.StatusCode == http.StatusNotModified {
17473 if res.Body != nil {
17474 res.Body.Close()
17475 }
17476 return nil, gensupport.WrapError(&googleapi.Error{
17477 Code: res.StatusCode,
17478 Header: res.Header,
17479 })
17480 }
17481 if err != nil {
17482 return nil, err
17483 }
17484 defer googleapi.CloseBody(res)
17485 if err := googleapi.CheckResponse(res); err != nil {
17486 return nil, gensupport.WrapError(err)
17487 }
17488 ret := &GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse{
17489 ServerResponse: googleapi.ServerResponse{
17490 Header: res.Header,
17491 HTTPStatusCode: res.StatusCode,
17492 },
17493 }
17494 target := &ret
17495 b, err := gensupport.DecodeResponseBytes(target, res)
17496 if err != nil {
17497 return nil, err
17498 }
17499 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "apihub.projects.locations.runtimeProjectAttachments.list", "response", internallog.HTTPResponse(res, b))
17500 return ret, nil
17501 }
17502
17503 // Pages invokes f for each page of results.
17504 // A non-nil error returned from f will halt the iteration.
17505 // The provided context supersedes any context provided to the Context method.
17506 func (c *ProjectsLocationsRuntimeProjectAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse) error) error {
17507 c.ctx_ = ctx
17508 defer c.PageToken(c.urlParams_.Get("pageToken"))
17509 for {
17510 x, err := c.Do()
17511 if err != nil {
17512 return err
17513 }
17514 if err := f(x); err != nil {
17515 return err
17516 }
17517 if x.NextPageToken == "" {
17518 return nil
17519 }
17520 c.PageToken(x.NextPageToken)
17521 }
17522 }