1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/protobuf/struct.proto"; 21 22option csharp_namespace = "Google.Cloud.AIPlatform.V1"; 23option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; 24option java_multiple_files = true; 25option java_outer_classname = "OpenApiProto"; 26option java_package = "com.google.cloud.aiplatform.v1"; 27option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; 28option ruby_package = "Google::Cloud::AIPlatform::V1"; 29 30// Type contains the list of OpenAPI data types as defined by 31// https://swagger.io/docs/specification/data-models/data-types/ 32enum Type { 33 // Not specified, should not be used. 34 TYPE_UNSPECIFIED = 0; 35 36 // OpenAPI string type 37 STRING = 1; 38 39 // OpenAPI number type 40 NUMBER = 2; 41 42 // OpenAPI integer type 43 INTEGER = 3; 44 45 // OpenAPI boolean type 46 BOOLEAN = 4; 47 48 // OpenAPI array type 49 ARRAY = 5; 50 51 // OpenAPI object type 52 OBJECT = 6; 53} 54 55// Schema is used to define the format of input/output data. Represents a select 56// subset of an [OpenAPI 3.0 schema 57// object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be 58// added in the future as needed. 59message Schema { 60 // Optional. The type of the data. 61 Type type = 1 [(google.api.field_behavior) = OPTIONAL]; 62 63 // Optional. The format of the data. 64 // Supported formats: 65 // for NUMBER type: "float", "double" 66 // for INTEGER type: "int32", "int64" 67 // for STRING type: "email", "byte", etc 68 string format = 7 [(google.api.field_behavior) = OPTIONAL]; 69 70 // Optional. The title of the Schema. 71 string title = 24 [(google.api.field_behavior) = OPTIONAL]; 72 73 // Optional. The description of the data. 74 string description = 8 [(google.api.field_behavior) = OPTIONAL]; 75 76 // Optional. Indicates if the value may be null. 77 bool nullable = 6 [(google.api.field_behavior) = OPTIONAL]; 78 79 // Optional. Default value of the data. 80 google.protobuf.Value default = 23 [(google.api.field_behavior) = OPTIONAL]; 81 82 // Optional. SCHEMA FIELDS FOR TYPE ARRAY 83 // Schema of the elements of Type.ARRAY. 84 Schema items = 2 [(google.api.field_behavior) = OPTIONAL]; 85 86 // Optional. Minimum number of the elements for Type.ARRAY. 87 int64 min_items = 21 [(google.api.field_behavior) = OPTIONAL]; 88 89 // Optional. Maximum number of the elements for Type.ARRAY. 90 int64 max_items = 22 [(google.api.field_behavior) = OPTIONAL]; 91 92 // Optional. Possible values of the element of Type.STRING with enum format. 93 // For example we can define an Enum Direction as : 94 // {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 95 repeated string enum = 9 [(google.api.field_behavior) = OPTIONAL]; 96 97 // Optional. SCHEMA FIELDS FOR TYPE OBJECT 98 // Properties of Type.OBJECT. 99 map<string, Schema> properties = 3 [(google.api.field_behavior) = OPTIONAL]; 100 101 // Optional. Required properties of Type.OBJECT. 102 repeated string required = 5 [(google.api.field_behavior) = OPTIONAL]; 103 104 // Optional. Minimum number of the properties for Type.OBJECT. 105 int64 min_properties = 14 [(google.api.field_behavior) = OPTIONAL]; 106 107 // Optional. Maximum number of the properties for Type.OBJECT. 108 int64 max_properties = 15 [(google.api.field_behavior) = OPTIONAL]; 109 110 // Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER 111 // Minimum value of the Type.INTEGER and Type.NUMBER 112 double minimum = 16 [(google.api.field_behavior) = OPTIONAL]; 113 114 // Optional. Maximum value of the Type.INTEGER and Type.NUMBER 115 double maximum = 17 [(google.api.field_behavior) = OPTIONAL]; 116 117 // Optional. SCHEMA FIELDS FOR TYPE STRING 118 // Minimum length of the Type.STRING 119 int64 min_length = 18 [(google.api.field_behavior) = OPTIONAL]; 120 121 // Optional. Maximum length of the Type.STRING 122 int64 max_length = 19 [(google.api.field_behavior) = OPTIONAL]; 123 124 // Optional. Pattern of the Type.STRING to restrict a string to a regular 125 // expression. 126 string pattern = 20 [(google.api.field_behavior) = OPTIONAL]; 127 128 // Optional. Example of the object. Will only populated when the object is the 129 // root. 130 google.protobuf.Value example = 4 [(google.api.field_behavior) = OPTIONAL]; 131} 132