target.apidocs.com.google.api.services.servicemanagement.model.FieldPolicy.html Maven / Gradle / Ivy
FieldPolicy (Service Management API v1-rev20240920-2.0.0)
com.google.api.services.servicemanagement.model
Class FieldPolicy
- 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.FieldPolicy
-
public final class FieldPolicy
extends com.google.api.client.json.GenericJson
Google API Policy Annotation This message defines a simple API policy annotation that can be used
to annotate API request and response message fields with applicable policies. One field may have
multiple applicable policies that must all be satisfied before a request can be processed. This
policy annotation is used to generate the overall policy that will be used for automatic runtime
policy enforcement and documentation generation.
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
FieldPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
FieldPolicy
clone()
String
getResourcePermission()
Specifies the required permission(s) for the resource referred to by the field.
String
getResourceType()
Specifies the resource type for the resource referred to by the field.
String
getSelector()
Selects one or more request or response message fields to apply this `FieldPolicy`.
FieldPolicy
set(String fieldName,
Object value)
FieldPolicy
setResourcePermission(String resourcePermission)
Specifies the required permission(s) for the resource referred to by the field.
FieldPolicy
setResourceType(String resourceType)
Specifies the resource type for the resource referred to by the field.
FieldPolicy
setSelector(String selector)
Selects one or more request or response message fields to apply this `FieldPolicy`.
-
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
-
getResourcePermission
public String getResourcePermission()
Specifies the required permission(s) for the resource referred to by the field. It requires the
field contains a valid resource reference, and the request must pass the permission checks to
proceed. For example, "resourcemanager.projects.get".
- Returns:
- value or
null
for none
-
setResourcePermission
public FieldPolicy setResourcePermission(String resourcePermission)
Specifies the required permission(s) for the resource referred to by the field. It requires the
field contains a valid resource reference, and the request must pass the permission checks to
proceed. For example, "resourcemanager.projects.get".
- Parameters:
resourcePermission
- resourcePermission or null
for none
-
getResourceType
public String getResourceType()
Specifies the resource type for the resource referred to by the field.
- Returns:
- value or
null
for none
-
setResourceType
public FieldPolicy setResourceType(String resourceType)
Specifies the resource type for the resource referred to by the field.
- Parameters:
resourceType
- resourceType or null
for none
-
getSelector
public String getSelector()
Selects one or more request or response message fields to apply this `FieldPolicy`. When a
`FieldPolicy` is used in proto annotation, the selector must be left as empty. The service
config generator will automatically fill the correct value. When a `FieldPolicy` is used in
service config, the selector must be a comma-separated string with valid request or response
field paths, such as "foo.bar" or "foo.bar,foo.baz".
- Returns:
- value or
null
for none
-
setSelector
public FieldPolicy setSelector(String selector)
Selects one or more request or response message fields to apply this `FieldPolicy`. When a
`FieldPolicy` is used in proto annotation, the selector must be left as empty. The service
config generator will automatically fill the correct value. When a `FieldPolicy` is used in
service config, the selector must be a comma-separated string with valid request or response
field paths, such as "foo.bar" or "foo.bar,foo.baz".
- Parameters:
selector
- selector or null
for none
-
set
public FieldPolicy set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public FieldPolicy 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