1// Copyright 2020 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.devtools.artifactregistry.v1beta2; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/field_mask.proto"; 22 23option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; 24option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; 25option java_multiple_files = true; 26option java_outer_classname = "SettingsProto"; 27option java_package = "com.google.devtools.artifactregistry.v1beta2"; 28option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; 29option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; 30 31// The Artifact Registry settings that apply to a Project. 32message ProjectSettings { 33 option (google.api.resource) = { 34 type: "artifactregistry.googleapis.com/ProjectSettings" 35 pattern: "projects/{project}/projectSettings" 36 }; 37 38 // The possible redirection states for legacy repositories. 39 enum RedirectionState { 40 // No redirection status has been set. 41 REDIRECTION_STATE_UNSPECIFIED = 0; 42 43 // Redirection is disabled. 44 REDIRECTION_FROM_GCR_IO_DISABLED = 1; 45 46 // Redirection is enabled. 47 REDIRECTION_FROM_GCR_IO_ENABLED = 2; 48 49 // Redirection is enabled, and has been finalized so cannot be reverted. 50 REDIRECTION_FROM_GCR_IO_FINALIZED = 3; 51 } 52 53 // The name of the project's settings. 54 // 55 // Always of the form: 56 // projects/{project-id}/projectSettings 57 // 58 // In update request: never set 59 // In response: always set 60 string name = 1; 61 62 // The redirection state of the legacy repositories in this project. 63 RedirectionState legacy_redirection_state = 2; 64} 65 66// Gets the redirection status for a project. 67message GetProjectSettingsRequest { 68 // Required. The name of the projectSettings resource. 69 string name = 1 [ 70 (google.api.field_behavior) = REQUIRED, 71 (google.api.resource_reference) = { 72 type: "artifactregistry.googleapis.com/ProjectSettings" 73 } 74 ]; 75} 76 77// Sets the settings of the project. 78message UpdateProjectSettingsRequest { 79 // The project settings. 80 ProjectSettings project_settings = 2; 81 82 // Field mask to support partial updates. 83 google.protobuf.FieldMask update_mask = 3; 84} 85