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.apphub.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/field_info.proto"; 21import "google/api/resource.proto"; 22import "google/cloud/apphub/v1/attributes.proto"; 23import "google/protobuf/timestamp.proto"; 24 25option csharp_namespace = "Google.Cloud.AppHub.V1"; 26option go_package = "cloud.google.com/go/apphub/apiv1/apphubpb;apphubpb"; 27option java_multiple_files = true; 28option java_outer_classname = "ApplicationProto"; 29option java_package = "com.google.cloud.apphub.v1"; 30option php_namespace = "Google\\Cloud\\AppHub\\V1"; 31option ruby_package = "Google::Cloud::AppHub::V1"; 32 33// Application defines the governance boundary for App Hub Entities that 34// perform a logical end-to-end business function. 35// App Hub supports application level IAM permission to align with governance 36// requirements. 37message Application { 38 option (google.api.resource) = { 39 type: "apphub.googleapis.com/Application" 40 pattern: "projects/{project}/locations/{location}/applications/{application}" 41 plural: "applications" 42 singular: "application" 43 }; 44 45 // Application state. 46 enum State { 47 // Unspecified state. 48 STATE_UNSPECIFIED = 0; 49 50 // The Application is being created. 51 CREATING = 1; 52 53 // The Application is ready to register Services and Workloads. 54 ACTIVE = 2; 55 56 // The Application is being deleted. 57 DELETING = 3; 58 } 59 60 // Identifier. The resource name of an Application. Format: 61 // "projects/{host-project-id}/locations/{location}/applications/{application-id}" 62 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 63 64 // Optional. User-defined name for the Application. 65 // Can have a maximum length of 63 characters. 66 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 67 68 // Optional. User-defined description of an Application. 69 // Can have a maximum length of 2048 characters. 70 string description = 3 [(google.api.field_behavior) = OPTIONAL]; 71 72 // Optional. Consumer provided attributes. 73 Attributes attributes = 4 [(google.api.field_behavior) = OPTIONAL]; 74 75 // Output only. Create time. 76 google.protobuf.Timestamp create_time = 5 77 [(google.api.field_behavior) = OUTPUT_ONLY]; 78 79 // Output only. Update time. 80 google.protobuf.Timestamp update_time = 6 81 [(google.api.field_behavior) = OUTPUT_ONLY]; 82 83 // Required. Immutable. Defines what data can be included into this 84 // Application. Limits which Services and Workloads can be registered. 85 Scope scope = 9 [ 86 (google.api.field_behavior) = REQUIRED, 87 (google.api.field_behavior) = IMMUTABLE 88 ]; 89 90 // Output only. A universally unique identifier (in UUID4 format) for the 91 // `Application`. 92 string uid = 10 [ 93 (google.api.field_info).format = UUID4, 94 (google.api.field_behavior) = OUTPUT_ONLY 95 ]; 96 97 // Output only. Application state. 98 State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 99} 100 101// Scope of an application. 102message Scope { 103 // Scope Type. 104 enum Type { 105 // Unspecified type. 106 TYPE_UNSPECIFIED = 0; 107 108 // Regional type. 109 REGIONAL = 1; 110 } 111 112 // Required. Scope Type. 113 Type type = 1 [(google.api.field_behavior) = REQUIRED]; 114} 115