1 // Copyright 2024 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/v3" 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/v3" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "trafficdirector:v3" 90 const apiName = "trafficdirector" 91 const apiVersion = "v3" 92 const basePath = "https://trafficdirector.googleapis.com/" 93 const basePathTemplate = "https://trafficdirector.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://trafficdirector.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Discovery = NewDiscoveryService(s) 139 return s, nil 140 } 141 142 type Service struct { 143 client *http.Client 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 // EnvoyInternalAddress: Specifies a user-space address handled by 171 // :ref:`internal listeners `. 172 EnvoyInternalAddress *EnvoyInternalAddress `json:"envoyInternalAddress,omitempty"` 173 Pipe *Pipe `json:"pipe,omitempty"` 174 SocketAddress *SocketAddress `json:"socketAddress,omitempty"` 175 // ForceSendFields is a list of field names (e.g. "EnvoyInternalAddress") to 176 // unconditionally include in API requests. By default, fields with empty or 177 // default values are omitted from API requests. See 178 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 179 // details. 180 ForceSendFields []string `json:"-"` 181 // NullFields is a list of field names (e.g. "EnvoyInternalAddress") to include 182 // in API requests with the JSON null value. By default, fields with empty 183 // values are omitted from API requests. See 184 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 185 NullFields []string `json:"-"` 186 } 187 188 func (s *Address) MarshalJSON() ([]byte, error) { 189 type NoMethod Address 190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 191 } 192 193 // BuildVersion: BuildVersion combines SemVer version of extension with 194 // free-form build information (i.e. 'alpha', 'private-build') as a set of 195 // strings. 196 type BuildVersion struct { 197 // Metadata: Free-form build information. Envoy defines several well known keys 198 // in the source/common/version/version.h file 199 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 200 // Version: SemVer version of extension. 201 Version *SemanticVersion `json:"version,omitempty"` 202 // ForceSendFields is a list of field names (e.g. "Metadata") to 203 // unconditionally include in API requests. By default, fields with empty or 204 // default values are omitted from API requests. See 205 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 206 // details. 207 ForceSendFields []string `json:"-"` 208 // NullFields is a list of field names (e.g. "Metadata") to include in API 209 // requests with the JSON null value. By default, fields with empty values are 210 // omitted from API requests. See 211 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 212 NullFields []string `json:"-"` 213 } 214 215 func (s *BuildVersion) MarshalJSON() ([]byte, error) { 216 type NoMethod BuildVersion 217 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 218 } 219 220 // ClientConfig: All xds configs for a particular client. 221 type ClientConfig struct { 222 // ClientScope: For xDS clients, the scope in which the data is used. For 223 // example, gRPC indicates the data plane target or that the data is associated 224 // with gRPC server(s). 225 ClientScope string `json:"clientScope,omitempty"` 226 // GenericXdsConfigs: Represents generic xDS config and the exact config 227 // structure depends on the type URL (like Cluster if it is CDS) 228 GenericXdsConfigs []*GenericXdsConfig `json:"genericXdsConfigs,omitempty"` 229 // Node: Node for a particular client. 230 Node *Node `json:"node,omitempty"` 231 // XdsConfig: This field is deprecated in favor of generic_xds_configs which is 232 // much simpler and uniform in structure. 233 XdsConfig []*PerXdsConfig `json:"xdsConfig,omitempty"` 234 // ForceSendFields is a list of field names (e.g. "ClientScope") to 235 // unconditionally include in API requests. By default, fields with empty or 236 // default values are omitted from API requests. See 237 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 238 // details. 239 ForceSendFields []string `json:"-"` 240 // NullFields is a list of field names (e.g. "ClientScope") to include in API 241 // requests with the JSON null value. By default, fields with empty values are 242 // omitted from API requests. See 243 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 244 NullFields []string `json:"-"` 245 } 246 247 func (s *ClientConfig) MarshalJSON() ([]byte, error) { 248 type NoMethod ClientConfig 249 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 250 } 251 252 // ClientStatusRequest: Request for client status of clients identified by a 253 // list of NodeMatchers. 254 type ClientStatusRequest struct { 255 // ExcludeResourceContents: If true, the server will not include the resource 256 // contents in the response (i.e., the generic_xds_configs.xds_config field 257 // will not be populated). [#not-implemented-hide:] 258 ExcludeResourceContents bool `json:"excludeResourceContents,omitempty"` 259 // Node: The node making the csds request. 260 Node *Node `json:"node,omitempty"` 261 // NodeMatchers: Management server can use these match criteria to identify 262 // clients. The match follows OR semantics. 263 NodeMatchers []*NodeMatcher `json:"nodeMatchers,omitempty"` 264 // ForceSendFields is a list of field names (e.g. "ExcludeResourceContents") to 265 // unconditionally include in API requests. By default, fields with empty or 266 // default values are omitted from API requests. See 267 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 268 // details. 269 ForceSendFields []string `json:"-"` 270 // NullFields is a list of field names (e.g. "ExcludeResourceContents") to 271 // include in API requests with the JSON null value. By default, fields with 272 // empty values are omitted from API requests. See 273 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 274 NullFields []string `json:"-"` 275 } 276 277 func (s *ClientStatusRequest) MarshalJSON() ([]byte, error) { 278 type NoMethod ClientStatusRequest 279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 280 } 281 282 type ClientStatusResponse struct { 283 // Config: Client configs for the clients specified in the ClientStatusRequest. 284 Config []*ClientConfig `json:"config,omitempty"` 285 286 // ServerResponse contains the HTTP response code and headers from the server. 287 googleapi.ServerResponse `json:"-"` 288 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally 289 // include in API requests. By default, fields with empty or default values are 290 // omitted from API requests. See 291 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 292 // details. 293 ForceSendFields []string `json:"-"` 294 // NullFields is a list of field names (e.g. "Config") to include in API 295 // requests with the JSON null value. By default, fields with empty values are 296 // omitted from API requests. See 297 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 298 NullFields []string `json:"-"` 299 } 300 301 func (s *ClientStatusResponse) MarshalJSON() ([]byte, error) { 302 type NoMethod ClientStatusResponse 303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 304 } 305 306 // ClustersConfigDump: Envoy's cluster manager fills this message with all 307 // currently known clusters. Cluster configuration information can be used to 308 // recreate an Envoy configuration by populating all clusters as static 309 // clusters or by returning them in a CDS response. 310 type ClustersConfigDump struct { 311 // DynamicActiveClusters: The dynamically loaded active clusters. These are 312 // clusters that are available to service data plane traffic. 313 DynamicActiveClusters []*DynamicCluster `json:"dynamicActiveClusters,omitempty"` 314 // DynamicWarmingClusters: The dynamically loaded warming clusters. These are 315 // clusters that are currently undergoing warming in preparation to service 316 // data plane traffic. Note that if attempting to recreate an Envoy 317 // configuration from a configuration dump, the warming clusters should 318 // generally be discarded. 319 DynamicWarmingClusters []*DynamicCluster `json:"dynamicWarmingClusters,omitempty"` 320 // StaticClusters: The statically loaded cluster configs. 321 StaticClusters []*StaticCluster `json:"staticClusters,omitempty"` 322 // VersionInfo: This is the :ref:`version_info ` in the last processed CDS 323 // discovery response. If there are only static bootstrap clusters, this field 324 // will be "". 325 VersionInfo string `json:"versionInfo,omitempty"` 326 // ForceSendFields is a list of field names (e.g. "DynamicActiveClusters") to 327 // unconditionally include in API requests. By default, fields with empty or 328 // default values are omitted from API requests. See 329 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 330 // details. 331 ForceSendFields []string `json:"-"` 332 // NullFields is a list of field names (e.g. "DynamicActiveClusters") to 333 // include in API requests with the JSON null value. By default, fields with 334 // empty values are omitted from API requests. See 335 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 336 NullFields []string `json:"-"` 337 } 338 339 func (s *ClustersConfigDump) MarshalJSON() ([]byte, error) { 340 type NoMethod ClustersConfigDump 341 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 342 } 343 344 // ContextParams: Additional parameters that can be used to select resource 345 // variants. These include any global context parameters, per-resource type 346 // client feature capabilities and per-resource type functional attributes. All 347 // per-resource type attributes will be `xds.resource.` prefixed and some of 348 // these are documented below: `xds.resource.listening_address`: The value is 349 // "IP:port" (e.g. "10.1.1.3:8080") which is the listening address of a 350 // Listener. Used in a Listener resource query. 351 type ContextParams struct { 352 Params map[string]string `json:"params,omitempty"` 353 // ForceSendFields is a list of field names (e.g. "Params") to unconditionally 354 // include in API requests. By default, fields with empty or default values are 355 // omitted from API requests. See 356 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 357 // details. 358 ForceSendFields []string `json:"-"` 359 // NullFields is a list of field names (e.g. "Params") to include in API 360 // requests with the JSON null value. By default, fields with empty values are 361 // omitted from API requests. See 362 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 363 NullFields []string `json:"-"` 364 } 365 366 func (s *ContextParams) MarshalJSON() ([]byte, error) { 367 type NoMethod ContextParams 368 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 369 } 370 371 // DoubleMatcher: Specifies the way to match a double value. 372 type DoubleMatcher struct { 373 // Exact: If specified, the input double value must be equal to the value 374 // specified here. 375 Exact float64 `json:"exact,omitempty"` 376 // Range: If specified, the input double value must be in the range specified 377 // here. Note: The range is using half-open interval semantics [start, end). 378 Range *DoubleRange `json:"range,omitempty"` 379 // ForceSendFields is a list of field names (e.g. "Exact") to unconditionally 380 // include in API requests. By default, fields with empty or default values are 381 // omitted from API requests. See 382 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 383 // details. 384 ForceSendFields []string `json:"-"` 385 // NullFields is a list of field names (e.g. "Exact") to include in API 386 // requests with the JSON null value. By default, fields with empty values are 387 // omitted from API requests. See 388 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 389 NullFields []string `json:"-"` 390 } 391 392 func (s *DoubleMatcher) MarshalJSON() ([]byte, error) { 393 type NoMethod DoubleMatcher 394 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 395 } 396 397 func (s *DoubleMatcher) UnmarshalJSON(data []byte) error { 398 type NoMethod DoubleMatcher 399 var s1 struct { 400 Exact gensupport.JSONFloat64 `json:"exact"` 401 *NoMethod 402 } 403 s1.NoMethod = (*NoMethod)(s) 404 if err := json.Unmarshal(data, &s1); err != nil { 405 return err 406 } 407 s.Exact = float64(s1.Exact) 408 return nil 409 } 410 411 // DoubleRange: Specifies the double start and end of the range using half-open 412 // interval semantics [start, end). 413 type DoubleRange struct { 414 // End: end of the range (exclusive) 415 End float64 `json:"end,omitempty"` 416 // Start: start of the range (inclusive) 417 Start float64 `json:"start,omitempty"` 418 // ForceSendFields is a list of field names (e.g. "End") 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. "End") to include in API requests 425 // with the JSON null value. By default, fields with empty values are omitted 426 // 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 *DoubleRange) MarshalJSON() ([]byte, error) { 432 type NoMethod DoubleRange 433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 434 } 435 436 func (s *DoubleRange) UnmarshalJSON(data []byte) error { 437 type NoMethod DoubleRange 438 var s1 struct { 439 End gensupport.JSONFloat64 `json:"end"` 440 Start gensupport.JSONFloat64 `json:"start"` 441 *NoMethod 442 } 443 s1.NoMethod = (*NoMethod)(s) 444 if err := json.Unmarshal(data, &s1); err != nil { 445 return err 446 } 447 s.End = float64(s1.End) 448 s.Start = float64(s1.Start) 449 return nil 450 } 451 452 // DynamicCluster: Describes a dynamically loaded cluster via the CDS API. 453 // [#next-free-field: 6] 454 type DynamicCluster struct { 455 // ClientStatus: The client status of this resource. [#not-implemented-hide:] 456 // 457 // Possible values: 458 // "UNKNOWN" - Resource status is not available/unknown. 459 // "REQUESTED" - Client requested this resource but hasn't received any 460 // update from management server. The client will not fail requests, but will 461 // queue them until update arrives or the client times out waiting for the 462 // resource. 463 // "DOES_NOT_EXIST" - This resource has been requested by the client but has 464 // either not been delivered by the server or was previously delivered by the 465 // server and then subsequently removed from resources provided by the server. 466 // For more information, please refer to the :ref:"Knowing When a Requested 467 // Resource Does Not Exist" ` section. 468 // "ACKED" - Client received this resource and replied with ACK. 469 // "NACKED" - Client received this resource and replied with NACK. 470 ClientStatus string `json:"clientStatus,omitempty"` 471 // Cluster: The cluster config. 472 Cluster googleapi.RawMessage `json:"cluster,omitempty"` 473 // ErrorState: Set if the last update failed, cleared after the next successful 474 // update. The ``error_state`` field contains the rejected version of this 475 // particular resource along with the reason and timestamp. For successfully 476 // updated or acknowledged resource, this field should be empty. 477 // [#not-implemented-hide:] 478 ErrorState *UpdateFailureState `json:"errorState,omitempty"` 479 // LastUpdated: The timestamp when the Cluster was last updated. 480 LastUpdated string `json:"lastUpdated,omitempty"` 481 // VersionInfo: This is the per-resource version information. This version is 482 // currently taken from the :ref:`version_info ` field at the time that the 483 // cluster was loaded. In the future, discrete per-cluster versions may be 484 // supported by the API. 485 VersionInfo string `json:"versionInfo,omitempty"` 486 // ForceSendFields is a list of field names (e.g. "ClientStatus") to 487 // unconditionally include in API requests. By default, fields with empty or 488 // default values are omitted from API requests. See 489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 490 // details. 491 ForceSendFields []string `json:"-"` 492 // NullFields is a list of field names (e.g. "ClientStatus") to include in API 493 // requests with the JSON null value. By default, fields with empty values are 494 // omitted from API requests. See 495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 496 NullFields []string `json:"-"` 497 } 498 499 func (s *DynamicCluster) MarshalJSON() ([]byte, error) { 500 type NoMethod DynamicCluster 501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 502 } 503 504 // DynamicEndpointConfig: [#next-free-field: 6] 505 type DynamicEndpointConfig struct { 506 // ClientStatus: The client status of this resource. [#not-implemented-hide:] 507 // 508 // Possible values: 509 // "UNKNOWN" - Resource status is not available/unknown. 510 // "REQUESTED" - Client requested this resource but hasn't received any 511 // update from management server. The client will not fail requests, but will 512 // queue them until update arrives or the client times out waiting for the 513 // resource. 514 // "DOES_NOT_EXIST" - This resource has been requested by the client but has 515 // either not been delivered by the server or was previously delivered by the 516 // server and then subsequently removed from resources provided by the server. 517 // For more information, please refer to the :ref:"Knowing When a Requested 518 // Resource Does Not Exist" ` section. 519 // "ACKED" - Client received this resource and replied with ACK. 520 // "NACKED" - Client received this resource and replied with NACK. 521 ClientStatus string `json:"clientStatus,omitempty"` 522 // EndpointConfig: The endpoint config. 523 EndpointConfig googleapi.RawMessage `json:"endpointConfig,omitempty"` 524 // ErrorState: Set if the last update failed, cleared after the next successful 525 // update. The ``error_state`` field contains the rejected version of this 526 // particular resource along with the reason and timestamp. For successfully 527 // updated or acknowledged resource, this field should be empty. 528 // [#not-implemented-hide:] 529 ErrorState *UpdateFailureState `json:"errorState,omitempty"` 530 // LastUpdated: [#not-implemented-hide:] The timestamp when the Endpoint was 531 // last updated. 532 LastUpdated string `json:"lastUpdated,omitempty"` 533 // VersionInfo: [#not-implemented-hide:] This is the per-resource version 534 // information. This version is currently taken from the :ref:`version_info ` 535 // field at the time that the endpoint configuration was loaded. 536 VersionInfo string `json:"versionInfo,omitempty"` 537 // ForceSendFields is a list of field names (e.g. "ClientStatus") to 538 // unconditionally include in API requests. By default, fields with empty or 539 // default values are omitted from API requests. See 540 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 541 // details. 542 ForceSendFields []string `json:"-"` 543 // NullFields is a list of field names (e.g. "ClientStatus") to include in API 544 // requests with the JSON null value. By default, fields with empty values are 545 // omitted from API requests. See 546 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 547 NullFields []string `json:"-"` 548 } 549 550 func (s *DynamicEndpointConfig) MarshalJSON() ([]byte, error) { 551 type NoMethod DynamicEndpointConfig 552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 553 } 554 555 // DynamicListener: Describes a dynamically loaded listener via the LDS API. 556 // [#next-free-field: 7] 557 type DynamicListener struct { 558 // ActiveState: The listener state for any active listener by this name. These 559 // are listeners that are available to service data plane traffic. 560 ActiveState *DynamicListenerState `json:"activeState,omitempty"` 561 // ClientStatus: The client status of this resource. [#not-implemented-hide:] 562 // 563 // Possible values: 564 // "UNKNOWN" - Resource status is not available/unknown. 565 // "REQUESTED" - Client requested this resource but hasn't received any 566 // update from management server. The client will not fail requests, but will 567 // queue them until update arrives or the client times out waiting for the 568 // resource. 569 // "DOES_NOT_EXIST" - This resource has been requested by the client but has 570 // either not been delivered by the server or was previously delivered by the 571 // server and then subsequently removed from resources provided by the server. 572 // For more information, please refer to the :ref:"Knowing When a Requested 573 // Resource Does Not Exist" ` section. 574 // "ACKED" - Client received this resource and replied with ACK. 575 // "NACKED" - Client received this resource and replied with NACK. 576 ClientStatus string `json:"clientStatus,omitempty"` 577 // DrainingState: The listener state for any draining listener by this name. 578 // These are listeners that are currently undergoing draining in preparation to 579 // stop servicing data plane traffic. Note that if attempting to recreate an 580 // Envoy configuration from a configuration dump, the draining listeners should 581 // generally be discarded. 582 DrainingState *DynamicListenerState `json:"drainingState,omitempty"` 583 // ErrorState: Set if the last update failed, cleared after the next successful 584 // update. The ``error_state`` field contains the rejected version of this 585 // particular resource along with the reason and timestamp. For successfully 586 // updated or acknowledged resource, this field should be empty. 587 ErrorState *UpdateFailureState `json:"errorState,omitempty"` 588 // Name: The name or unique id of this listener, pulled from the 589 // DynamicListenerState config. 590 Name string `json:"name,omitempty"` 591 // WarmingState: The listener state for any warming listener by this name. 592 // These are listeners that are currently undergoing warming in preparation to 593 // service data plane traffic. Note that if attempting to recreate an Envoy 594 // configuration from a configuration dump, the warming listeners should 595 // generally be discarded. 596 WarmingState *DynamicListenerState `json:"warmingState,omitempty"` 597 // ForceSendFields is a list of field names (e.g. "ActiveState") to 598 // unconditionally include in API requests. By default, fields with empty or 599 // default values are omitted from API requests. See 600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 601 // details. 602 ForceSendFields []string `json:"-"` 603 // NullFields is a list of field names (e.g. "ActiveState") to include in API 604 // requests with the JSON null value. By default, fields with empty values are 605 // omitted from API requests. See 606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 607 NullFields []string `json:"-"` 608 } 609 610 func (s *DynamicListener) MarshalJSON() ([]byte, error) { 611 type NoMethod DynamicListener 612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 613 } 614 615 type DynamicListenerState struct { 616 // LastUpdated: The timestamp when the Listener was last successfully updated. 617 LastUpdated string `json:"lastUpdated,omitempty"` 618 // Listener: The listener config. 619 Listener googleapi.RawMessage `json:"listener,omitempty"` 620 // VersionInfo: This is the per-resource version information. This version is 621 // currently taken from the :ref:`version_info ` field at the time that the 622 // listener was loaded. In the future, discrete per-listener versions may be 623 // supported by the API. 624 VersionInfo string `json:"versionInfo,omitempty"` 625 // ForceSendFields is a list of field names (e.g. "LastUpdated") to 626 // unconditionally include in API requests. By default, fields with empty or 627 // default values are omitted from API requests. See 628 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 629 // details. 630 ForceSendFields []string `json:"-"` 631 // NullFields is a list of field names (e.g. "LastUpdated") to include in API 632 // requests with the JSON null value. By default, fields with empty values are 633 // omitted from API requests. See 634 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 635 NullFields []string `json:"-"` 636 } 637 638 func (s *DynamicListenerState) MarshalJSON() ([]byte, error) { 639 type NoMethod DynamicListenerState 640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 641 } 642 643 // DynamicRouteConfig: [#next-free-field: 6] 644 type DynamicRouteConfig struct { 645 // ClientStatus: The client status of this resource. [#not-implemented-hide:] 646 // 647 // Possible values: 648 // "UNKNOWN" - Resource status is not available/unknown. 649 // "REQUESTED" - Client requested this resource but hasn't received any 650 // update from management server. The client will not fail requests, but will 651 // queue them until update arrives or the client times out waiting for the 652 // resource. 653 // "DOES_NOT_EXIST" - This resource has been requested by the client but has 654 // either not been delivered by the server or was previously delivered by the 655 // server and then subsequently removed from resources provided by the server. 656 // For more information, please refer to the :ref:"Knowing When a Requested 657 // Resource Does Not Exist" ` section. 658 // "ACKED" - Client received this resource and replied with ACK. 659 // "NACKED" - Client received this resource and replied with NACK. 660 ClientStatus string `json:"clientStatus,omitempty"` 661 // ErrorState: Set if the last update failed, cleared after the next successful 662 // update. The ``error_state`` field contains the rejected version of this 663 // particular resource along with the reason and timestamp. For successfully 664 // updated or acknowledged resource, this field should be empty. 665 // [#not-implemented-hide:] 666 ErrorState *UpdateFailureState `json:"errorState,omitempty"` 667 // LastUpdated: The timestamp when the Route was last updated. 668 LastUpdated string `json:"lastUpdated,omitempty"` 669 // RouteConfig: The route config. 670 RouteConfig googleapi.RawMessage `json:"routeConfig,omitempty"` 671 // VersionInfo: This is the per-resource version information. This version is 672 // currently taken from the :ref:`version_info ` field at the time that the 673 // route configuration was loaded. 674 VersionInfo string `json:"versionInfo,omitempty"` 675 // ForceSendFields is a list of field names (e.g. "ClientStatus") to 676 // unconditionally include in API requests. By default, fields with empty or 677 // default values are omitted from API requests. See 678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 679 // details. 680 ForceSendFields []string `json:"-"` 681 // NullFields is a list of field names (e.g. "ClientStatus") to include in API 682 // requests with the JSON null value. By default, fields with empty values are 683 // omitted from API requests. See 684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 685 NullFields []string `json:"-"` 686 } 687 688 func (s *DynamicRouteConfig) MarshalJSON() ([]byte, error) { 689 type NoMethod DynamicRouteConfig 690 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 691 } 692 693 // DynamicScopedRouteConfigs: [#next-free-field: 7] 694 type DynamicScopedRouteConfigs struct { 695 // ClientStatus: The client status of this resource. [#not-implemented-hide:] 696 // 697 // Possible values: 698 // "UNKNOWN" - Resource status is not available/unknown. 699 // "REQUESTED" - Client requested this resource but hasn't received any 700 // update from management server. The client will not fail requests, but will 701 // queue them until update arrives or the client times out waiting for the 702 // resource. 703 // "DOES_NOT_EXIST" - This resource has been requested by the client but has 704 // either not been delivered by the server or was previously delivered by the 705 // server and then subsequently removed from resources provided by the server. 706 // For more information, please refer to the :ref:"Knowing When a Requested 707 // Resource Does Not Exist" ` section. 708 // "ACKED" - Client received this resource and replied with ACK. 709 // "NACKED" - Client received this resource and replied with NACK. 710 ClientStatus string `json:"clientStatus,omitempty"` 711 // ErrorState: Set if the last update failed, cleared after the next successful 712 // update. The ``error_state`` field contains the rejected version of this 713 // particular resource along with the reason and timestamp. For successfully 714 // updated or acknowledged resource, this field should be empty. 715 // [#not-implemented-hide:] 716 ErrorState *UpdateFailureState `json:"errorState,omitempty"` 717 // LastUpdated: The timestamp when the scoped route config set was last 718 // updated. 719 LastUpdated string `json:"lastUpdated,omitempty"` 720 // Name: The name assigned to the scoped route configurations. 721 Name string `json:"name,omitempty"` 722 // ScopedRouteConfigs: The scoped route configurations. 723 ScopedRouteConfigs []googleapi.RawMessage `json:"scopedRouteConfigs,omitempty"` 724 // VersionInfo: This is the per-resource version information. This version is 725 // currently taken from the :ref:`version_info ` field at the time that the 726 // scoped routes configuration was loaded. 727 VersionInfo string `json:"versionInfo,omitempty"` 728 // ForceSendFields is a list of field names (e.g. "ClientStatus") to 729 // unconditionally include in API requests. By default, fields with empty or 730 // default values are omitted from API requests. See 731 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 732 // details. 733 ForceSendFields []string `json:"-"` 734 // NullFields is a list of field names (e.g. "ClientStatus") to include in API 735 // requests with the JSON null value. By default, fields with empty values are 736 // omitted from API requests. See 737 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 738 NullFields []string `json:"-"` 739 } 740 741 func (s *DynamicScopedRouteConfigs) MarshalJSON() ([]byte, error) { 742 type NoMethod DynamicScopedRouteConfigs 743 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 744 } 745 746 // EndpointsConfigDump: Envoy's admin fill this message with all currently 747 // known endpoints. Endpoint configuration information can be used to recreate 748 // an Envoy configuration by populating all endpoints as static endpoints or by 749 // returning them in an EDS response. 750 type EndpointsConfigDump struct { 751 // DynamicEndpointConfigs: The dynamically loaded endpoint configs. 752 DynamicEndpointConfigs []*DynamicEndpointConfig `json:"dynamicEndpointConfigs,omitempty"` 753 // StaticEndpointConfigs: The statically loaded endpoint configs. 754 StaticEndpointConfigs []*StaticEndpointConfig `json:"staticEndpointConfigs,omitempty"` 755 // ForceSendFields is a list of field names (e.g. "DynamicEndpointConfigs") to 756 // unconditionally include in API requests. By default, fields with empty or 757 // default values are omitted from API requests. See 758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 759 // details. 760 ForceSendFields []string `json:"-"` 761 // NullFields is a list of field names (e.g. "DynamicEndpointConfigs") to 762 // include in API requests with the JSON null value. By default, fields with 763 // empty values are omitted from API requests. See 764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 765 NullFields []string `json:"-"` 766 } 767 768 func (s *EndpointsConfigDump) MarshalJSON() ([]byte, error) { 769 type NoMethod EndpointsConfigDump 770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 771 } 772 773 // EnvoyInternalAddress: The address represents an envoy internal listener. 774 // [#comment: 775 type EnvoyInternalAddress struct { 776 // EndpointId: Specifies an endpoint identifier to distinguish between multiple 777 // endpoints for the same internal listener in a single upstream pool. Only 778 // used in the upstream addresses for tracking changes to individual endpoints. 779 // This, for example, may be set to the final destination IP for the target 780 // internal listener. 781 EndpointId string `json:"endpointId,omitempty"` 782 // ServerListenerName: Specifies the :ref:`name ` of the internal listener. 783 ServerListenerName string `json:"serverListenerName,omitempty"` 784 // ForceSendFields is a list of field names (e.g. "EndpointId") to 785 // unconditionally include in API requests. By default, fields with empty or 786 // default values are omitted from API requests. See 787 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 788 // details. 789 ForceSendFields []string `json:"-"` 790 // NullFields is a list of field names (e.g. "EndpointId") to include in API 791 // requests with the JSON null value. By default, fields with empty values are 792 // omitted from API requests. See 793 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 794 NullFields []string `json:"-"` 795 } 796 797 func (s *EnvoyInternalAddress) MarshalJSON() ([]byte, error) { 798 type NoMethod EnvoyInternalAddress 799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 800 } 801 802 // Extension: Version and identification for an Envoy extension. 803 // [#next-free-field: 7] 804 type Extension struct { 805 // Category: Category of the extension. Extension category names use reverse 806 // DNS notation. For instance "envoy.filters.listener" for Envoy's built-in 807 // listener filters or "com.acme.filters.http" for HTTP filters from acme.com 808 // vendor. [#comment: 809 Category string `json:"category,omitempty"` 810 // Disabled: Indicates that the extension is present but was disabled via 811 // dynamic configuration. 812 Disabled bool `json:"disabled,omitempty"` 813 // Name: This is the name of the Envoy filter as specified in the Envoy 814 // configuration, e.g. envoy.filters.http.router, com.acme.widget. 815 Name string `json:"name,omitempty"` 816 // TypeDescriptor: [#not-implemented-hide:] Type descriptor of extension 817 // configuration proto. [#comment: 818 TypeDescriptor string `json:"typeDescriptor,omitempty"` 819 // TypeUrls: Type URLs of extension configuration protos. 820 TypeUrls []string `json:"typeUrls,omitempty"` 821 // Version: The version is a property of the extension and maintained 822 // independently of other extensions and the Envoy API. This field is not set 823 // when extension did not provide version information. 824 Version *BuildVersion `json:"version,omitempty"` 825 // ForceSendFields is a list of field names (e.g. "Category") to 826 // unconditionally include in API requests. By default, fields with empty or 827 // default values are omitted from API requests. See 828 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 829 // details. 830 ForceSendFields []string `json:"-"` 831 // NullFields is a list of field names (e.g. "Category") to include in API 832 // requests with the JSON null value. By default, fields with empty values are 833 // omitted from API requests. See 834 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 835 NullFields []string `json:"-"` 836 } 837 838 func (s *Extension) MarshalJSON() ([]byte, error) { 839 type NoMethod Extension 840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 841 } 842 843 // GenericXdsConfig: GenericXdsConfig is used to specify the config status and 844 // the dump of any xDS resource identified by their type URL. It is the 845 // generalized version of the now deprecated ListenersConfigDump, 846 // ClustersConfigDump etc [#next-free-field: 10] 847 type GenericXdsConfig struct { 848 // ClientStatus: Per xDS resource status from the view of a xDS client 849 // 850 // Possible values: 851 // "UNKNOWN" - Resource status is not available/unknown. 852 // "REQUESTED" - Client requested this resource but hasn't received any 853 // update from management server. The client will not fail requests, but will 854 // queue them until update arrives or the client times out waiting for the 855 // resource. 856 // "DOES_NOT_EXIST" - This resource has been requested by the client but has 857 // either not been delivered by the server or was previously delivered by the 858 // server and then subsequently removed from resources provided by the server. 859 // For more information, please refer to the :ref:"Knowing When a Requested 860 // Resource Does Not Exist" ` section. 861 // "ACKED" - Client received this resource and replied with ACK. 862 // "NACKED" - Client received this resource and replied with NACK. 863 ClientStatus string `json:"clientStatus,omitempty"` 864 // ConfigStatus: Per xDS resource config status. It is generated by management 865 // servers. It will not be present if the CSDS server is an xDS client. 866 // 867 // Possible values: 868 // "UNKNOWN" - Status info is not available/unknown. 869 // "SYNCED" - Management server has sent the config to client and received 870 // ACK. 871 // "NOT_SENT" - Config is not sent. 872 // "STALE" - Management server has sent the config to client but hasn’t 873 // received ACK/NACK. 874 // "ERROR" - Management server has sent the config to client but received 875 // NACK. The attached config dump will be the latest config (the rejected one), 876 // since it is the persisted version in the management server. 877 ConfigStatus string `json:"configStatus,omitempty"` 878 // ErrorState: Set if the last update failed, cleared after the next successful 879 // update. The *error_state* field contains the rejected version of this 880 // particular resource along with the reason and timestamp. For successfully 881 // updated or acknowledged resource, this field should be empty. 882 // [#not-implemented-hide:] 883 ErrorState *UpdateFailureState `json:"errorState,omitempty"` 884 // IsStaticResource: Is static resource is true if it is specified in the 885 // config supplied through the file at the startup. 886 IsStaticResource bool `json:"isStaticResource,omitempty"` 887 // LastUpdated: Timestamp when the xDS resource was last updated 888 LastUpdated string `json:"lastUpdated,omitempty"` 889 // Name: Name of the xDS resource 890 Name string `json:"name,omitempty"` 891 // TypeUrl: Type_url represents the fully qualified name of xDS resource type 892 // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc. 893 TypeUrl string `json:"typeUrl,omitempty"` 894 // VersionInfo: This is the :ref:`version_info ` in the last processed xDS 895 // discovery response. If there are only static bootstrap listeners, this field 896 // will be "" 897 VersionInfo string `json:"versionInfo,omitempty"` 898 // XdsConfig: The xDS resource config. Actual content depends on the type 899 XdsConfig googleapi.RawMessage `json:"xdsConfig,omitempty"` 900 // ForceSendFields is a list of field names (e.g. "ClientStatus") to 901 // unconditionally include in API requests. By default, fields with empty or 902 // default values are omitted from API requests. See 903 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 904 // details. 905 ForceSendFields []string `json:"-"` 906 // NullFields is a list of field names (e.g. "ClientStatus") to include in API 907 // requests with the JSON null value. By default, fields with empty values are 908 // omitted from API requests. See 909 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 910 NullFields []string `json:"-"` 911 } 912 913 func (s *GenericXdsConfig) MarshalJSON() ([]byte, error) { 914 type NoMethod GenericXdsConfig 915 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 916 } 917 918 // GoogleRE2: Google's `RE2 `_ regex engine. The regex string must adhere to 919 // the documented `syntax `_. The engine is designed to complete execution in 920 // linear time as well as limit the amount of memory used. Envoy supports 921 // program size checking via runtime. The runtime keys 922 // “re2.max_program_size.error_level“ and “re2.max_program_size.warn_level“ 923 // can be set to integers as the maximum program size or complexity that a 924 // compiled regex can have before an exception is thrown or a warning is 925 // logged, respectively. “re2.max_program_size.error_level“ defaults to 100, 926 // and “re2.max_program_size.warn_level“ has no default if unset (will not 927 // check/log a warning). Envoy emits two stats for tracking the program size of 928 // regexes: the histogram “re2.program_size“, which records the program size, 929 // and the counter “re2.exceeded_warn_level“, which is incremented each time 930 // the program size exceeds the warn level threshold. 931 type GoogleRE2 struct { 932 // MaxProgramSize: This field controls the RE2 "program size" which is a rough 933 // estimate of how complex a compiled regex is to evaluate. A regex that has a 934 // program size greater than the configured value will fail to compile. In this 935 // case, the configured max program size can be increased or the regex can be 936 // simplified. If not specified, the default is 100. This field is deprecated; 937 // regexp validation should be performed on the management server instead of 938 // being done by each individual client. .. note:: Although this field is 939 // deprecated, the program size will still be checked against the global 940 // ``re2.max_program_size.error_level`` runtime value. 941 MaxProgramSize int64 `json:"maxProgramSize,omitempty"` 942 // ForceSendFields is a list of field names (e.g. "MaxProgramSize") to 943 // unconditionally include in API requests. By default, fields with empty or 944 // default values are omitted from API requests. See 945 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 946 // details. 947 ForceSendFields []string `json:"-"` 948 // NullFields is a list of field names (e.g. "MaxProgramSize") to include in 949 // API requests with the JSON null value. By default, fields with empty values 950 // are omitted from API requests. See 951 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 952 NullFields []string `json:"-"` 953 } 954 955 func (s *GoogleRE2) MarshalJSON() ([]byte, error) { 956 type NoMethod GoogleRE2 957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 958 } 959 960 type InlineScopedRouteConfigs struct { 961 // LastUpdated: The timestamp when the scoped route config set was last 962 // updated. 963 LastUpdated string `json:"lastUpdated,omitempty"` 964 // Name: The name assigned to the scoped route configurations. 965 Name string `json:"name,omitempty"` 966 // ScopedRouteConfigs: The scoped route configurations. 967 ScopedRouteConfigs []googleapi.RawMessage `json:"scopedRouteConfigs,omitempty"` 968 // ForceSendFields is a list of field names (e.g. "LastUpdated") to 969 // unconditionally include in API requests. By default, fields with empty or 970 // default values are omitted from API requests. See 971 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 972 // details. 973 ForceSendFields []string `json:"-"` 974 // NullFields is a list of field names (e.g. "LastUpdated") to include in API 975 // requests with the JSON null value. By default, fields with empty values are 976 // omitted from API requests. See 977 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 978 NullFields []string `json:"-"` 979 } 980 981 func (s *InlineScopedRouteConfigs) MarshalJSON() ([]byte, error) { 982 type NoMethod InlineScopedRouteConfigs 983 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 984 } 985 986 // ListMatcher: Specifies the way to match a list value. 987 type ListMatcher struct { 988 // OneOf: If specified, at least one of the values in the list must match the 989 // value specified. 990 OneOf *ValueMatcher `json:"oneOf,omitempty"` 991 // ForceSendFields is a list of field names (e.g. "OneOf") to unconditionally 992 // include in API requests. By default, fields with empty or default values are 993 // omitted from API requests. See 994 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 995 // details. 996 ForceSendFields []string `json:"-"` 997 // NullFields is a list of field names (e.g. "OneOf") to include in API 998 // requests with the JSON null value. By default, fields with empty values are 999 // omitted from API requests. See 1000 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1001 NullFields []string `json:"-"` 1002 } 1003 1004 func (s *ListMatcher) MarshalJSON() ([]byte, error) { 1005 type NoMethod ListMatcher 1006 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1007 } 1008 1009 // ListenersConfigDump: Envoy's listener manager fills this message with all 1010 // currently known listeners. Listener configuration information can be used to 1011 // recreate an Envoy configuration by populating all listeners as static 1012 // listeners or by returning them in a LDS response. 1013 type ListenersConfigDump struct { 1014 // DynamicListeners: State for any warming, active, or draining listeners. 1015 DynamicListeners []*DynamicListener `json:"dynamicListeners,omitempty"` 1016 // StaticListeners: The statically loaded listener configs. 1017 StaticListeners []*StaticListener `json:"staticListeners,omitempty"` 1018 // VersionInfo: This is the :ref:`version_info ` in the last processed LDS 1019 // discovery response. If there are only static bootstrap listeners, this field 1020 // will be "". 1021 VersionInfo string `json:"versionInfo,omitempty"` 1022 // ForceSendFields is a list of field names (e.g. "DynamicListeners") to 1023 // unconditionally include in API requests. By default, fields with empty or 1024 // default values are omitted from API requests. See 1025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1026 // details. 1027 ForceSendFields []string `json:"-"` 1028 // NullFields is a list of field names (e.g. "DynamicListeners") to include in 1029 // API requests with the JSON null value. By default, fields with empty values 1030 // are omitted from API requests. See 1031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1032 NullFields []string `json:"-"` 1033 } 1034 1035 func (s *ListenersConfigDump) MarshalJSON() ([]byte, error) { 1036 type NoMethod ListenersConfigDump 1037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1038 } 1039 1040 // Locality: Identifies location of where either Envoy runs or where upstream 1041 // hosts run. 1042 type Locality struct { 1043 // Region: Region this :ref:`zone ` belongs to. 1044 Region string `json:"region,omitempty"` 1045 // SubZone: When used for locality of upstream hosts, this field further splits 1046 // zone into smaller chunks of sub-zones so they can be load balanced 1047 // independently. 1048 SubZone string `json:"subZone,omitempty"` 1049 // Zone: Defines the local service zone where Envoy is running. Though 1050 // optional, it should be set if discovery service routing is used and the 1051 // discovery service exposes :ref:`zone data `, either in this message or via 1052 // :option:`--service-zone`. The meaning of zone is context dependent, e.g. 1053 // `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc. 1054 Zone string `json:"zone,omitempty"` 1055 // ForceSendFields is a list of field names (e.g. "Region") to unconditionally 1056 // include in API requests. By default, fields with empty or default values are 1057 // omitted from API requests. See 1058 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1059 // details. 1060 ForceSendFields []string `json:"-"` 1061 // NullFields is a list of field names (e.g. "Region") to include in API 1062 // requests with the JSON null value. By default, fields with empty values are 1063 // omitted from API requests. See 1064 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1065 NullFields []string `json:"-"` 1066 } 1067 1068 func (s *Locality) MarshalJSON() ([]byte, error) { 1069 type NoMethod Locality 1070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1071 } 1072 1073 // Node: Identifies a specific Envoy instance. The node identifier is presented 1074 // to the management server, which may use this identifier to distinguish per 1075 // Envoy configuration for serving. [#next-free-field: 13] 1076 type Node struct { 1077 // ClientFeatures: Client feature support list. These are well known features 1078 // described in the Envoy API repository for a given major version of an API. 1079 // Client features use reverse DNS naming scheme, for example 1080 // ``com.acme.feature``. See :ref:`the list of features ` that xDS client may 1081 // support. 1082 ClientFeatures []string `json:"clientFeatures,omitempty"` 1083 // Cluster: Defines the local service cluster name where Envoy is running. 1084 // Though optional, it should be set if any of the following features are used: 1085 // :ref:`statsd `, :ref:`health check cluster verification `, :ref:`runtime 1086 // override directory `, :ref:`user agent addition `, :ref:`HTTP global rate 1087 // limiting `, :ref:`CDS `, and :ref:`HTTP tracing `, either in this message or 1088 // via :option:`--service-cluster`. 1089 Cluster string `json:"cluster,omitempty"` 1090 // DynamicParameters: Map from xDS resource type URL to dynamic context 1091 // parameters. These may vary at runtime (unlike other fields in this message). 1092 // For example, the xDS client may have a shard identifier that changes during 1093 // the lifetime of the xDS client. In Envoy, this would be achieved by updating 1094 // the dynamic context on the Server::Instance's LocalInfo context provider. 1095 // The shard ID dynamic parameter then appears in this field during future 1096 // discovery requests. 1097 DynamicParameters map[string]ContextParams `json:"dynamicParameters,omitempty"` 1098 // Extensions: List of extensions and their versions supported by the node. 1099 Extensions []*Extension `json:"extensions,omitempty"` 1100 // Id: An opaque node identifier for the Envoy node. This also provides the 1101 // local service node name. It should be set if any of the following features 1102 // are used: :ref:`statsd `, :ref:`CDS `, and :ref:`HTTP tracing `, either in 1103 // this message or via :option:`--service-node`. 1104 Id string `json:"id,omitempty"` 1105 // ListeningAddresses: Known listening ports on the node as a generic hint to 1106 // the management server for filtering :ref:`listeners ` to be returned. For 1107 // example, if there is a listener bound to port 80, the list can optionally 1108 // contain the SocketAddress ``(0.0.0.0,80)``. The field is optional and just a 1109 // hint. 1110 ListeningAddresses []*Address `json:"listeningAddresses,omitempty"` 1111 // Locality: Locality specifying where the Envoy instance is running. 1112 Locality *Locality `json:"locality,omitempty"` 1113 // Metadata: Opaque metadata extending the node identifier. Envoy will pass 1114 // this directly to the management server. 1115 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1116 // UserAgentBuildVersion: Structured version of the entity requesting config. 1117 UserAgentBuildVersion *BuildVersion `json:"userAgentBuildVersion,omitempty"` 1118 // UserAgentName: Free-form string that identifies the entity requesting 1119 // config. E.g. "envoy" or "grpc" 1120 UserAgentName string `json:"userAgentName,omitempty"` 1121 // UserAgentVersion: Free-form string that identifies the version of the entity 1122 // requesting config. E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" 1123 UserAgentVersion string `json:"userAgentVersion,omitempty"` 1124 // ForceSendFields is a list of field names (e.g. "ClientFeatures") to 1125 // unconditionally include in API requests. By default, fields with empty or 1126 // default values are omitted from API requests. See 1127 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1128 // details. 1129 ForceSendFields []string `json:"-"` 1130 // NullFields is a list of field names (e.g. "ClientFeatures") to include in 1131 // API requests with the JSON null value. By default, fields with empty values 1132 // are omitted from API requests. See 1133 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1134 NullFields []string `json:"-"` 1135 } 1136 1137 func (s *Node) MarshalJSON() ([]byte, error) { 1138 type NoMethod Node 1139 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1140 } 1141 1142 // NodeMatcher: Specifies the way to match a Node. The match follows AND 1143 // semantics. 1144 type NodeMatcher struct { 1145 // NodeId: Specifies match criteria on the node id. 1146 NodeId *StringMatcher `json:"nodeId,omitempty"` 1147 // NodeMetadatas: Specifies match criteria on the node metadata. 1148 NodeMetadatas []*StructMatcher `json:"nodeMetadatas,omitempty"` 1149 // ForceSendFields is a list of field names (e.g. "NodeId") to unconditionally 1150 // include in API requests. By default, fields with empty or default values are 1151 // omitted from API requests. See 1152 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1153 // details. 1154 ForceSendFields []string `json:"-"` 1155 // NullFields is a list of field names (e.g. "NodeId") to include in API 1156 // requests with the JSON null value. By default, fields with empty values are 1157 // omitted from API requests. See 1158 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1159 NullFields []string `json:"-"` 1160 } 1161 1162 func (s *NodeMatcher) MarshalJSON() ([]byte, error) { 1163 type NoMethod NodeMatcher 1164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1165 } 1166 1167 // NullMatch: NullMatch is an empty message to specify a null value. 1168 type NullMatch struct { 1169 } 1170 1171 // OrMatcher: Specifies a list of alternatives for the match. 1172 type OrMatcher struct { 1173 ValueMatchers []*ValueMatcher `json:"valueMatchers,omitempty"` 1174 // ForceSendFields is a list of field names (e.g. "ValueMatchers") to 1175 // unconditionally include in API requests. By default, fields with empty or 1176 // default values are omitted from API requests. See 1177 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1178 // details. 1179 ForceSendFields []string `json:"-"` 1180 // NullFields is a list of field names (e.g. "ValueMatchers") to include in API 1181 // requests with the JSON null value. By default, fields with empty values are 1182 // omitted from API requests. See 1183 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1184 NullFields []string `json:"-"` 1185 } 1186 1187 func (s *OrMatcher) MarshalJSON() ([]byte, error) { 1188 type NoMethod OrMatcher 1189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1190 } 1191 1192 // PathSegment: Specifies the segment in a path to retrieve value from Struct. 1193 type PathSegment struct { 1194 // Key: If specified, use the key to retrieve the value in a Struct. 1195 Key string `json:"key,omitempty"` 1196 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 1197 // include in API requests. By default, fields with empty or default values are 1198 // omitted from API requests. See 1199 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1200 // details. 1201 ForceSendFields []string `json:"-"` 1202 // NullFields is a list of field names (e.g. "Key") to include in API requests 1203 // with the JSON null value. By default, fields with empty values are omitted 1204 // from API requests. See 1205 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1206 NullFields []string `json:"-"` 1207 } 1208 1209 func (s *PathSegment) MarshalJSON() ([]byte, error) { 1210 type NoMethod PathSegment 1211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1212 } 1213 1214 // PerXdsConfig: Detailed config (per xDS) with status. [#next-free-field: 8] 1215 type PerXdsConfig struct { 1216 // ClientStatus: Client config status is populated by xDS clients. Will not be 1217 // present if the CSDS server is an xDS server. No matter what the client 1218 // config status is, xDS clients should always dump the most recent accepted 1219 // xDS config. .. attention:: This field is deprecated. Use 1220 // :ref:`ClientResourceStatus ` for per-resource config status instead. 1221 // 1222 // Possible values: 1223 // "CLIENT_UNKNOWN" - Config status is not available/unknown. 1224 // "CLIENT_REQUESTED" - Client requested the config but hasn't received any 1225 // config from management server yet. 1226 // "CLIENT_ACKED" - Client received the config and replied with ACK. 1227 // "CLIENT_NACKED" - Client received the config and replied with NACK. 1228 // Notably, the attached config dump is not the NACKed version, but the most 1229 // recent accepted one. If no config is accepted yet, the attached config dump 1230 // will be empty. 1231 ClientStatus string `json:"clientStatus,omitempty"` 1232 ClusterConfig *ClustersConfigDump `json:"clusterConfig,omitempty"` 1233 EndpointConfig *EndpointsConfigDump `json:"endpointConfig,omitempty"` 1234 ListenerConfig *ListenersConfigDump `json:"listenerConfig,omitempty"` 1235 RouteConfig *RoutesConfigDump `json:"routeConfig,omitempty"` 1236 ScopedRouteConfig *ScopedRoutesConfigDump `json:"scopedRouteConfig,omitempty"` 1237 // Status: Config status generated by management servers. Will not be present 1238 // if the CSDS server is an xDS client. 1239 // 1240 // Possible values: 1241 // "UNKNOWN" - Status info is not available/unknown. 1242 // "SYNCED" - Management server has sent the config to client and received 1243 // ACK. 1244 // "NOT_SENT" - Config is not sent. 1245 // "STALE" - Management server has sent the config to client but hasn’t 1246 // received ACK/NACK. 1247 // "ERROR" - Management server has sent the config to client but received 1248 // NACK. The attached config dump will be the latest config (the rejected one), 1249 // since it is the persisted version in the management server. 1250 Status string `json:"status,omitempty"` 1251 // ForceSendFields is a list of field names (e.g. "ClientStatus") to 1252 // unconditionally include in API requests. By default, fields with empty or 1253 // default values are omitted from API requests. See 1254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1255 // details. 1256 ForceSendFields []string `json:"-"` 1257 // NullFields is a list of field names (e.g. "ClientStatus") to include in API 1258 // requests with the JSON null value. By default, fields with empty values are 1259 // omitted from API requests. See 1260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1261 NullFields []string `json:"-"` 1262 } 1263 1264 func (s *PerXdsConfig) MarshalJSON() ([]byte, error) { 1265 type NoMethod PerXdsConfig 1266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1267 } 1268 1269 type Pipe struct { 1270 // Mode: The mode for the Pipe. Not applicable for abstract sockets. 1271 Mode int64 `json:"mode,omitempty"` 1272 // Path: Unix Domain Socket path. On Linux, paths starting with '@' will use 1273 // the abstract namespace. The starting '@' is replaced by a null byte by 1274 // Envoy. Paths starting with '@' will result in an error in environments other 1275 // than Linux. 1276 Path string `json:"path,omitempty"` 1277 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally 1278 // include in API requests. By default, fields with empty or default values are 1279 // omitted from API requests. See 1280 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1281 // details. 1282 ForceSendFields []string `json:"-"` 1283 // NullFields is a list of field names (e.g. "Mode") to include in API requests 1284 // with the JSON null value. By default, fields with empty values are omitted 1285 // from API requests. See 1286 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1287 NullFields []string `json:"-"` 1288 } 1289 1290 func (s *Pipe) MarshalJSON() ([]byte, error) { 1291 type NoMethod Pipe 1292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1293 } 1294 1295 // RegexMatcher: A regex matcher designed for safety when used with untrusted 1296 // input. 1297 type RegexMatcher struct { 1298 // GoogleRe2: Google's RE2 regex engine. 1299 GoogleRe2 *GoogleRE2 `json:"googleRe2,omitempty"` 1300 // Regex: The regex match string. The string must be supported by the 1301 // configured engine. The regex is matched against the full string, not as a 1302 // partial match. 1303 Regex string `json:"regex,omitempty"` 1304 // ForceSendFields is a list of field names (e.g. "GoogleRe2") to 1305 // unconditionally include in API requests. By default, fields with empty or 1306 // default values are omitted from API requests. See 1307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1308 // details. 1309 ForceSendFields []string `json:"-"` 1310 // NullFields is a list of field names (e.g. "GoogleRe2") to include in API 1311 // requests with the JSON null value. By default, fields with empty values are 1312 // omitted from API requests. See 1313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1314 NullFields []string `json:"-"` 1315 } 1316 1317 func (s *RegexMatcher) MarshalJSON() ([]byte, error) { 1318 type NoMethod RegexMatcher 1319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1320 } 1321 1322 // RoutesConfigDump: Envoy's RDS implementation fills this message with all 1323 // currently loaded routes, as described by their RouteConfiguration objects. 1324 // Static routes that are either defined in the bootstrap configuration or 1325 // defined inline while configuring listeners are separated from those 1326 // configured dynamically via RDS. Route configuration information can be used 1327 // to recreate an Envoy configuration by populating all routes as static routes 1328 // or by returning them in RDS responses. 1329 type RoutesConfigDump struct { 1330 // DynamicRouteConfigs: The dynamically loaded route configs. 1331 DynamicRouteConfigs []*DynamicRouteConfig `json:"dynamicRouteConfigs,omitempty"` 1332 // StaticRouteConfigs: The statically loaded route configs. 1333 StaticRouteConfigs []*StaticRouteConfig `json:"staticRouteConfigs,omitempty"` 1334 // ForceSendFields is a list of field names (e.g. "DynamicRouteConfigs") to 1335 // unconditionally include in API requests. By default, fields with empty or 1336 // default values are omitted from API requests. See 1337 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1338 // details. 1339 ForceSendFields []string `json:"-"` 1340 // NullFields is a list of field names (e.g. "DynamicRouteConfigs") to include 1341 // in API requests with the JSON null value. By default, fields with empty 1342 // values are omitted from API requests. See 1343 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1344 NullFields []string `json:"-"` 1345 } 1346 1347 func (s *RoutesConfigDump) MarshalJSON() ([]byte, error) { 1348 type NoMethod RoutesConfigDump 1349 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1350 } 1351 1352 // ScopedRoutesConfigDump: Envoy's scoped RDS implementation fills this message 1353 // with all currently loaded route configuration scopes (defined via 1354 // ScopedRouteConfigurationsSet protos). This message lists both the scopes 1355 // defined inline with the higher order object (i.e., the 1356 // HttpConnectionManager) and the dynamically obtained scopes via the SRDS API. 1357 type ScopedRoutesConfigDump struct { 1358 // DynamicScopedRouteConfigs: The dynamically loaded scoped route configs. 1359 DynamicScopedRouteConfigs []*DynamicScopedRouteConfigs `json:"dynamicScopedRouteConfigs,omitempty"` 1360 // InlineScopedRouteConfigs: The statically loaded scoped route configs. 1361 InlineScopedRouteConfigs []*InlineScopedRouteConfigs `json:"inlineScopedRouteConfigs,omitempty"` 1362 // ForceSendFields is a list of field names (e.g. "DynamicScopedRouteConfigs") 1363 // to unconditionally include in API requests. By default, fields with empty or 1364 // default values are omitted from API requests. See 1365 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1366 // details. 1367 ForceSendFields []string `json:"-"` 1368 // NullFields is a list of field names (e.g. "DynamicScopedRouteConfigs") to 1369 // include in API requests with the JSON null value. By default, fields with 1370 // empty values are omitted from API requests. See 1371 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1372 NullFields []string `json:"-"` 1373 } 1374 1375 func (s *ScopedRoutesConfigDump) MarshalJSON() ([]byte, error) { 1376 type NoMethod ScopedRoutesConfigDump 1377 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1378 } 1379 1380 // SemanticVersion: Envoy uses SemVer (https://semver.org/). Major/minor 1381 // versions indicate expected behaviors and APIs, the patch version field is 1382 // used only for security fixes and can be generally ignored. 1383 type SemanticVersion struct { 1384 MajorNumber int64 `json:"majorNumber,omitempty"` 1385 MinorNumber int64 `json:"minorNumber,omitempty"` 1386 Patch int64 `json:"patch,omitempty"` 1387 // ForceSendFields is a list of field names (e.g. "MajorNumber") to 1388 // unconditionally include in API requests. By default, fields with empty or 1389 // default values are omitted from API requests. See 1390 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1391 // details. 1392 ForceSendFields []string `json:"-"` 1393 // NullFields is a list of field names (e.g. "MajorNumber") to include in API 1394 // requests with the JSON null value. By default, fields with empty values are 1395 // omitted from API requests. See 1396 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1397 NullFields []string `json:"-"` 1398 } 1399 1400 func (s *SemanticVersion) MarshalJSON() ([]byte, error) { 1401 type NoMethod SemanticVersion 1402 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1403 } 1404 1405 // SocketAddress: [#next-free-field: 7] 1406 type SocketAddress struct { 1407 // Address: The address for this socket. :ref:`Listeners ` will bind to the 1408 // address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to 1409 // bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It 1410 // is possible to distinguish a Listener address via the prefix/suffix matching 1411 // in :ref:`FilterChainMatch `.] When used within an upstream :ref:`BindConfig 1412 // `, the address controls the source address of outbound connections. For 1413 // :ref:`clusters `, the cluster type determines whether the address must be an 1414 // IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS 1415 // (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be 1416 // customized via :ref:`resolver_name `. 1417 Address string `json:"address,omitempty"` 1418 // Ipv4Compat: When binding to an IPv6 address above, this enables `IPv4 1419 // compatibility `_. Binding to ``::`` will allow both IPv4 and IPv6 1420 // connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:``. 1421 Ipv4Compat bool `json:"ipv4Compat,omitempty"` 1422 // NamedPort: This is only valid if :ref:`resolver_name ` is specified below 1423 // and the named resolver is capable of named port resolution. 1424 NamedPort string `json:"namedPort,omitempty"` 1425 PortValue int64 `json:"portValue,omitempty"` 1426 // Possible values: 1427 // "TCP" 1428 // "UDP" 1429 Protocol string `json:"protocol,omitempty"` 1430 // ResolverName: The name of the custom resolver. This must have been 1431 // registered with Envoy. If this is empty, a context dependent default 1432 // applies. If the address is a concrete IP address, no resolution will occur. 1433 // If address is a hostname this should be set for resolution other than DNS. 1434 // Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will 1435 // generate an error at runtime. 1436 ResolverName string `json:"resolverName,omitempty"` 1437 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally 1438 // include in API requests. By default, fields with empty or default values are 1439 // omitted from API requests. See 1440 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1441 // details. 1442 ForceSendFields []string `json:"-"` 1443 // NullFields is a list of field names (e.g. "Address") to include in API 1444 // requests with the JSON null value. By default, fields with empty values are 1445 // omitted from API requests. See 1446 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1447 NullFields []string `json:"-"` 1448 } 1449 1450 func (s *SocketAddress) MarshalJSON() ([]byte, error) { 1451 type NoMethod SocketAddress 1452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1453 } 1454 1455 // StaticCluster: Describes a statically loaded cluster. 1456 type StaticCluster struct { 1457 // Cluster: The cluster config. 1458 Cluster googleapi.RawMessage `json:"cluster,omitempty"` 1459 // LastUpdated: The timestamp when the Cluster was last updated. 1460 LastUpdated string `json:"lastUpdated,omitempty"` 1461 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally 1462 // include in API requests. By default, fields with empty or default values are 1463 // omitted from API requests. See 1464 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1465 // details. 1466 ForceSendFields []string `json:"-"` 1467 // NullFields is a list of field names (e.g. "Cluster") to include in API 1468 // requests with the JSON null value. By default, fields with empty values are 1469 // omitted from API requests. See 1470 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1471 NullFields []string `json:"-"` 1472 } 1473 1474 func (s *StaticCluster) MarshalJSON() ([]byte, error) { 1475 type NoMethod StaticCluster 1476 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1477 } 1478 1479 type StaticEndpointConfig struct { 1480 // EndpointConfig: The endpoint config. 1481 EndpointConfig googleapi.RawMessage `json:"endpointConfig,omitempty"` 1482 // LastUpdated: [#not-implemented-hide:] The timestamp when the Endpoint was 1483 // last updated. 1484 LastUpdated string `json:"lastUpdated,omitempty"` 1485 // ForceSendFields is a list of field names (e.g. "EndpointConfig") to 1486 // unconditionally include in API requests. By default, fields with empty or 1487 // default values are omitted from API requests. See 1488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1489 // details. 1490 ForceSendFields []string `json:"-"` 1491 // NullFields is a list of field names (e.g. "EndpointConfig") to include in 1492 // API requests with the JSON null value. By default, fields with empty values 1493 // are omitted from API requests. See 1494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1495 NullFields []string `json:"-"` 1496 } 1497 1498 func (s *StaticEndpointConfig) MarshalJSON() ([]byte, error) { 1499 type NoMethod StaticEndpointConfig 1500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1501 } 1502 1503 // StaticListener: Describes a statically loaded listener. 1504 type StaticListener struct { 1505 // LastUpdated: The timestamp when the Listener was last successfully updated. 1506 LastUpdated string `json:"lastUpdated,omitempty"` 1507 // Listener: The listener config. 1508 Listener googleapi.RawMessage `json:"listener,omitempty"` 1509 // ForceSendFields is a list of field names (e.g. "LastUpdated") to 1510 // unconditionally include in API requests. By default, fields with empty or 1511 // default values are omitted from API requests. See 1512 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1513 // details. 1514 ForceSendFields []string `json:"-"` 1515 // NullFields is a list of field names (e.g. "LastUpdated") to include in API 1516 // requests with the JSON null value. By default, fields with empty values are 1517 // omitted from API requests. See 1518 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1519 NullFields []string `json:"-"` 1520 } 1521 1522 func (s *StaticListener) MarshalJSON() ([]byte, error) { 1523 type NoMethod StaticListener 1524 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1525 } 1526 1527 type StaticRouteConfig struct { 1528 // LastUpdated: The timestamp when the Route was last updated. 1529 LastUpdated string `json:"lastUpdated,omitempty"` 1530 // RouteConfig: The route config. 1531 RouteConfig googleapi.RawMessage `json:"routeConfig,omitempty"` 1532 // ForceSendFields is a list of field names (e.g. "LastUpdated") to 1533 // unconditionally include in API requests. By default, fields with empty or 1534 // default values are omitted from API requests. See 1535 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1536 // details. 1537 ForceSendFields []string `json:"-"` 1538 // NullFields is a list of field names (e.g. "LastUpdated") to include in API 1539 // requests with the JSON null value. By default, fields with empty values are 1540 // omitted from API requests. See 1541 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1542 NullFields []string `json:"-"` 1543 } 1544 1545 func (s *StaticRouteConfig) MarshalJSON() ([]byte, error) { 1546 type NoMethod StaticRouteConfig 1547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1548 } 1549 1550 // StringMatcher: Specifies the way to match a string. [#next-free-field: 9] 1551 type StringMatcher struct { 1552 // Contains: The input string must have the substring specified here. Note: 1553 // empty contains match is not allowed, please use regex instead. Examples: * 1554 // ``abc`` matches the value ``xyz.abc.def`` 1555 Contains string `json:"contains,omitempty"` 1556 // Custom: Use an extension as the matcher type. [#extension-category: 1557 // envoy.string_matcher] 1558 Custom *TypedExtensionConfig `json:"custom,omitempty"` 1559 // Exact: The input string must match exactly the string specified here. 1560 // Examples: * ``abc`` only matches the value ``abc``. 1561 Exact string `json:"exact,omitempty"` 1562 // IgnoreCase: If true, indicates the exact/prefix/suffix/contains matching 1563 // should be case insensitive. This has no effect for the safe_regex match. For 1564 // example, the matcher ``data`` will match both input string ``Data`` and 1565 // ``data`` if set to true. 1566 IgnoreCase bool `json:"ignoreCase,omitempty"` 1567 // Prefix: The input string must have the prefix specified here. Note: empty 1568 // prefix is not allowed, please use regex instead. Examples: * ``abc`` matches 1569 // the value ``abc.xyz`` 1570 Prefix string `json:"prefix,omitempty"` 1571 // SafeRegex: The input string must match the regular expression specified 1572 // here. 1573 SafeRegex *RegexMatcher `json:"safeRegex,omitempty"` 1574 // Suffix: The input string must have the suffix specified here. Note: empty 1575 // prefix is not allowed, please use regex instead. Examples: * ``abc`` matches 1576 // the value ``xyz.abc`` 1577 Suffix string `json:"suffix,omitempty"` 1578 // ForceSendFields is a list of field names (e.g. "Contains") to 1579 // unconditionally include in API requests. By default, fields with empty or 1580 // default values are omitted from API requests. See 1581 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1582 // details. 1583 ForceSendFields []string `json:"-"` 1584 // NullFields is a list of field names (e.g. "Contains") to include in API 1585 // requests with the JSON null value. By default, fields with empty values are 1586 // omitted from API requests. See 1587 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1588 NullFields []string `json:"-"` 1589 } 1590 1591 func (s *StringMatcher) MarshalJSON() ([]byte, error) { 1592 type NoMethod StringMatcher 1593 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1594 } 1595 1596 // StructMatcher: StructMatcher provides a general interface to check if a 1597 // given value is matched in google.protobuf.Struct. It uses “path“ to 1598 // retrieve the value from the struct and then check if it's matched to the 1599 // specified value. For example, for the following Struct: .. code-block:: yaml 1600 // fields: a: struct_value: fields: b: struct_value: fields: c: string_value: 1601 // pro t: list_value: values: - string_value: m - string_value: n The following 1602 // MetadataMatcher is matched as the path [a, b, c] will retrieve a string 1603 // value "pro" from the Metadata which is matched to the specified prefix 1604 // match. .. code-block:: yaml path: - key: a - key: b - key: c value: 1605 // string_match: prefix: pr The following StructMatcher is matched as the code 1606 // will match one of the string values in the list at the path [a, t]. .. 1607 // code-block:: yaml path: - key: a - key: t value: list_match: one_of: 1608 // string_match: exact: m An example use of StructMatcher is to match metadata 1609 // in envoy.v*.core.Node. 1610 type StructMatcher struct { 1611 // Path: The path to retrieve the Value from the Struct. 1612 Path []*PathSegment `json:"path,omitempty"` 1613 // Value: The StructMatcher is matched if the value retrieved by path is 1614 // matched to this value. 1615 Value *ValueMatcher `json:"value,omitempty"` 1616 // ForceSendFields is a list of field names (e.g. "Path") to unconditionally 1617 // include in API requests. By default, fields with empty or default values are 1618 // omitted from API requests. See 1619 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1620 // details. 1621 ForceSendFields []string `json:"-"` 1622 // NullFields is a list of field names (e.g. "Path") to include in API requests 1623 // with the JSON null value. By default, fields with empty values are omitted 1624 // from API requests. See 1625 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1626 NullFields []string `json:"-"` 1627 } 1628 1629 func (s *StructMatcher) MarshalJSON() ([]byte, error) { 1630 type NoMethod StructMatcher 1631 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1632 } 1633 1634 // TypedExtensionConfig: Message type for extension configuration. 1635 type TypedExtensionConfig struct { 1636 // Name: The name of an extension. This is not used to select the extension, 1637 // instead it serves the role of an opaque identifier. 1638 Name string `json:"name,omitempty"` 1639 // TypedConfig: The typed config for the extension. The type URL will be used 1640 // to identify the extension. In the case that the type URL is 1641 // *xds.type.v3.TypedStruct* (or, for historical reasons, 1642 // *udpa.type.v1.TypedStruct*), the inner type URL of *TypedStruct* will be 1643 // utilized. See the :ref:`extension configuration overview ` for further 1644 // details. 1645 TypedConfig googleapi.RawMessage `json:"typedConfig,omitempty"` 1646 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1647 // include in API requests. By default, fields with empty or default values are 1648 // omitted from API requests. See 1649 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1650 // details. 1651 ForceSendFields []string `json:"-"` 1652 // NullFields is a list of field names (e.g. "Name") to include in API requests 1653 // with the JSON null value. By default, fields with empty values are omitted 1654 // from API requests. See 1655 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1656 NullFields []string `json:"-"` 1657 } 1658 1659 func (s *TypedExtensionConfig) MarshalJSON() ([]byte, error) { 1660 type NoMethod TypedExtensionConfig 1661 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1662 } 1663 1664 type UpdateFailureState struct { 1665 // Details: Details about the last failed update attempt. 1666 Details string `json:"details,omitempty"` 1667 // FailedConfiguration: What the component configuration would have been if the 1668 // update had succeeded. This field may not be populated by xDS clients due to 1669 // storage overhead. 1670 FailedConfiguration googleapi.RawMessage `json:"failedConfiguration,omitempty"` 1671 // LastUpdateAttempt: Time of the latest failed update attempt. 1672 LastUpdateAttempt string `json:"lastUpdateAttempt,omitempty"` 1673 // VersionInfo: This is the version of the rejected resource. 1674 // [#not-implemented-hide:] 1675 VersionInfo string `json:"versionInfo,omitempty"` 1676 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally 1677 // include in API requests. By default, fields with empty or default values are 1678 // omitted from API requests. See 1679 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1680 // details. 1681 ForceSendFields []string `json:"-"` 1682 // NullFields is a list of field names (e.g. "Details") to include in API 1683 // requests with the JSON null value. By default, fields with empty values are 1684 // omitted from API requests. See 1685 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1686 NullFields []string `json:"-"` 1687 } 1688 1689 func (s *UpdateFailureState) MarshalJSON() ([]byte, error) { 1690 type NoMethod UpdateFailureState 1691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1692 } 1693 1694 // ValueMatcher: Specifies the way to match a ProtobufWkt::Value. Primitive 1695 // values and ListValue are supported. StructValue is not supported and is 1696 // always not matched. [#next-free-field: 8] 1697 type ValueMatcher struct { 1698 // BoolMatch: If specified, a match occurs if and only if the target value is a 1699 // bool value and is equal to this field. 1700 BoolMatch bool `json:"boolMatch,omitempty"` 1701 // DoubleMatch: If specified, a match occurs if and only if the target value is 1702 // a double value and is matched to this field. 1703 DoubleMatch *DoubleMatcher `json:"doubleMatch,omitempty"` 1704 // ListMatch: If specified, a match occurs if and only if the target value is a 1705 // list value and is matched to this field. 1706 ListMatch *ListMatcher `json:"listMatch,omitempty"` 1707 // NullMatch: If specified, a match occurs if and only if the target value is a 1708 // NullValue. 1709 NullMatch *NullMatch `json:"nullMatch,omitempty"` 1710 // OrMatch: If specified, a match occurs if and only if any of the alternatives 1711 // in the match accept the value. 1712 OrMatch *OrMatcher `json:"orMatch,omitempty"` 1713 // PresentMatch: If specified, value match will be performed based on whether 1714 // the path is referring to a valid primitive value in the metadata. If the 1715 // path is referring to a non-primitive value, the result is always not 1716 // matched. 1717 PresentMatch bool `json:"presentMatch,omitempty"` 1718 // StringMatch: If specified, a match occurs if and only if the target value is 1719 // a string value and is matched to this field. 1720 StringMatch *StringMatcher `json:"stringMatch,omitempty"` 1721 // ForceSendFields is a list of field names (e.g. "BoolMatch") to 1722 // unconditionally include in API requests. By default, fields with empty or 1723 // default values are omitted from API requests. See 1724 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1725 // details. 1726 ForceSendFields []string `json:"-"` 1727 // NullFields is a list of field names (e.g. "BoolMatch") to include in API 1728 // requests with the JSON null value. By default, fields with empty values are 1729 // omitted from API requests. See 1730 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1731 NullFields []string `json:"-"` 1732 } 1733 1734 func (s *ValueMatcher) MarshalJSON() ([]byte, error) { 1735 type NoMethod ValueMatcher 1736 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1737 } 1738 1739 type DiscoveryClientStatusCall struct { 1740 s *Service 1741 clientstatusrequest *ClientStatusRequest 1742 urlParams_ gensupport.URLParams 1743 ctx_ context.Context 1744 header_ http.Header 1745 } 1746 1747 // ClientStatus: 1748 func (r *DiscoveryService) ClientStatus(clientstatusrequest *ClientStatusRequest) *DiscoveryClientStatusCall { 1749 c := &DiscoveryClientStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1750 c.clientstatusrequest = clientstatusrequest 1751 return c 1752 } 1753 1754 // Fields allows partial responses to be retrieved. See 1755 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1756 // details. 1757 func (c *DiscoveryClientStatusCall) Fields(s ...googleapi.Field) *DiscoveryClientStatusCall { 1758 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1759 return c 1760 } 1761 1762 // Context sets the context to be used in this call's Do method. 1763 func (c *DiscoveryClientStatusCall) Context(ctx context.Context) *DiscoveryClientStatusCall { 1764 c.ctx_ = ctx 1765 return c 1766 } 1767 1768 // Header returns a http.Header that can be modified by the caller to add 1769 // headers to the request. 1770 func (c *DiscoveryClientStatusCall) Header() http.Header { 1771 if c.header_ == nil { 1772 c.header_ = make(http.Header) 1773 } 1774 return c.header_ 1775 } 1776 1777 func (c *DiscoveryClientStatusCall) doRequest(alt string) (*http.Response, error) { 1778 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 1779 var body io.Reader = nil 1780 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientstatusrequest) 1781 if err != nil { 1782 return nil, err 1783 } 1784 c.urlParams_.Set("alt", alt) 1785 c.urlParams_.Set("prettyPrint", "false") 1786 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/discovery:client_status") 1787 urls += "?" + c.urlParams_.Encode() 1788 req, err := http.NewRequest("POST", urls, body) 1789 if err != nil { 1790 return nil, err 1791 } 1792 req.Header = reqHeaders 1793 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1794 } 1795 1796 // Do executes the "trafficdirector.discovery.client_status" call. 1797 // Any non-2xx status code is an error. Response headers are in either 1798 // *ClientStatusResponse.ServerResponse.Header or (if a response was returned 1799 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 1800 // check whether the returned error was because http.StatusNotModified was 1801 // returned. 1802 func (c *DiscoveryClientStatusCall) Do(opts ...googleapi.CallOption) (*ClientStatusResponse, error) { 1803 gensupport.SetOptions(c.urlParams_, opts...) 1804 res, err := c.doRequest("json") 1805 if res != nil && res.StatusCode == http.StatusNotModified { 1806 if res.Body != nil { 1807 res.Body.Close() 1808 } 1809 return nil, gensupport.WrapError(&googleapi.Error{ 1810 Code: res.StatusCode, 1811 Header: res.Header, 1812 }) 1813 } 1814 if err != nil { 1815 return nil, err 1816 } 1817 defer googleapi.CloseBody(res) 1818 if err := googleapi.CheckResponse(res); err != nil { 1819 return nil, gensupport.WrapError(err) 1820 } 1821 ret := &ClientStatusResponse{ 1822 ServerResponse: googleapi.ServerResponse{ 1823 Header: res.Header, 1824 HTTPStatusCode: res.StatusCode, 1825 }, 1826 } 1827 target := &ret 1828 if err := gensupport.DecodeResponse(target, res); err != nil { 1829 return nil, err 1830 } 1831 return ret, nil 1832 } 1833