summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/devtools/artifactregistry/v1beta2/settings.proto
blob: 2bd6e412605862625332f561bddc2f33758ccc28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.devtools.artifactregistry.v1beta2;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
option java_multiple_files = true;
option java_outer_classname = "SettingsProto";
option java_package = "com.google.devtools.artifactregistry.v1beta2";
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2";

// The Artifact Registry settings that apply to a Project.
message ProjectSettings {
  option (google.api.resource) = {
    type: "artifactregistry.googleapis.com/ProjectSettings"
    pattern: "projects/{project}/projectSettings"
  };

  // The possible redirection states for legacy repositories.
  enum RedirectionState {
    // No redirection status has been set.
    REDIRECTION_STATE_UNSPECIFIED = 0;

    // Redirection is disabled.
    REDIRECTION_FROM_GCR_IO_DISABLED = 1;

    // Redirection is enabled.
    REDIRECTION_FROM_GCR_IO_ENABLED = 2;

    // Redirection is enabled, and has been finalized so cannot be reverted.
    REDIRECTION_FROM_GCR_IO_FINALIZED = 3;
  }

  // The name of the project's settings.
  //
  // Always of the form:
  // projects/{project-id}/projectSettings
  //
  // In update request: never set
  // In response: always set
  string name = 1;

  // The redirection state of the legacy repositories in this project.
  RedirectionState legacy_redirection_state = 2;
}

// Gets the redirection status for a project.
message GetProjectSettingsRequest {
  // Required. The name of the projectSettings resource.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "artifactregistry.googleapis.com/ProjectSettings"
    }
  ];
}

// Sets the settings of the project.
message UpdateProjectSettingsRequest {
  // The project settings.
  ProjectSettings project_settings = 2;

  // Field mask to support partial updates.
  google.protobuf.FieldMask update_mask = 3;
}