Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ syntax = "proto3";
package google.cloud.saasplatform.saasservicemgmt.v1beta1;

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

option csharp_namespace = "Google.Cloud.SaasPlatform.SaasServiceMgmt.V1Beta1";
Expand Down Expand Up @@ -74,6 +75,7 @@ message Blueprint {
// UnitVariable describes a parameter for a Unit.
message UnitVariable {
// Enumeration of variable types.
// `STRUCT` and `LIST` values should be JSON-encoded strings.
enum Type {
// Variable type is unspecified.
TYPE_UNSPECIFIED = 0;
Expand All @@ -86,6 +88,12 @@ message UnitVariable {

// Variable type is bool.
BOOL = 3;

// Variable type is struct.
STRUCT = 4;

// Variable type is list.
LIST = 5;
}

// Required. Immutable. Name of the variable from actuation configs.
Expand Down Expand Up @@ -201,6 +209,13 @@ message UnitOperationCondition {

// Indicates if services and workloads have been registered with AppHub.
TYPE_APP_COMPONENTS_REGISTERED = 7;

// Indicates if the UnitOperation's core workload execution completed
// successfully.
// The workload is the core execution operation performed for a
// UnitOperation (e.g., provisioning, updating, or deprovisioning
// resources) excluding post-operation checks.
TYPE_WORKLOAD_SUCCEEDED = 8;
}

// Required. Status of the condition.
Expand All @@ -221,6 +236,53 @@ message UnitOperationCondition {
string reason = 5 [(google.api.field_behavior) = REQUIRED];
}

// SaasCondition describes the status of a Saas.
message SaasCondition {
// Enumeration of condition statuses.
enum Status {
// Condition status is unspecified.
STATUS_UNSPECIFIED = 0;

// Condition is unknown.
STATUS_UNKNOWN = 1;

// Condition is true.
STATUS_TRUE = 2;

// Condition is false.
STATUS_FALSE = 3;
}

// Enumeration of condition types.
enum Type {
// Condition type is unspecified.
TYPE_UNSPECIFIED = 0;

// Condition type is ready.
TYPE_READY = 1;

// Condition type is synchronized.
TYPE_SYNCHRONIZED = 2;
}

// Required. Status of the condition.
Status status = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Type of the condition.
Type type = 6 [(google.api.field_behavior) = REQUIRED];

// Required. Last time the condition transited from one status to another.
google.protobuf.Timestamp last_transition_time = 3
[(google.api.field_behavior) = REQUIRED];

// Required. Human readable message indicating details about the last
// transition.
string message = 4 [(google.api.field_behavior) = REQUIRED];

// Required. Brief reason for the condition's last transition.
string reason = 5 [(google.api.field_behavior) = REQUIRED];
}

// Represents the aggregation of a set of population of like records by a
// certain group. For example, a collection of unit counts can be aggregated and
// grouped by their state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/api/field_info.proto";
import "google/api/resource.proto";
import "google/cloud/saasplatform/saasservicemgmt/v1beta1/common.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.SaasPlatform.SaasServiceMgmt.V1Beta1";
option go_package = "cloud.google.com/go/saasplatform/saasservicemgmt/apiv1beta1/saasservicemgmtpb;saasservicemgmtpb";
Expand All @@ -29,6 +30,19 @@ option java_outer_classname = "SaasDeploymentsResourcesProto";
option java_package = "com.google.cloud.saasplatform.saasservicemgmt.v1beta1";
option php_namespace = "Google\\Cloud\\SaasPlatform\\SaasServiceMgmt\\V1beta1";
option ruby_package = "Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1";
option (google.api.resource_definition) = {
type: "apphub.googleapis.com/Application"
pattern: "projects/{project}/locations/{location}/applications/{application}"
};
option (google.api.resource_definition) = {
type: "designcenter.googleapis.com/ApplicationTemplate"
pattern: "projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{applicationTemplate}"
pattern: "projects/{project}/locations/{location}/workspaces/{workspace}/applicationTemplates/{applicationTemplate}"
};
option (google.api.resource_definition) = {
type: "designcenter.googleapis.com/ApplicationTemplateRevision"
pattern: "projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/revisions/{revision}"
};

// Location information that the service is available in.
message Location {
Expand All @@ -45,6 +59,34 @@ message Saas {
singular: "saas"
};

// State of the Saas.
enum State {
option allow_alias = true;

// State type is unspecified.
STATE_TYPE_UNSPECIFIED = 0;

// The Saas is ready
STATE_ACTIVE = 1;

// In the process of importing, synchronizing or replicating
// ApplicationTemplates
STATE_RUNNING = 2;

// Failure during process of importing, synchronizing or replicating
// ApplicationTemplate processing
STATE_FAILED = 3;

// Deprecated: Use STATE_ACTIVE.
ACTIVE = 1 [deprecated = true];

// Deprecated: Use STATE_RUNNING.
RUNNING = 2 [deprecated = true];

// Deprecated: Use STATE_FAILED.
FAILED = 3 [deprecated = true];
}

// Identifier. The resource name (full URI of the resource) following the
// standard naming scheme:
//
Expand All @@ -55,6 +97,31 @@ message Saas {
// refers to the list to generate a rollout plan.
repeated Location locations = 4 [(google.api.field_behavior) = OPTIONAL];

// Reference to composite ApplicationTemplate.
// When specified, the template components will be imported into their
// equivalent UnitKind, Release and Blueprint resources.
// Deleted references will not delete imported resources.
// Should only be specified on source regions, and be unspecified on replica
// regions.
CompositeRef application_template = 5;

// Output only. Name of repository in Artifact Registry for system-generated
// Blueprints, eg. Blueprints of imported ApplicationTemplates.
string blueprint_repo = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. State of the Saas.
// It is always in ACTIVE state if the application_template is empty.
State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. A set of conditions which indicate the various conditions this
// resource can have.
repeated SaasCondition conditions = 8
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. If the state is FAILED, the corresponding error code and
// message. Defaults to code=OK for all other states.
google.rpc.Status error = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. The labels on the resource, which can be used for categorization.
// similar to Kubernetes resource labels.
map<string, string> labels = 10401 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -239,6 +306,14 @@ message UnitKind {
}
];

// Output only. Reference to component and revision in a composite
// ApplicationTemplate.
ComponentRef application_template_component = 10
[(google.api.field_behavior) = OUTPUT_ONLY];

// AppParams contains the parameters for creating an AppHub Application.
AppParams app_params = 11;

// Optional. The labels on the resource, which can be used for categorization.
// similar to Kubernetes resource labels.
map<string, string> labels = 10401 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -488,6 +563,16 @@ message Unit {
(google.api.field_behavior) = OUTPUT_ONLY
];

// Optional. Reference to the AppHub Application this unit belongs to.
// All resources deployed in this Unit will be associated with the specified
// Application.
string application = 29 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "apphub.googleapis.com/Application"
}
];

// Optional. The labels on the resource, which can be used for categorization.
// similar to Kubernetes resource labels.
map<string, string> labels = 10401 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -525,6 +610,13 @@ message Unit {
// Changes to a resource made by the service should refresh this value.
google.protobuf.Timestamp update_time = 10304
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Indicates whether the resource location satisfies Zone
// Separation constraints. This is false by default.
bool satisfies_pzs = 10305 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Reserved for future use.
bool satisfies_pzi = 10306 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Set of dependencies for this unit. Maximum 10.
Expand All @@ -551,7 +643,7 @@ message UnitDependency {
// unit to focus only on the change they have requested.
//
// This is a base object that contains the common fields in all unit operations.
// Next: 19
// Next: 22
message UnitOperation {
option (google.api.resource) = {
type: "saasservicemgmt.googleapis.com/UnitOperation"
Expand Down Expand Up @@ -701,6 +793,11 @@ message UnitOperation {
// Changes to a resource made by the service should refresh this value.
google.protobuf.Timestamp update_time = 10304
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The timestamp when the resource was marked for deletion
// (deletion is an asynchronous operation).
google.protobuf.Timestamp delete_time = 10305
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Provision is the unit operation that provision the underlying resources
Expand Down Expand Up @@ -818,6 +915,11 @@ message Release {
repeated UnitVariable input_variable_defaults = 7
[(google.api.field_behavior) = OPTIONAL];

// Output only. Reference to component and revision in a composite
// ApplicationTemplate.
ComponentRef application_template_component = 9
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. The labels on the resource, which can be used for categorization.
// similar to Kubernetes resource labels.
map<string, string> labels = 10401 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -910,3 +1012,82 @@ message Dependency {
// Required. An alias for the dependency. Used for input variable mapping.
string alias = 2 [(google.api.field_behavior) = REQUIRED];
}

// CompositeRef represents a reference to a composite resource.
// Next ID: 4
message CompositeRef {
// Required. Reference to the ApplicationTemplate resource.
string application_template = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "designcenter.googleapis.com/ApplicationTemplate"
}
];

// Revision of the ApplicationTemplate to use.
// Changes to revision will trigger manual resynchronization.
// If empty, ApplicationTemplate will be ignored.
string revision = 2 [(google.api.resource_reference) = {
type: "designcenter.googleapis.com/ApplicationTemplateRevision"
}];

// Output only. Reference to on-going AppTemplate import and replication
// operation (i.e. the operation_id for the long-running operation). This
// field is opaque for external usage.
string sync_operation = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// ComponentRef represents a reference to a component resource.
// Next ID: 4
message ComponentRef {
// Reference to the Composite ApplicationTemplate.
CompositeRef composite_ref = 1;

// Name of the component in composite.Components
string component = 2;

// Revision of the component.
// If the component does not have a revision, this field will be explicitly
// set to the revision of the composite ApplicationTemplate.
string revision = 3;
}

// AppParams contains the parameters for creating an AppHub Application.
message AppParams {
// Scope of an application.
message Scope {
// Scope Type.
enum Type {
option allow_alias = true;

// Unspecified type.
TYPE_UNSPECIFIED = 0;

// Regional type.
TYPE_REGIONAL = 1;

// Global type.
TYPE_GLOBAL = 2;

// Deprecated: Use TYPE_REGIONAL.
REGIONAL = 1 [deprecated = true];

// Deprecated: Use TYPE_GLOBAL.
GLOBAL = 2 [deprecated = true];
}

// Required. Scope Type.
Type type = 1 [(google.api.field_behavior) = REQUIRED];
}

// Grouping used to construct the name of the AppHub Application.
// Multiple UnitKinds can specify the same group to use the same Application
// across their respective units.
// Corresponds to the app_boundary_id in the ADC composite
// ApplicationTemplate. Defaults to UnitKind.name
string group = 1;

// Corresponds to the scope in the ADC composite ApplicationTemplate.
// Defaults to TYPE_REGIONAL.
Scope scope = 2;
}
Loading
Loading