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.networkservices.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.NetworkServices.V1"; 24option go_package = "cloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb"; 25option java_multiple_files = true; 26option java_outer_classname = "ServiceBindingProto"; 27option java_package = "com.google.cloud.networkservices.v1"; 28option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; 29option ruby_package = "Google::Cloud::NetworkServices::V1"; 30 31// ServiceBinding is the resource that defines a Service Directory Service to 32// be used in a BackendService resource. 33message ServiceBinding { 34 option (google.api.resource) = { 35 type: "networkservices.googleapis.com/ServiceBinding" 36 pattern: "projects/{project}/locations/{location}/serviceBindings/{service_binding}" 37 }; 38 39 // Required. Name of the ServiceBinding resource. It matches pattern 40 // `projects/*/locations/global/serviceBindings/service_binding_name`. 41 string name = 1 [(google.api.field_behavior) = REQUIRED]; 42 43 // Optional. A free-text description of the resource. Max length 1024 44 // characters. 45 string description = 2 [(google.api.field_behavior) = OPTIONAL]; 46 47 // Output only. The timestamp when the resource was created. 48 google.protobuf.Timestamp create_time = 3 49 [(google.api.field_behavior) = OUTPUT_ONLY]; 50 51 // Output only. The timestamp when the resource was updated. 52 google.protobuf.Timestamp update_time = 4 53 [(google.api.field_behavior) = OUTPUT_ONLY]; 54 55 // Required. The full service directory service name of the format 56 // /projects/*/locations/*/namespaces/*/services/* 57 string service = 5 [(google.api.field_behavior) = REQUIRED]; 58 59 // Optional. Set of label tags associated with the ServiceBinding resource. 60 map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL]; 61} 62 63// Request used with the ListServiceBindings method. 64message ListServiceBindingsRequest { 65 // Required. The project and location from which the ServiceBindings should be 66 // listed, specified in the format `projects/*/locations/global`. 67 string parent = 1 [ 68 (google.api.field_behavior) = REQUIRED, 69 (google.api.resource_reference) = { 70 child_type: "networkservices.googleapis.com/ServiceBinding" 71 } 72 ]; 73 74 // Maximum number of ServiceBindings to return per call. 75 int32 page_size = 2; 76 77 // The value returned by the last `ListServiceBindingsResponse` 78 // Indicates that this is a continuation of a prior `ListRouters` call, 79 // and that the system should return the next page of data. 80 string page_token = 3; 81} 82 83// Response returned by the ListServiceBindings method. 84message ListServiceBindingsResponse { 85 // List of ServiceBinding resources. 86 repeated ServiceBinding service_bindings = 1; 87 88 // If there might be more results than those appearing in this response, then 89 // `next_page_token` is included. To get the next set of results, call this 90 // method again using the value of `next_page_token` as `page_token`. 91 string next_page_token = 2; 92} 93 94// Request used by the GetServiceBinding method. 95message GetServiceBindingRequest { 96 // Required. A name of the ServiceBinding to get. Must be in the format 97 // `projects/*/locations/global/serviceBindings/*`. 98 string name = 1 [ 99 (google.api.field_behavior) = REQUIRED, 100 (google.api.resource_reference) = { 101 type: "networkservices.googleapis.com/ServiceBinding" 102 } 103 ]; 104} 105 106// Request used by the ServiceBinding method. 107message CreateServiceBindingRequest { 108 // Required. The parent resource of the ServiceBinding. Must be in the 109 // format `projects/*/locations/global`. 110 string parent = 1 [ 111 (google.api.field_behavior) = REQUIRED, 112 (google.api.resource_reference) = { 113 child_type: "networkservices.googleapis.com/ServiceBinding" 114 } 115 ]; 116 117 // Required. Short name of the ServiceBinding resource to be created. 118 string service_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; 119 120 // Required. ServiceBinding resource to be created. 121 ServiceBinding service_binding = 3 [(google.api.field_behavior) = REQUIRED]; 122} 123 124// Request used by the DeleteServiceBinding method. 125message DeleteServiceBindingRequest { 126 // Required. A name of the ServiceBinding to delete. Must be in the format 127 // `projects/*/locations/global/serviceBindings/*`. 128 string name = 1 [ 129 (google.api.field_behavior) = REQUIRED, 130 (google.api.resource_reference) = { 131 type: "networkservices.googleapis.com/ServiceBinding" 132 } 133 ]; 134} 135