target.apidocs.com.google.api.services.servicemanagement.model.Context.html Maven / Gradle / Ivy
Context (Service Management API v1-rev20240920-2.0.0)
com.google.api.services.servicemanagement.model
Class Context
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.servicemanagement.model.Context
-
public final class Context
extends com.google.api.client.json.GenericJson
`Context` defines which contexts an API requests. Example: context: rules: - selector: "*"
requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above
specifies that all methods in the API request `google.rpc.context.ProjectContext` and
`google.rpc.context.OriginContext`. Available context types are defined in package
`google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension
that can be sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format. For
example, list any service specific protobuf types that can appear in grpc metadata as follows in
your yaml file: Example: context: rules: - selector:
"google.example.library.v1.LibraryService.CreateBook" allowed_request_extensions: -
google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also
specify extension ID instead of fully qualified extension name here.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Service Management API. For a detailed explanation
see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Context()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Context
clone()
List<ContextRule>
getRules()
A list of RPC context rules that apply to individual API methods.
Context
set(String fieldName,
Object value)
Context
setRules(List<ContextRule> rules)
A list of RPC context rules that apply to individual API methods.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getRules
public List<ContextRule> getRules()
A list of RPC context rules that apply to individual API methods. **NOTE:** All service
configuration rules follow "last one wins" order.
- Returns:
- value or
null
for none
-
setRules
public Context setRules(List<ContextRule> rules)
A list of RPC context rules that apply to individual API methods. **NOTE:** All service
configuration rules follow "last one wins" order.
- Parameters:
rules
- rules or null
for none
-
set
public Context set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Context clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy