// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/resource.proto
// Protobuf Java Version: 3.25.3
package com.google.api;
/**
*
* A simple descriptor of a resource type.
*
* ResourceDescriptor annotates a resource message (either by means of a
* protobuf annotation or use in the service config), and associates the
* resource's schema, the resource type, and the pattern of the resource name.
*
* Example:
*
* message Topic {
* // Indicates this message defines a resource schema.
* // Declares the resource type in the format of {service}/{kind}.
* // For Kubernetes resources, the format is {api group}/{kind}.
* option (google.api.resource) = {
* type: "pubsub.googleapis.com/Topic"
* name_descriptor: {
* pattern: "projects/{project}/topics/{topic}"
* parent_type: "cloudresourcemanager.googleapis.com/Project"
* parent_name_extractor: "projects/{project}"
* }
* };
* }
*
* The ResourceDescriptor Yaml config will look like:
*
* resources:
* - type: "pubsub.googleapis.com/Topic"
* name_descriptor:
* - pattern: "projects/{project}/topics/{topic}"
* parent_type: "cloudresourcemanager.googleapis.com/Project"
* parent_name_extractor: "projects/{project}"
*
* Sometimes, resources have multiple patterns, typically because they can
* live under multiple parents.
*
* Example:
*
* message LogEntry {
* option (google.api.resource) = {
* type: "logging.googleapis.com/LogEntry"
* name_descriptor: {
* pattern: "projects/{project}/logs/{log}"
* parent_type: "cloudresourcemanager.googleapis.com/Project"
* parent_name_extractor: "projects/{project}"
* }
* name_descriptor: {
* pattern: "folders/{folder}/logs/{log}"
* parent_type: "cloudresourcemanager.googleapis.com/Folder"
* parent_name_extractor: "folders/{folder}"
* }
* name_descriptor: {
* pattern: "organizations/{organization}/logs/{log}"
* parent_type: "cloudresourcemanager.googleapis.com/Organization"
* parent_name_extractor: "organizations/{organization}"
* }
* name_descriptor: {
* pattern: "billingAccounts/{billing_account}/logs/{log}"
* parent_type: "billing.googleapis.com/BillingAccount"
* parent_name_extractor: "billingAccounts/{billing_account}"
* }
* };
* }
*
* The ResourceDescriptor Yaml config will look like:
*
* resources:
* - type: 'logging.googleapis.com/LogEntry'
* name_descriptor:
* - pattern: "projects/{project}/logs/{log}"
* parent_type: "cloudresourcemanager.googleapis.com/Project"
* parent_name_extractor: "projects/{project}"
* - pattern: "folders/{folder}/logs/{log}"
* parent_type: "cloudresourcemanager.googleapis.com/Folder"
* parent_name_extractor: "folders/{folder}"
* - pattern: "organizations/{organization}/logs/{log}"
* parent_type: "cloudresourcemanager.googleapis.com/Organization"
* parent_name_extractor: "organizations/{organization}"
* - pattern: "billingAccounts/{billing_account}/logs/{log}"
* parent_type: "billing.googleapis.com/BillingAccount"
* parent_name_extractor: "billingAccounts/{billing_account}"
*
* For flexible resources, the resource name doesn't contain parent names, but
* the resource itself has parents for policy evaluation.
*
* Example:
*
* message Shelf {
* option (google.api.resource) = {
* type: "library.googleapis.com/Shelf"
* name_descriptor: {
* pattern: "shelves/{shelf}"
* parent_type: "cloudresourcemanager.googleapis.com/Project"
* }
* name_descriptor: {
* pattern: "shelves/{shelf}"
* parent_type: "cloudresourcemanager.googleapis.com/Folder"
* }
* };
* }
*
* The ResourceDescriptor Yaml config will look like:
*
* resources:
* - type: 'library.googleapis.com/Shelf'
* name_descriptor:
* - pattern: "shelves/{shelf}"
* parent_type: "cloudresourcemanager.googleapis.com/Project"
* - pattern: "shelves/{shelf}"
* parent_type: "cloudresourcemanager.googleapis.com/Folder"
*
*
* Protobuf type {@code google.api.ResourceDescriptor}
*/
public final class ResourceDescriptor extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.ResourceDescriptor)
ResourceDescriptorOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourceDescriptor.newBuilder() to construct.
private ResourceDescriptor(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourceDescriptor() {
type_ = "";
pattern_ =
com.google.protobuf.LazyStringArrayList.emptyList();
nameField_ = "";
history_ = 0;
plural_ = "";
singular_ = "";
style_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ResourceDescriptor();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.ResourceProto.internal_static_google_api_ResourceDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.ResourceProto.internal_static_google_api_ResourceDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.ResourceDescriptor.class, com.google.api.ResourceDescriptor.Builder.class);
}
/**
*
* A description of the historical or future-looking state of the
* resource pattern.
*
*
* Protobuf enum {@code google.api.ResourceDescriptor.History}
*/
public enum History
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The "unset" value.
*
*
* HISTORY_UNSPECIFIED = 0;
*/
HISTORY_UNSPECIFIED(0),
/**
*
* The resource originally had one pattern and launched as such, and
* additional patterns were added later.
*
*
* ORIGINALLY_SINGLE_PATTERN = 1;
*/
ORIGINALLY_SINGLE_PATTERN(1),
/**
*
* The resource has one pattern, but the API owner expects to add more
* later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
* that from being necessary once there are multiple patterns.)
*
*
* FUTURE_MULTI_PATTERN = 2;
*/
FUTURE_MULTI_PATTERN(2),
UNRECOGNIZED(-1),
;
/**
*
* The "unset" value.
*
*
* HISTORY_UNSPECIFIED = 0;
*/
public static final int HISTORY_UNSPECIFIED_VALUE = 0;
/**
*
* The resource originally had one pattern and launched as such, and
* additional patterns were added later.
*
*
* ORIGINALLY_SINGLE_PATTERN = 1;
*/
public static final int ORIGINALLY_SINGLE_PATTERN_VALUE = 1;
/**
*
* The resource has one pattern, but the API owner expects to add more
* later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
* that from being necessary once there are multiple patterns.)
*
*
* FUTURE_MULTI_PATTERN = 2;
*/
public static final int FUTURE_MULTI_PATTERN_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static History valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static History forNumber(int value) {
switch (value) {
case 0: return HISTORY_UNSPECIFIED;
case 1: return ORIGINALLY_SINGLE_PATTERN;
case 2: return FUTURE_MULTI_PATTERN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
History> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public History findValueByNumber(int number) {
return History.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.api.ResourceDescriptor.getDescriptor().getEnumTypes().get(0);
}
private static final History[] VALUES = values();
public static History valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private History(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.api.ResourceDescriptor.History)
}
/**
*
* A flag representing a specific style that a resource claims to conform to.
*
*
* Protobuf enum {@code google.api.ResourceDescriptor.Style}
*/
public enum Style
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The unspecified value. Do not use.
*
*
* STYLE_UNSPECIFIED = 0;
*/
STYLE_UNSPECIFIED(0),
/**
*
* This resource is intended to be "declarative-friendly".
*
* Declarative-friendly resources must be more strictly consistent, and
* setting this to true communicates to tools that this resource should
* adhere to declarative-friendly expectations.
*
* Note: This is used by the API linter (linter.aip.dev) to enable
* additional checks.
*
*
* DECLARATIVE_FRIENDLY = 1;
*/
DECLARATIVE_FRIENDLY(1),
UNRECOGNIZED(-1),
;
/**
*
* The unspecified value. Do not use.
*
*
* STYLE_UNSPECIFIED = 0;
*/
public static final int STYLE_UNSPECIFIED_VALUE = 0;
/**
*
* This resource is intended to be "declarative-friendly".
*
* Declarative-friendly resources must be more strictly consistent, and
* setting this to true communicates to tools that this resource should
* adhere to declarative-friendly expectations.
*
* Note: This is used by the API linter (linter.aip.dev) to enable
* additional checks.
*
*
* DECLARATIVE_FRIENDLY = 1;
*/
public static final int DECLARATIVE_FRIENDLY_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Style valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Style forNumber(int value) {
switch (value) {
case 0: return STYLE_UNSPECIFIED;
case 1: return DECLARATIVE_FRIENDLY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap