|
| 1 | +// Copyright 2024 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.speech.v2; |
| 18 | + |
| 19 | +option go_package = "cloud.google.com/go/speech/apiv2/speechpb;speechpb"; |
| 20 | +option java_multiple_files = true; |
| 21 | +option java_outer_classname = "LocationsMetadataProto"; |
| 22 | +option java_package = "com.google.cloud.speech.v2"; |
| 23 | + |
| 24 | +// Representes a singular feature of a model. If the feature is `recognizer`, |
| 25 | +// the release_state of the feature represents the release_state of the model |
| 26 | +message ModelFeature { |
| 27 | + // The name of the feature (Note: the feature can be `recognizer`) |
| 28 | + string feature = 1; |
| 29 | + |
| 30 | + // The release state of the feature |
| 31 | + string release_state = 2; |
| 32 | +} |
| 33 | + |
| 34 | +// Represents the collection of features belonging to a model |
| 35 | +message ModelFeatures { |
| 36 | + // Repeated field that contains all features of the model |
| 37 | + repeated ModelFeature model_feature = 1; |
| 38 | +} |
| 39 | + |
| 40 | +// The metadata about the models in a given region for a specific locale. |
| 41 | +// Currently this is just the features of the model |
| 42 | +message ModelMetadata { |
| 43 | + // Map of the model name -> features of that model |
| 44 | + map<string, ModelFeatures> model_features = 1; |
| 45 | +} |
| 46 | + |
| 47 | +// The metadata about locales available in a given region. Currently this is |
| 48 | +// just the models that are available for each locale |
| 49 | +message LanguageMetadata { |
| 50 | + // Map of locale (language code) -> models |
| 51 | + map<string, ModelMetadata> models = 1; |
| 52 | +} |
| 53 | + |
| 54 | +// The access metadata for a particular region. This can be applied if the org |
| 55 | +// policy for the given project disallows a particular region. |
| 56 | +message AccessMetadata { |
| 57 | + // Describes the different types of constraints that can be applied on a |
| 58 | + // region. |
| 59 | + enum ConstraintType { |
| 60 | + // Unspecified constraint applied. |
| 61 | + CONSTRAINT_TYPE_UNSPECIFIED = 0; |
| 62 | + |
| 63 | + // The project's org policy disallows the given region. |
| 64 | + RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT = 1; |
| 65 | + } |
| 66 | + |
| 67 | + // Describes the different types of constraints that are applied. |
| 68 | + ConstraintType constraint_type = 1; |
| 69 | +} |
| 70 | + |
| 71 | +// Main metadata for the Locations API for STT V2. Currently this is just the |
| 72 | +// metadata about locales, models, and features |
| 73 | +message LocationsMetadata { |
| 74 | + // Information about available locales, models, and features represented in |
| 75 | + // the hierarchical structure of locales -> models -> features |
| 76 | + LanguageMetadata languages = 1; |
| 77 | + |
| 78 | + // Information about access metadata for the region and given project. |
| 79 | + AccessMetadata access_metadata = 2; |
| 80 | +} |
0 commit comments