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.support.v2; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/support/v2/attachment.proto"; 24 25option csharp_namespace = "Google.Cloud.Support.V2"; 26option go_package = "cloud.google.com/go/support/apiv2/supportpb;supportpb"; 27option java_multiple_files = true; 28option java_outer_classname = "AttachmentServiceProto"; 29option java_package = "com.google.cloud.support.v2"; 30option php_namespace = "Google\\Cloud\\Support\\V2"; 31option ruby_package = "Google::Cloud::Support::V2"; 32 33// A service to manage file attachment for Google Cloud support cases. 34service CaseAttachmentService { 35 option (google.api.default_host) = "cloudsupport.googleapis.com"; 36 option (google.api.oauth_scopes) = 37 "https://www.googleapis.com/auth/cloud-platform"; 38 39 // Retrieve all attachments associated with a support case. 40 rpc ListAttachments(ListAttachmentsRequest) 41 returns (ListAttachmentsResponse) { 42 option (google.api.http) = { 43 get: "/v2/{parent=projects/*/cases/*}/attachments" 44 additional_bindings { 45 get: "/v2/{parent=organizations/*/cases/*}/attachments" 46 } 47 }; 48 option (google.api.method_signature) = "parent"; 49 } 50} 51 52// The request message for the ListAttachments endpoint. 53message ListAttachmentsRequest { 54 // Required. The resource name of Case object for which attachments should be 55 // listed. 56 string parent = 1 [ 57 (google.api.field_behavior) = REQUIRED, 58 (google.api.resource_reference) = { 59 type: "cloudsupport.googleapis.com/Case" 60 } 61 ]; 62 63 // The maximum number of attachments fetched with each request. If not 64 // provided, the default is 10. The maximum page size that will be returned is 65 // 100. 66 int32 page_size = 2; 67 68 // A token identifying the page of results to return. If unspecified, the 69 // first page is retrieved. 70 string page_token = 3; 71} 72 73// The response message for the ListAttachments endpoint. 74message ListAttachmentsResponse { 75 // The list of attachments associated with the given case. 76 repeated Attachment attachments = 1; 77 78 // A token to retrieve the next page of results. This should be set in the 79 // `page_token` field of subsequent `cases.attachments.list` requests. If 80 // unspecified, there are no more results to retrieve. 81 string next_page_token = 2; 82} 83