Debian Codegraph @

trafficdirector/v2/trafficdirector-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 trafficdirector provides access to the Traffic Director API.
8 //
9 // For product documentation, see: https://cloud.google.com/traffic-director
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/trafficdirector/v2"
27 // ...
28 // ctx := context.Background()
29 // trafficdirectorService, err := trafficdirector.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 // trafficdirectorService, err := trafficdirector.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 // trafficdirectorService, err := trafficdirector.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package trafficdirector // import "google.golang.org/api/trafficdirector/v2"
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 = "trafficdirector:v2"
93 const apiName = "trafficdirector"
94 const apiVersion = "v2"
95 const basePath = "https://trafficdirector.googleapis.com/"
96 const basePathTemplate = "https://trafficdirector.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://trafficdirector.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.Discovery = NewDiscoveryService(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 Discovery *DiscoveryService
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 NewDiscoveryService(s *Service) *DiscoveryService {
158 rs := &DiscoveryService{s: s}
159 return rs
160 }
161
162 type DiscoveryService struct {
163 s *Service
164 }
165
166 // Address: Addresses specify either a logical or physical address and port,
167 // which are used to tell Envoy where to bind/listen, connect to upstream and
168 // find management servers.
169 type Address struct {
170 Pipe *Pipe `json:"pipe,omitempty"`
171 SocketAddress *SocketAddress `json:"socketAddress,omitempty"`
172 // ForceSendFields is a list of field names (e.g. "Pipe") to unconditionally
173 // include in API requests. By default, fields with empty or default values are
174 // omitted from API requests. See
175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
176 // details.
177 ForceSendFields []string `json:"-"`
178 // NullFields is a list of field names (e.g. "Pipe") to include in API requests
179 // with the JSON null value. By default, fields with empty values are omitted
180 // from API requests. See
181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
182 NullFields []string `json:"-"`
183 }
184
185 func (s Address) MarshalJSON() ([]byte, error) {
186 type NoMethod Address
187 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
188 }
189
190 // BuildVersion: BuildVersion combines SemVer version of extension with
191 // free-form build information (i.e. 'alpha', 'private-build') as a set of
192 // strings.
193 type BuildVersion struct {
194 // Metadata: Free-form build information. Envoy defines several well known keys
195 // in the source/common/version/version.h file
196 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
197 // Version: SemVer version of extension.
198 Version *SemanticVersion `json:"version,omitempty"`
199 // ForceSendFields is a list of field names (e.g. "Metadata") to
200 // unconditionally include in API requests. By default, fields with empty or
201 // default values are omitted from API requests. See
202 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
203 // details.
204 ForceSendFields []string `json:"-"`
205 // NullFields is a list of field names (e.g. "Metadata") to include in API
206 // requests with the JSON null value. By default, fields with empty values are
207 // omitted from API requests. See
208 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
209 NullFields []string `json:"-"`
210 }
211
212 func (s BuildVersion) MarshalJSON() ([]byte, error) {
213 type NoMethod BuildVersion
214 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
215 }
216
217 // ClientConfig: All xds configs for a particular client.
218 type ClientConfig struct {
219 // Node: Node for a particular client.
220 Node *Node `json:"node,omitempty"`
221 XdsConfig []*PerXdsConfig `json:"xdsConfig,omitempty"`
222 // ForceSendFields is a list of field names (e.g. "Node") to unconditionally
223 // include in API requests. By default, fields with empty or default values are
224 // omitted from API requests. See
225 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
226 // details.
227 ForceSendFields []string `json:"-"`
228 // NullFields is a list of field names (e.g. "Node") to include in API requests
229 // with the JSON null value. By default, fields with empty values are omitted
230 // from API requests. See
231 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
232 NullFields []string `json:"-"`
233 }
234
235 func (s ClientConfig) MarshalJSON() ([]byte, error) {
236 type NoMethod ClientConfig
237 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
238 }
239
240 // ClientStatusRequest: Request for client status of clients identified by a
241 // list of NodeMatchers.
242 type ClientStatusRequest struct {
243 // NodeMatchers: Management server can use these match criteria to identify
244 // clients. The match follows OR semantics.
245 NodeMatchers []*NodeMatcher `json:"nodeMatchers,omitempty"`
246 // ForceSendFields is a list of field names (e.g. "NodeMatchers") to
247 // unconditionally include in API requests. By default, fields with empty or
248 // default values are omitted from API requests. See
249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
250 // details.
251 ForceSendFields []string `json:"-"`
252 // NullFields is a list of field names (e.g. "NodeMatchers") to include in API
253 // requests with the JSON null value. By default, fields with empty values are
254 // omitted from API requests. See
255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
256 NullFields []string `json:"-"`
257 }
258
259 func (s ClientStatusRequest) MarshalJSON() ([]byte, error) {
260 type NoMethod ClientStatusRequest
261 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
262 }
263
264 type ClientStatusResponse struct {
265 // Config: Client configs for the clients specified in the ClientStatusRequest.
266 Config []*ClientConfig `json:"config,omitempty"`
267
268 // ServerResponse contains the HTTP response code and headers from the server.
269 googleapi.ServerResponse `json:"-"`
270 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
271 // include in API requests. By default, fields with empty or default values are
272 // omitted from API requests. See
273 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
274 // details.
275 ForceSendFields []string `json:"-"`
276 // NullFields is a list of field names (e.g. "Config") to include in API
277 // requests with the JSON null value. By default, fields with empty values are
278 // omitted from API requests. See
279 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
280 NullFields []string `json:"-"`
281 }
282
283 func (s ClientStatusResponse) MarshalJSON() ([]byte, error) {
284 type NoMethod ClientStatusResponse
285 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
286 }
287
288 // ClustersConfigDump: Envoy's cluster manager fills this message with all
289 // currently known clusters. Cluster configuration information can be used to
290 // recreate an Envoy configuration by populating all clusters as static
291 // clusters or by returning them in a CDS response.
292 type ClustersConfigDump struct {
293 // DynamicActiveClusters: The dynamically loaded active clusters. These are
294 // clusters that are available to service data plane traffic.
295 DynamicActiveClusters []*DynamicCluster `json:"dynamicActiveClusters,omitempty"`
296 // DynamicWarmingClusters: The dynamically loaded warming clusters. These are
297 // clusters that are currently undergoing warming in preparation to service
298 // data plane traffic. Note that if attempting to recreate an Envoy
299 // configuration from a configuration dump, the warming clusters should
300 // generally be discarded.
301 DynamicWarmingClusters []*DynamicCluster `json:"dynamicWarmingClusters,omitempty"`
302 // StaticClusters: The statically loaded cluster configs.
303 StaticClusters []*StaticCluster `json:"staticClusters,omitempty"`
304 // VersionInfo: This is the :ref:`version_info ` in the last processed CDS
305 // discovery response. If there are only static bootstrap clusters, this field
306 // will be "".
307 VersionInfo string `json:"versionInfo,omitempty"`
308 // ForceSendFields is a list of field names (e.g. "DynamicActiveClusters") to
309 // unconditionally include in API requests. By default, fields with empty or
310 // default values are omitted from API requests. See
311 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
312 // details.
313 ForceSendFields []string `json:"-"`
314 // NullFields is a list of field names (e.g. "DynamicActiveClusters") to
315 // include in API requests with the JSON null value. By default, fields with
316 // empty values are omitted from API requests. See
317 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
318 NullFields []string `json:"-"`
319 }
320
321 func (s ClustersConfigDump) MarshalJSON() ([]byte, error) {
322 type NoMethod ClustersConfigDump
323 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
324 }
325
326 // DoubleMatcher: Specifies the way to match a double value.
327 type DoubleMatcher struct {
328 // Exact: If specified, the input double value must be equal to the value
329 // specified here.
330 Exact float64 `json:"exact,omitempty"`
331 // Range: If specified, the input double value must be in the range specified
332 // here. Note: The range is using half-open interval semantics [start, end).
333 Range *DoubleRange `json:"range,omitempty"`
334 // ForceSendFields is a list of field names (e.g. "Exact") to unconditionally
335 // include in API requests. By default, fields with empty or default values are
336 // omitted from API requests. See
337 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
338 // details.
339 ForceSendFields []string `json:"-"`
340 // NullFields is a list of field names (e.g. "Exact") to include in API
341 // requests with the JSON null value. By default, fields with empty values are
342 // omitted from API requests. See
343 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
344 NullFields []string `json:"-"`
345 }
346
347 func (s DoubleMatcher) MarshalJSON() ([]byte, error) {
348 type NoMethod DoubleMatcher
349 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
350 }
351
352 func (s *DoubleMatcher) UnmarshalJSON(data []byte) error {
353 type NoMethod DoubleMatcher
354 var s1 struct {
355 Exact gensupport.JSONFloat64 `json:"exact"`
356 *NoMethod
357 }
358 s1.NoMethod = (*NoMethod)(s)
359 if err := json.Unmarshal(data, &s1); err != nil {
360 return err
361 }
362 s.Exact = float64(s1.Exact)
363 return nil
364 }
365
366 // DoubleRange: Specifies the double start and end of the range using half-open
367 // interval semantics [start, end).
368 type DoubleRange struct {
369 // End: end of the range (exclusive)
370 End float64 `json:"end,omitempty"`
371 // Start: start of the range (inclusive)
372 Start float64 `json:"start,omitempty"`
373 // ForceSendFields is a list of field names (e.g. "End") to unconditionally
374 // include in API requests. By default, fields with empty or default values are
375 // omitted from API requests. See
376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
377 // details.
378 ForceSendFields []string `json:"-"`
379 // NullFields is a list of field names (e.g. "End") to include in API requests
380 // with the JSON null value. By default, fields with empty values are omitted
381 // from API requests. See
382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
383 NullFields []string `json:"-"`
384 }
385
386 func (s DoubleRange) MarshalJSON() ([]byte, error) {
387 type NoMethod DoubleRange
388 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
389 }
390
391 func (s *DoubleRange) UnmarshalJSON(data []byte) error {
392 type NoMethod DoubleRange
393 var s1 struct {
394 End gensupport.JSONFloat64 `json:"end"`
395 Start gensupport.JSONFloat64 `json:"start"`
396 *NoMethod
397 }
398 s1.NoMethod = (*NoMethod)(s)
399 if err := json.Unmarshal(data, &s1); err != nil {
400 return err
401 }
402 s.End = float64(s1.End)
403 s.Start = float64(s1.Start)
404 return nil
405 }
406
407 // DynamicCluster: Describes a dynamically loaded cluster via the CDS API.
408 type DynamicCluster struct {
409 // Cluster: The cluster config.
410 Cluster googleapi.RawMessage `json:"cluster,omitempty"`
411 // LastUpdated: The timestamp when the Cluster was last updated.
412 LastUpdated string `json:"lastUpdated,omitempty"`
413 // VersionInfo: This is the per-resource version information. This version is
414 // currently taken from the :ref:`version_info ` field at the time that the
415 // cluster was loaded. In the future, discrete per-cluster versions may be
416 // supported by the API.
417 VersionInfo string `json:"versionInfo,omitempty"`
418 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
419 // include in API requests. By default, fields with empty or default values are
420 // omitted from API requests. See
421 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
422 // details.
423 ForceSendFields []string `json:"-"`
424 // NullFields is a list of field names (e.g. "Cluster") to include in API
425 // requests with the JSON null value. By default, fields with empty values are
426 // omitted from API requests. See
427 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
428 NullFields []string `json:"-"`
429 }
430
431 func (s DynamicCluster) MarshalJSON() ([]byte, error) {
432 type NoMethod DynamicCluster
433 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
434 }
435
436 // DynamicListener: Describes a dynamically loaded listener via the LDS API.
437 // [#next-free-field: 6]
438 type DynamicListener struct {
439 // ActiveState: The listener state for any active listener by this name. These
440 // are listeners that are available to service data plane traffic.
441 ActiveState *DynamicListenerState `json:"activeState,omitempty"`
442 // DrainingState: The listener state for any draining listener by this name.
443 // These are listeners that are currently undergoing draining in preparation to
444 // stop servicing data plane traffic. Note that if attempting to recreate an
445 // Envoy configuration from a configuration dump, the draining listeners should
446 // generally be discarded.
447 DrainingState *DynamicListenerState `json:"drainingState,omitempty"`
448 // ErrorState: Set if the last update failed, cleared after the next successful
449 // update.
450 ErrorState *UpdateFailureState `json:"errorState,omitempty"`
451 // Name: The name or unique id of this listener, pulled from the
452 // DynamicListenerState config.
453 Name string `json:"name,omitempty"`
454 // WarmingState: The listener state for any warming listener by this name.
455 // These are listeners that are currently undergoing warming in preparation to
456 // service data plane traffic. Note that if attempting to recreate an Envoy
457 // configuration from a configuration dump, the warming listeners should
458 // generally be discarded.
459 WarmingState *DynamicListenerState `json:"warmingState,omitempty"`
460 // ForceSendFields is a list of field names (e.g. "ActiveState") to
461 // unconditionally include in API requests. By default, fields with empty or
462 // default values are omitted from API requests. See
463 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
464 // details.
465 ForceSendFields []string `json:"-"`
466 // NullFields is a list of field names (e.g. "ActiveState") to include in API
467 // requests with the JSON null value. By default, fields with empty values are
468 // omitted from API requests. See
469 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
470 NullFields []string `json:"-"`
471 }
472
473 func (s DynamicListener) MarshalJSON() ([]byte, error) {
474 type NoMethod DynamicListener
475 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
476 }
477
478 type DynamicListenerState struct {
479 // LastUpdated: The timestamp when the Listener was last successfully updated.
480 LastUpdated string `json:"lastUpdated,omitempty"`
481 // Listener: The listener config.
482 Listener googleapi.RawMessage `json:"listener,omitempty"`
483 // VersionInfo: This is the per-resource version information. This version is
484 // currently taken from the :ref:`version_info ` field at the time that the
485 // listener was loaded. In the future, discrete per-listener versions may be
486 // supported by the API.
487 VersionInfo string `json:"versionInfo,omitempty"`
488 // ForceSendFields is a list of field names (e.g. "LastUpdated") to
489 // unconditionally include in API requests. By default, fields with empty or
490 // default values are omitted from API requests. See
491 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
492 // details.
493 ForceSendFields []string `json:"-"`
494 // NullFields is a list of field names (e.g. "LastUpdated") to include in API
495 // requests with the JSON null value. By default, fields with empty values are
496 // omitted from API requests. See
497 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
498 NullFields []string `json:"-"`
499 }
500
501 func (s DynamicListenerState) MarshalJSON() ([]byte, error) {
502 type NoMethod DynamicListenerState
503 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
504 }
505
506 type DynamicRouteConfig struct {
507 // LastUpdated: The timestamp when the Route was last updated.
508 LastUpdated string `json:"lastUpdated,omitempty"`
509 // RouteConfig: The route config.
510 RouteConfig googleapi.RawMessage `json:"routeConfig,omitempty"`
511 // VersionInfo: This is the per-resource version information. This version is
512 // currently taken from the :ref:`version_info ` field at the time that the
513 // route configuration was loaded.
514 VersionInfo string `json:"versionInfo,omitempty"`
515 // ForceSendFields is a list of field names (e.g. "LastUpdated") to
516 // unconditionally include in API requests. By default, fields with empty or
517 // default values are omitted from API requests. See
518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
519 // details.
520 ForceSendFields []string `json:"-"`
521 // NullFields is a list of field names (e.g. "LastUpdated") to include in API
522 // requests with the JSON null value. By default, fields with empty values are
523 // omitted from API requests. See
524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
525 NullFields []string `json:"-"`
526 }
527
528 func (s DynamicRouteConfig) MarshalJSON() ([]byte, error) {
529 type NoMethod DynamicRouteConfig
530 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
531 }
532
533 type DynamicScopedRouteConfigs struct {
534 // LastUpdated: The timestamp when the scoped route config set was last
535 // updated.
536 LastUpdated string `json:"lastUpdated,omitempty"`
537 // Name: The name assigned to the scoped route configurations.
538 Name string `json:"name,omitempty"`
539 // ScopedRouteConfigs: The scoped route configurations.
540 ScopedRouteConfigs []googleapi.RawMessage `json:"scopedRouteConfigs,omitempty"`
541 // VersionInfo: This is the per-resource version information. This version is
542 // currently taken from the :ref:`version_info ` field at the time that the
543 // scoped routes configuration was loaded.
544 VersionInfo string `json:"versionInfo,omitempty"`
545 // ForceSendFields is a list of field names (e.g. "LastUpdated") to
546 // unconditionally include in API requests. By default, fields with empty or
547 // default values are omitted from API requests. See
548 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
549 // details.
550 ForceSendFields []string `json:"-"`
551 // NullFields is a list of field names (e.g. "LastUpdated") to include in API
552 // requests with the JSON null value. By default, fields with empty values are
553 // omitted from API requests. See
554 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
555 NullFields []string `json:"-"`
556 }
557
558 func (s DynamicScopedRouteConfigs) MarshalJSON() ([]byte, error) {
559 type NoMethod DynamicScopedRouteConfigs
560 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
561 }
562
563 // Extension: Version and identification for an Envoy extension.
564 // [#next-free-field: 6]
565 type Extension struct {
566 // Category: Category of the extension. Extension category names use reverse
567 // DNS notation. For instance "envoy.filters.listener" for Envoy's built-in
568 // listener filters or "com.acme.filters.http" for HTTP filters from acme.com
569 // vendor. [#comment:
570 Category string `json:"category,omitempty"`
571 // Disabled: Indicates that the extension is present but was disabled via
572 // dynamic configuration.
573 Disabled bool `json:"disabled,omitempty"`
574 // Name: This is the name of the Envoy filter as specified in the Envoy
575 // configuration, e.g. envoy.filters.http.router, com.acme.widget.
576 Name string `json:"name,omitempty"`
577 // TypeDescriptor: [#not-implemented-hide:] Type descriptor of extension
578 // configuration proto. [#comment:
579 TypeDescriptor string `json:"typeDescriptor,omitempty"`
580 // Version: The version is a property of the extension and maintained
581 // independently of other extensions and the Envoy API. This field is not set
582 // when extension did not provide version information.
583 Version *BuildVersion `json:"version,omitempty"`
584 // ForceSendFields is a list of field names (e.g. "Category") to
585 // unconditionally include in API requests. By default, fields with empty or
586 // default values are omitted from API requests. See
587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
588 // details.
589 ForceSendFields []string `json:"-"`
590 // NullFields is a list of field names (e.g. "Category") to include in API
591 // requests with the JSON null value. By default, fields with empty values are
592 // omitted from API requests. See
593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
594 NullFields []string `json:"-"`
595 }
596
597 func (s Extension) MarshalJSON() ([]byte, error) {
598 type NoMethod Extension
599 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
600 }
601
602 // GoogleRE2: Google's `RE2 `_ regex engine. The regex string must adhere to
603 // the documented `syntax `_. The engine is designed to complete execution in
604 // linear time as well as limit the amount of memory used. Envoy supports
605 // program size checking via runtime. The runtime keys
606 // “re2.max_program_size.error_level“ and “re2.max_program_size.warn_level“
607 // can be set to integers as the maximum program size or complexity that a
608 // compiled regex can have before an exception is thrown or a warning is
609 // logged, respectively. “re2.max_program_size.error_level“ defaults to 100,
610 // and “re2.max_program_size.warn_level“ has no default if unset (will not
611 // check/log a warning). Envoy emits two stats for tracking the program size of
612 // regexes: the histogram `re2.program_size`, which records the program size,
613 // and the counter `re2.exceeded_warn_level`, which is incremented each time
614 // the program size exceeds the warn level threshold.
615 type GoogleRE2 struct {
616 // MaxProgramSize: This field controls the RE2 "program size" which is a rough
617 // estimate of how complex a compiled regex is to evaluate. A regex that has a
618 // program size greater than the configured value will fail to compile. In this
619 // case, the configured max program size can be increased or the regex can be
620 // simplified. If not specified, the default is 100. This field is deprecated;
621 // regexp validation should be performed on the management server instead of
622 // being done by each individual client.
623 MaxProgramSize int64 `json:"maxProgramSize,omitempty"`
624 // ForceSendFields is a list of field names (e.g. "MaxProgramSize") to
625 // unconditionally include in API requests. By default, fields with empty or
626 // default values are omitted from API requests. See
627 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
628 // details.
629 ForceSendFields []string `json:"-"`
630 // NullFields is a list of field names (e.g. "MaxProgramSize") to include in
631 // API requests with the JSON null value. By default, fields with empty values
632 // are omitted from API requests. See
633 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
634 NullFields []string `json:"-"`
635 }
636
637 func (s GoogleRE2) MarshalJSON() ([]byte, error) {
638 type NoMethod GoogleRE2
639 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
640 }
641
642 type InlineScopedRouteConfigs struct {
643 // LastUpdated: The timestamp when the scoped route config set was last
644 // updated.
645 LastUpdated string `json:"lastUpdated,omitempty"`
646 // Name: The name assigned to the scoped route configurations.
647 Name string `json:"name,omitempty"`
648 // ScopedRouteConfigs: The scoped route configurations.
649 ScopedRouteConfigs []googleapi.RawMessage `json:"scopedRouteConfigs,omitempty"`
650 // ForceSendFields is a list of field names (e.g. "LastUpdated") to
651 // unconditionally include in API requests. By default, fields with empty or
652 // default values are omitted from API requests. See
653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
654 // details.
655 ForceSendFields []string `json:"-"`
656 // NullFields is a list of field names (e.g. "LastUpdated") to include in API
657 // requests with the JSON null value. By default, fields with empty values are
658 // omitted from API requests. See
659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
660 NullFields []string `json:"-"`
661 }
662
663 func (s InlineScopedRouteConfigs) MarshalJSON() ([]byte, error) {
664 type NoMethod InlineScopedRouteConfigs
665 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
666 }
667
668 // ListMatcher: Specifies the way to match a list value.
669 type ListMatcher struct {
670 // OneOf: If specified, at least one of the values in the list must match the
671 // value specified.
672 OneOf *ValueMatcher `json:"oneOf,omitempty"`
673 // ForceSendFields is a list of field names (e.g. "OneOf") to unconditionally
674 // include in API requests. By default, fields with empty or default values are
675 // omitted from API requests. See
676 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
677 // details.
678 ForceSendFields []string `json:"-"`
679 // NullFields is a list of field names (e.g. "OneOf") to include in API
680 // requests with the JSON null value. By default, fields with empty values are
681 // omitted from API requests. See
682 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
683 NullFields []string `json:"-"`
684 }
685
686 func (s ListMatcher) MarshalJSON() ([]byte, error) {
687 type NoMethod ListMatcher
688 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
689 }
690
691 // ListenersConfigDump: Envoy's listener manager fills this message with all
692 // currently known listeners. Listener configuration information can be used to
693 // recreate an Envoy configuration by populating all listeners as static
694 // listeners or by returning them in a LDS response.
695 type ListenersConfigDump struct {
696 // DynamicListeners: State for any warming, active, or draining listeners.
697 DynamicListeners []*DynamicListener `json:"dynamicListeners,omitempty"`
698 // StaticListeners: The statically loaded listener configs.
699 StaticListeners []*StaticListener `json:"staticListeners,omitempty"`
700 // VersionInfo: This is the :ref:`version_info ` in the last processed LDS
701 // discovery response. If there are only static bootstrap listeners, this field
702 // will be "".
703 VersionInfo string `json:"versionInfo,omitempty"`
704 // ForceSendFields is a list of field names (e.g. "DynamicListeners") to
705 // unconditionally include in API requests. By default, fields with empty or
706 // default values are omitted from API requests. See
707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
708 // details.
709 ForceSendFields []string `json:"-"`
710 // NullFields is a list of field names (e.g. "DynamicListeners") to include in
711 // API requests with the JSON null value. By default, fields with empty values
712 // are omitted from API requests. See
713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
714 NullFields []string `json:"-"`
715 }
716
717 func (s ListenersConfigDump) MarshalJSON() ([]byte, error) {
718 type NoMethod ListenersConfigDump
719 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
720 }
721
722 // Locality: Identifies location of where either Envoy runs or where upstream
723 // hosts run.
724 type Locality struct {
725 // Region: Region this :ref:`zone ` belongs to.
726 Region string `json:"region,omitempty"`
727 // SubZone: When used for locality of upstream hosts, this field further splits
728 // zone into smaller chunks of sub-zones so they can be load balanced
729 // independently.
730 SubZone string `json:"subZone,omitempty"`
731 // Zone: Defines the local service zone where Envoy is running. Though
732 // optional, it should be set if discovery service routing is used and the
733 // discovery service exposes :ref:`zone data `, either in this message or via
734 // :option:`--service-zone`. The meaning of zone is context dependent, e.g.
735 // `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc.
736 Zone string `json:"zone,omitempty"`
737 // ForceSendFields is a list of field names (e.g. "Region") to unconditionally
738 // include in API requests. By default, fields with empty or default values are
739 // omitted from API requests. See
740 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
741 // details.
742 ForceSendFields []string `json:"-"`
743 // NullFields is a list of field names (e.g. "Region") to include in API
744 // requests with the JSON null value. By default, fields with empty values are
745 // omitted from API requests. See
746 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
747 NullFields []string `json:"-"`
748 }
749
750 func (s Locality) MarshalJSON() ([]byte, error) {
751 type NoMethod Locality
752 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
753 }
754
755 // Node: Identifies a specific Envoy instance. The node identifier is presented
756 // to the management server, which may use this identifier to distinguish per
757 // Envoy configuration for serving. [#next-free-field: 12]
758 type Node struct {
759 // BuildVersion: This is motivated by informing a management server during
760 // canary which version of Envoy is being tested in a heterogeneous fleet. This
761 // will be set by Envoy in management server RPCs. This field is deprecated in
762 // favor of the user_agent_name and user_agent_version values.
763 BuildVersion string `json:"buildVersion,omitempty"`
764 // ClientFeatures: Client feature support list. These are well known features
765 // described in the Envoy API repository for a given major version of an API.
766 // Client features use reverse DNS naming scheme, for example
767 // `com.acme.feature`. See :ref:`the list of features ` that xDS client may
768 // support.
769 ClientFeatures []string `json:"clientFeatures,omitempty"`
770 // Cluster: Defines the local service cluster name where Envoy is running.
771 // Though optional, it should be set if any of the following features are used:
772 // :ref:`statsd `, :ref:`health check cluster verification `, :ref:`runtime
773 // override directory `, :ref:`user agent addition `, :ref:`HTTP global rate
774 // limiting `, :ref:`CDS `, and :ref:`HTTP tracing `, either in this message or
775 // via :option:`--service-cluster`.
776 Cluster string `json:"cluster,omitempty"`
777 // Extensions: List of extensions and their versions supported by the node.
778 Extensions []*Extension `json:"extensions,omitempty"`
779 // Id: An opaque node identifier for the Envoy node. This also provides the
780 // local service node name. It should be set if any of the following features
781 // are used: :ref:`statsd `, :ref:`CDS `, and :ref:`HTTP tracing `, either in
782 // this message or via :option:`--service-node`.
783 Id string `json:"id,omitempty"`
784 // ListeningAddresses: Known listening ports on the node as a generic hint to
785 // the management server for filtering :ref:`listeners ` to be returned. For
786 // example, if there is a listener bound to port 80, the list can optionally
787 // contain the SocketAddress `(0.0.0.0,80)`. The field is optional and just a
788 // hint.
789 ListeningAddresses []*Address `json:"listeningAddresses,omitempty"`
790 // Locality: Locality specifying where the Envoy instance is running.
791 Locality *Locality `json:"locality,omitempty"`
792 // Metadata: Opaque metadata extending the node identifier. Envoy will pass
793 // this directly to the management server.
794 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
795 // UserAgentBuildVersion: Structured version of the entity requesting config.
796 UserAgentBuildVersion *BuildVersion `json:"userAgentBuildVersion,omitempty"`
797 // UserAgentName: Free-form string that identifies the entity requesting
798 // config. E.g. "envoy" or "grpc"
799 UserAgentName string `json:"userAgentName,omitempty"`
800 // UserAgentVersion: Free-form string that identifies the version of the entity
801 // requesting config. E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild"
802 UserAgentVersion string `json:"userAgentVersion,omitempty"`
803 // ForceSendFields is a list of field names (e.g. "BuildVersion") to
804 // unconditionally include in API requests. By default, fields with empty or
805 // default values are omitted from API requests. See
806 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
807 // details.
808 ForceSendFields []string `json:"-"`
809 // NullFields is a list of field names (e.g. "BuildVersion") to include in API
810 // requests with the JSON null value. By default, fields with empty values are
811 // omitted from API requests. See
812 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
813 NullFields []string `json:"-"`
814 }
815
816 func (s Node) MarshalJSON() ([]byte, error) {
817 type NoMethod Node
818 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
819 }
820
821 // NodeMatcher: Specifies the way to match a Node. The match follows AND
822 // semantics.
823 type NodeMatcher struct {
824 // NodeId: Specifies match criteria on the node id.
825 NodeId *StringMatcher `json:"nodeId,omitempty"`
826 // NodeMetadatas: Specifies match criteria on the node metadata.
827 NodeMetadatas []*StructMatcher `json:"nodeMetadatas,omitempty"`
828 // ForceSendFields is a list of field names (e.g. "NodeId") to unconditionally
829 // include in API requests. By default, fields with empty or default values are
830 // omitted from API requests. See
831 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
832 // details.
833 ForceSendFields []string `json:"-"`
834 // NullFields is a list of field names (e.g. "NodeId") to include in API
835 // requests with the JSON null value. By default, fields with empty values are
836 // omitted from API requests. See
837 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
838 NullFields []string `json:"-"`
839 }
840
841 func (s NodeMatcher) MarshalJSON() ([]byte, error) {
842 type NoMethod NodeMatcher
843 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
844 }
845
846 // NullMatch: NullMatch is an empty message to specify a null value.
847 type NullMatch struct {
848 }
849
850 // PathSegment: Specifies the segment in a path to retrieve value from Struct.
851 type PathSegment struct {
852 // Key: If specified, use the key to retrieve the value in a Struct.
853 Key string `json:"key,omitempty"`
854 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally
855 // include in API requests. By default, fields with empty or default values are
856 // omitted from API requests. See
857 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
858 // details.
859 ForceSendFields []string `json:"-"`
860 // NullFields is a list of field names (e.g. "Key") to include in API requests
861 // with the JSON null value. By default, fields with empty values are omitted
862 // from API requests. See
863 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
864 NullFields []string `json:"-"`
865 }
866
867 func (s PathSegment) MarshalJSON() ([]byte, error) {
868 type NoMethod PathSegment
869 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
870 }
871
872 // PerXdsConfig: Detailed config (per xDS) with status. [#next-free-field: 6]
873 type PerXdsConfig struct {
874 ClusterConfig *ClustersConfigDump `json:"clusterConfig,omitempty"`
875 ListenerConfig *ListenersConfigDump `json:"listenerConfig,omitempty"`
876 RouteConfig *RoutesConfigDump `json:"routeConfig,omitempty"`
877 ScopedRouteConfig *ScopedRoutesConfigDump `json:"scopedRouteConfig,omitempty"`
878 // Possible values:
879 // "UNKNOWN" - Status info is not available/unknown.
880 // "SYNCED" - Management server has sent the config to client and received
881 // ACK.
882 // "NOT_SENT" - Config is not sent.
883 // "STALE" - Management server has sent the config to client but hasn’t
884 // received ACK/NACK.
885 // "ERROR" - Management server has sent the config to client but received
886 // NACK.
887 Status string `json:"status,omitempty"`
888 // ForceSendFields is a list of field names (e.g. "ClusterConfig") to
889 // unconditionally include in API requests. By default, fields with empty or
890 // default values are omitted from API requests. See
891 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
892 // details.
893 ForceSendFields []string `json:"-"`
894 // NullFields is a list of field names (e.g. "ClusterConfig") to include in API
895 // requests with the JSON null value. By default, fields with empty values are
896 // omitted from API requests. See
897 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
898 NullFields []string `json:"-"`
899 }
900
901 func (s PerXdsConfig) MarshalJSON() ([]byte, error) {
902 type NoMethod PerXdsConfig
903 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
904 }
905
906 type Pipe struct {
907 // Mode: The mode for the Pipe. Not applicable for abstract sockets.
908 Mode int64 `json:"mode,omitempty"`
909 // Path: Unix Domain Socket path. On Linux, paths starting with '@' will use
910 // the abstract namespace. The starting '@' is replaced by a null byte by
911 // Envoy. Paths starting with '@' will result in an error in environments other
912 // than Linux.
913 Path string `json:"path,omitempty"`
914 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
915 // include in API requests. By default, fields with empty or default values are
916 // omitted from API requests. See
917 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
918 // details.
919 ForceSendFields []string `json:"-"`
920 // NullFields is a list of field names (e.g. "Mode") to include in API requests
921 // with the JSON null value. By default, fields with empty values are omitted
922 // from API requests. See
923 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
924 NullFields []string `json:"-"`
925 }
926
927 func (s Pipe) MarshalJSON() ([]byte, error) {
928 type NoMethod Pipe
929 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
930 }
931
932 // RegexMatcher: A regex matcher designed for safety when used with untrusted
933 // input.
934 type RegexMatcher struct {
935 // GoogleRe2: Google's RE2 regex engine.
936 GoogleRe2 *GoogleRE2 `json:"googleRe2,omitempty"`
937 // Regex: The regex match string. The string must be supported by the
938 // configured engine.
939 Regex string `json:"regex,omitempty"`
940 // ForceSendFields is a list of field names (e.g. "GoogleRe2") to
941 // unconditionally include in API requests. By default, fields with empty or
942 // default values are omitted from API requests. See
943 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
944 // details.
945 ForceSendFields []string `json:"-"`
946 // NullFields is a list of field names (e.g. "GoogleRe2") to include in API
947 // requests with the JSON null value. By default, fields with empty values are
948 // omitted from API requests. See
949 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
950 NullFields []string `json:"-"`
951 }
952
953 func (s RegexMatcher) MarshalJSON() ([]byte, error) {
954 type NoMethod RegexMatcher
955 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
956 }
957
958 // RoutesConfigDump: Envoy's RDS implementation fills this message with all
959 // currently loaded routes, as described by their RouteConfiguration objects.
960 // Static routes that are either defined in the bootstrap configuration or
961 // defined inline while configuring listeners are separated from those
962 // configured dynamically via RDS. Route configuration information can be used
963 // to recreate an Envoy configuration by populating all routes as static routes
964 // or by returning them in RDS responses.
965 type RoutesConfigDump struct {
966 // DynamicRouteConfigs: The dynamically loaded route configs.
967 DynamicRouteConfigs []*DynamicRouteConfig `json:"dynamicRouteConfigs,omitempty"`
968 // StaticRouteConfigs: The statically loaded route configs.
969 StaticRouteConfigs []*StaticRouteConfig `json:"staticRouteConfigs,omitempty"`
970 // ForceSendFields is a list of field names (e.g. "DynamicRouteConfigs") to
971 // unconditionally include in API requests. By default, fields with empty or
972 // default values are omitted from API requests. See
973 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
974 // details.
975 ForceSendFields []string `json:"-"`
976 // NullFields is a list of field names (e.g. "DynamicRouteConfigs") to include
977 // in API requests with the JSON null value. By default, fields with empty
978 // values are omitted from API requests. See
979 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
980 NullFields []string `json:"-"`
981 }
982
983 func (s RoutesConfigDump) MarshalJSON() ([]byte, error) {
984 type NoMethod RoutesConfigDump
985 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
986 }
987
988 // ScopedRoutesConfigDump: Envoy's scoped RDS implementation fills this message
989 // with all currently loaded route configuration scopes (defined via
990 // ScopedRouteConfigurationsSet protos). This message lists both the scopes
991 // defined inline with the higher order object (i.e., the
992 // HttpConnectionManager) and the dynamically obtained scopes via the SRDS API.
993 type ScopedRoutesConfigDump struct {
994 // DynamicScopedRouteConfigs: The dynamically loaded scoped route configs.
995 DynamicScopedRouteConfigs []*DynamicScopedRouteConfigs `json:"dynamicScopedRouteConfigs,omitempty"`
996 // InlineScopedRouteConfigs: The statically loaded scoped route configs.
997 InlineScopedRouteConfigs []*InlineScopedRouteConfigs `json:"inlineScopedRouteConfigs,omitempty"`
998 // ForceSendFields is a list of field names (e.g. "DynamicScopedRouteConfigs")
999 // to unconditionally include in API requests. By default, fields with empty or
1000 // default values are omitted from API requests. See
1001 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1002 // details.
1003 ForceSendFields []string `json:"-"`
1004 // NullFields is a list of field names (e.g. "DynamicScopedRouteConfigs") to
1005 // include in API requests with the JSON null value. By default, fields with
1006 // empty values are omitted from API requests. See
1007 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1008 NullFields []string `json:"-"`
1009 }
1010
1011 func (s ScopedRoutesConfigDump) MarshalJSON() ([]byte, error) {
1012 type NoMethod ScopedRoutesConfigDump
1013 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1014 }
1015
1016 // SemanticVersion: Envoy uses SemVer (https://semver.org/). Major/minor
1017 // versions indicate expected behaviors and APIs, the patch version field is
1018 // used only for security fixes and can be generally ignored.
1019 type SemanticVersion struct {
1020 MajorNumber int64 `json:"majorNumber,omitempty"`
1021 MinorNumber int64 `json:"minorNumber,omitempty"`
1022 Patch int64 `json:"patch,omitempty"`
1023 // ForceSendFields is a list of field names (e.g. "MajorNumber") to
1024 // unconditionally include in API requests. By default, fields with empty or
1025 // default values are omitted from API requests. See
1026 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1027 // details.
1028 ForceSendFields []string `json:"-"`
1029 // NullFields is a list of field names (e.g. "MajorNumber") to include in API
1030 // requests with the JSON null value. By default, fields with empty values are
1031 // omitted from API requests. See
1032 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1033 NullFields []string `json:"-"`
1034 }
1035
1036 func (s SemanticVersion) MarshalJSON() ([]byte, error) {
1037 type NoMethod SemanticVersion
1038 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1039 }
1040
1041 // SocketAddress: [#next-free-field: 7]
1042 type SocketAddress struct {
1043 // Address: The address for this socket. :ref:`Listeners ` will bind to the
1044 // address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to
1045 // bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It
1046 // is possible to distinguish a Listener address via the prefix/suffix matching
1047 // in :ref:`FilterChainMatch `.] When used within an upstream :ref:`BindConfig
1048 // `, the address controls the source address of outbound connections. For
1049 // :ref:`clusters `, the cluster type determines whether the address must be an
1050 // IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS (*STRICT_DNS*
1051 // or *LOGICAL_DNS* clusters). Address resolution can be customized via
1052 // :ref:`resolver_name `.
1053 Address string `json:"address,omitempty"`
1054 // Ipv4Compat: When binding to an IPv6 address above, this enables `IPv4
1055 // compatibility `_. Binding to ``::`` will allow both IPv4 and IPv6
1056 // connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:``.
1057 Ipv4Compat bool `json:"ipv4Compat,omitempty"`
1058 // NamedPort: This is only valid if :ref:`resolver_name ` is specified below
1059 // and the named resolver is capable of named port resolution.
1060 NamedPort string `json:"namedPort,omitempty"`
1061 PortValue int64 `json:"portValue,omitempty"`
1062 // Possible values:
1063 // "TCP"
1064 // "UDP"
1065 Protocol string `json:"protocol,omitempty"`
1066 // ResolverName: The name of the custom resolver. This must have been
1067 // registered with Envoy. If this is empty, a context dependent default
1068 // applies. If the address is a concrete IP address, no resolution will occur.
1069 // If address is a hostname this should be set for resolution other than DNS.
1070 // Specifying a custom resolver with *STRICT_DNS* or *LOGICAL_DNS* will
1071 // generate an error at runtime.
1072 ResolverName string `json:"resolverName,omitempty"`
1073 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
1074 // include in API requests. By default, fields with empty or default values are
1075 // omitted from API requests. See
1076 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1077 // details.
1078 ForceSendFields []string `json:"-"`
1079 // NullFields is a list of field names (e.g. "Address") to include in API
1080 // requests with the JSON null value. By default, fields with empty values are
1081 // omitted from API requests. See
1082 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1083 NullFields []string `json:"-"`
1084 }
1085
1086 func (s SocketAddress) MarshalJSON() ([]byte, error) {
1087 type NoMethod SocketAddress
1088 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1089 }
1090
1091 // StaticCluster: Describes a statically loaded cluster.
1092 type StaticCluster struct {
1093 // Cluster: The cluster config.
1094 Cluster googleapi.RawMessage `json:"cluster,omitempty"`
1095 // LastUpdated: The timestamp when the Cluster was last updated.
1096 LastUpdated string `json:"lastUpdated,omitempty"`
1097 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
1098 // include in API requests. By default, fields with empty or default values are
1099 // omitted from API requests. See
1100 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1101 // details.
1102 ForceSendFields []string `json:"-"`
1103 // NullFields is a list of field names (e.g. "Cluster") to include in API
1104 // requests with the JSON null value. By default, fields with empty values are
1105 // omitted from API requests. See
1106 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1107 NullFields []string `json:"-"`
1108 }
1109
1110 func (s StaticCluster) MarshalJSON() ([]byte, error) {
1111 type NoMethod StaticCluster
1112 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1113 }
1114
1115 // StaticListener: Describes a statically loaded listener.
1116 type StaticListener struct {
1117 // LastUpdated: The timestamp when the Listener was last successfully updated.
1118 LastUpdated string `json:"lastUpdated,omitempty"`
1119 // Listener: The listener config.
1120 Listener googleapi.RawMessage `json:"listener,omitempty"`
1121 // ForceSendFields is a list of field names (e.g. "LastUpdated") to
1122 // unconditionally include in API requests. By default, fields with empty or
1123 // default values are omitted from API requests. See
1124 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1125 // details.
1126 ForceSendFields []string `json:"-"`
1127 // NullFields is a list of field names (e.g. "LastUpdated") to include in API
1128 // requests with the JSON null value. By default, fields with empty values are
1129 // omitted from API requests. See
1130 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1131 NullFields []string `json:"-"`
1132 }
1133
1134 func (s StaticListener) MarshalJSON() ([]byte, error) {
1135 type NoMethod StaticListener
1136 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1137 }
1138
1139 type StaticRouteConfig struct {
1140 // LastUpdated: The timestamp when the Route was last updated.
1141 LastUpdated string `json:"lastUpdated,omitempty"`
1142 // RouteConfig: The route config.
1143 RouteConfig googleapi.RawMessage `json:"routeConfig,omitempty"`
1144 // ForceSendFields is a list of field names (e.g. "LastUpdated") to
1145 // unconditionally include in API requests. By default, fields with empty or
1146 // default values are omitted from API requests. See
1147 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1148 // details.
1149 ForceSendFields []string `json:"-"`
1150 // NullFields is a list of field names (e.g. "LastUpdated") to include in API
1151 // requests with the JSON null value. By default, fields with empty values are
1152 // omitted from API requests. See
1153 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1154 NullFields []string `json:"-"`
1155 }
1156
1157 func (s StaticRouteConfig) MarshalJSON() ([]byte, error) {
1158 type NoMethod StaticRouteConfig
1159 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1160 }
1161
1162 // StringMatcher: Specifies the way to match a string. [#next-free-field: 7]
1163 type StringMatcher struct {
1164 // Exact: The input string must match exactly the string specified here.
1165 // Examples: * *abc* only matches the value *abc*.
1166 Exact string `json:"exact,omitempty"`
1167 // IgnoreCase: If true, indicates the exact/prefix/suffix matching should be
1168 // case insensitive. This has no effect for the safe_regex match. For example,
1169 // the matcher *data* will match both input string *Data* and *data* if set to
1170 // true.
1171 IgnoreCase bool `json:"ignoreCase,omitempty"`
1172 // Prefix: The input string must have the prefix specified here. Note: empty
1173 // prefix is not allowed, please use regex instead. Examples: * *abc* matches
1174 // the value *abc.xyz*
1175 Prefix string `json:"prefix,omitempty"`
1176 // Regex: The input string must match the regular expression specified here.
1177 // The regex grammar is defined `here `_. Examples: * The regex ``\d{3}``
1178 // matches the value *123* * The regex ``\d{3}`` does not match the value
1179 // *1234* * The regex ``\d{3}`` does not match the value *123.456* ..
1180 // attention:: This field has been deprecated in favor of `safe_regex` as it is
1181 // not safe for use with untrusted input in all cases.
1182 Regex string `json:"regex,omitempty"`
1183 // SafeRegex: The input string must match the regular expression specified
1184 // here.
1185 SafeRegex *RegexMatcher `json:"safeRegex,omitempty"`
1186 // Suffix: The input string must have the suffix specified here. Note: empty
1187 // prefix is not allowed, please use regex instead. Examples: * *abc* matches
1188 // the value *xyz.abc*
1189 Suffix string `json:"suffix,omitempty"`
1190 // ForceSendFields is a list of field names (e.g. "Exact") to unconditionally
1191 // include in API requests. By default, fields with empty or default values are
1192 // omitted from API requests. See
1193 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1194 // details.
1195 ForceSendFields []string `json:"-"`
1196 // NullFields is a list of field names (e.g. "Exact") to include in API
1197 // requests with the JSON null value. By default, fields with empty values are
1198 // omitted from API requests. See
1199 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1200 NullFields []string `json:"-"`
1201 }
1202
1203 func (s StringMatcher) MarshalJSON() ([]byte, error) {
1204 type NoMethod StringMatcher
1205 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1206 }
1207
1208 // StructMatcher: StructMatcher provides a general interface to check if a
1209 // given value is matched in google.protobuf.Struct. It uses `path` to retrieve
1210 // the value from the struct and then check if it's matched to the specified
1211 // value. For example, for the following Struct: .. code-block:: yaml fields:
1212 // a: struct_value: fields: b: struct_value: fields: c: string_value: pro t:
1213 // list_value: values: - string_value: m - string_value: n The following
1214 // MetadataMatcher is matched as the path [a, b, c] will retrieve a string
1215 // value "pro" from the Metadata which is matched to the specified prefix
1216 // match. .. code-block:: yaml path: - key: a - key: b - key: c value:
1217 // string_match: prefix: pr The following StructMatcher is matched as the code
1218 // will match one of the string values in the list at the path [a, t]. ..
1219 // code-block:: yaml path: - key: a - key: t value: list_match: one_of:
1220 // string_match: exact: m An example use of StructMatcher is to match metadata
1221 // in envoy.v*.core.Node.
1222 type StructMatcher struct {
1223 // Path: The path to retrieve the Value from the Struct.
1224 Path []*PathSegment `json:"path,omitempty"`
1225 // Value: The StructMatcher is matched if the value retrieved by path is
1226 // matched to this value.
1227 Value *ValueMatcher `json:"value,omitempty"`
1228 // ForceSendFields is a list of field names (e.g. "Path") to unconditionally
1229 // include in API requests. By default, fields with empty or default values are
1230 // omitted from API requests. See
1231 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1232 // details.
1233 ForceSendFields []string `json:"-"`
1234 // NullFields is a list of field names (e.g. "Path") to include in API requests
1235 // with the JSON null value. By default, fields with empty values are omitted
1236 // from API requests. See
1237 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1238 NullFields []string `json:"-"`
1239 }
1240
1241 func (s StructMatcher) MarshalJSON() ([]byte, error) {
1242 type NoMethod StructMatcher
1243 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1244 }
1245
1246 type UpdateFailureState struct {
1247 // Details: Details about the last failed update attempt.
1248 Details string `json:"details,omitempty"`
1249 // FailedConfiguration: What the component configuration would have been if the
1250 // update had succeeded.
1251 FailedConfiguration googleapi.RawMessage `json:"failedConfiguration,omitempty"`
1252 // LastUpdateAttempt: Time of the latest failed update attempt.
1253 LastUpdateAttempt string `json:"lastUpdateAttempt,omitempty"`
1254 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
1255 // include in API requests. By default, fields with empty or default values are
1256 // omitted from API requests. See
1257 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1258 // details.
1259 ForceSendFields []string `json:"-"`
1260 // NullFields is a list of field names (e.g. "Details") to include in API
1261 // requests with the JSON null value. By default, fields with empty values are
1262 // omitted from API requests. See
1263 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1264 NullFields []string `json:"-"`
1265 }
1266
1267 func (s UpdateFailureState) MarshalJSON() ([]byte, error) {
1268 type NoMethod UpdateFailureState
1269 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1270 }
1271
1272 // ValueMatcher: Specifies the way to match a Protobuf::Value. Primitive values
1273 // and ListValue are supported. StructValue is not supported and is always not
1274 // matched. [#next-free-field: 7]
1275 type ValueMatcher struct {
1276 // BoolMatch: If specified, a match occurs if and only if the target value is a
1277 // bool value and is equal to this field.
1278 BoolMatch bool `json:"boolMatch,omitempty"`
1279 // DoubleMatch: If specified, a match occurs if and only if the target value is
1280 // a double value and is matched to this field.
1281 DoubleMatch *DoubleMatcher `json:"doubleMatch,omitempty"`
1282 // ListMatch: If specified, a match occurs if and only if the target value is a
1283 // list value and is matched to this field.
1284 ListMatch *ListMatcher `json:"listMatch,omitempty"`
1285 // NullMatch: If specified, a match occurs if and only if the target value is a
1286 // NullValue.
1287 NullMatch *NullMatch `json:"nullMatch,omitempty"`
1288 // PresentMatch: If specified, value match will be performed based on whether
1289 // the path is referring to a valid primitive value in the metadata. If the
1290 // path is referring to a non-primitive value, the result is always not
1291 // matched.
1292 PresentMatch bool `json:"presentMatch,omitempty"`
1293 // StringMatch: If specified, a match occurs if and only if the target value is
1294 // a string value and is matched to this field.
1295 StringMatch *StringMatcher `json:"stringMatch,omitempty"`
1296 // ForceSendFields is a list of field names (e.g. "BoolMatch") to
1297 // unconditionally include in API requests. By default, fields with empty or
1298 // default values are omitted from API requests. See
1299 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1300 // details.
1301 ForceSendFields []string `json:"-"`
1302 // NullFields is a list of field names (e.g. "BoolMatch") to include in API
1303 // requests with the JSON null value. By default, fields with empty values are
1304 // omitted from API requests. See
1305 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1306 NullFields []string `json:"-"`
1307 }
1308
1309 func (s ValueMatcher) MarshalJSON() ([]byte, error) {
1310 type NoMethod ValueMatcher
1311 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1312 }
1313
1314 type DiscoveryClientStatusCall struct {
1315 s *Service
1316 clientstatusrequest *ClientStatusRequest
1317 urlParams_ gensupport.URLParams
1318 ctx_ context.Context
1319 header_ http.Header
1320 }
1321
1322 // ClientStatus:
1323 func (r *DiscoveryService) ClientStatus(clientstatusrequest *ClientStatusRequest) *DiscoveryClientStatusCall {
1324 c := &DiscoveryClientStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1325 c.clientstatusrequest = clientstatusrequest
1326 return c
1327 }
1328
1329 // Fields allows partial responses to be retrieved. See
1330 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1331 // details.
1332 func (c *DiscoveryClientStatusCall) Fields(s ...googleapi.Field) *DiscoveryClientStatusCall {
1333 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1334 return c
1335 }
1336
1337 // Context sets the context to be used in this call's Do method.
1338 func (c *DiscoveryClientStatusCall) Context(ctx context.Context) *DiscoveryClientStatusCall {
1339 c.ctx_ = ctx
1340 return c
1341 }
1342
1343 // Header returns a http.Header that can be modified by the caller to add
1344 // headers to the request.
1345 func (c *DiscoveryClientStatusCall) Header() http.Header {
1346 if c.header_ == nil {
1347 c.header_ = make(http.Header)
1348 }
1349 return c.header_
1350 }
1351
1352 func (c *DiscoveryClientStatusCall) doRequest(alt string) (*http.Response, error) {
1353 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1354 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.clientstatusrequest)
1355 if err != nil {
1356 return nil, err
1357 }
1358 c.urlParams_.Set("alt", alt)
1359 c.urlParams_.Set("prettyPrint", "false")
1360 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/discovery:client_status")
1361 urls += "?" + c.urlParams_.Encode()
1362 req, err := http.NewRequest("POST", urls, body)
1363 if err != nil {
1364 return nil, err
1365 }
1366 req.Header = reqHeaders
1367 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "trafficdirector.discovery.client_status", "request", internallog.HTTPRequest(req, body.Bytes()))
1368 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1369 }
1370
1371 // Do executes the "trafficdirector.discovery.client_status" call.
1372 // Any non-2xx status code is an error. Response headers are in either
1373 // *ClientStatusResponse.ServerResponse.Header or (if a response was returned
1374 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1375 // check whether the returned error was because http.StatusNotModified was
1376 // returned.
1377 func (c *DiscoveryClientStatusCall) Do(opts ...googleapi.CallOption) (*ClientStatusResponse, error) {
1378 gensupport.SetOptions(c.urlParams_, opts...)
1379 res, err := c.doRequest("json")
1380 if res != nil && res.StatusCode == http.StatusNotModified {
1381 if res.Body != nil {
1382 res.Body.Close()
1383 }
1384 return nil, gensupport.WrapError(&googleapi.Error{
1385 Code: res.StatusCode,
1386 Header: res.Header,
1387 })
1388 }
1389 if err != nil {
1390 return nil, err
1391 }
1392 defer googleapi.CloseBody(res)
1393 if err := googleapi.CheckResponse(res); err != nil {
1394 return nil, gensupport.WrapError(err)
1395 }
1396 ret := &ClientStatusResponse{
1397 ServerResponse: googleapi.ServerResponse{
1398 Header: res.Header,
1399 HTTPStatusCode: res.StatusCode,
1400 },
1401 }
1402 target := &ret
1403 b, err := gensupport.DecodeResponseBytes(target, res)
1404 if err != nil {
1405 return nil, err
1406 }
1407 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "trafficdirector.discovery.client_status", "response", internallog.HTTPResponse(res, b))
1408 return ret, nil
1409 }