// Copyright 2025 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.cloud.saasplatform.saasservicemgmt.v1beta1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/saasplatform/saasservicemgmt/v1beta1/deployments_resources.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.SaasPlatform.SaasServiceMgmt.V1Beta1";
option go_package = "cloud.google.com/go/saasplatform/saasservicemgmt/apiv1beta1/saasservicemgmtpb;saasservicemgmtpb";
option java_multiple_files = true;
option java_outer_classname = "SaasDeploymentsServiceProto";
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";

// Manages the deployment of SaaS services.
service SaasDeployments {
  option (google.api.default_host) = "saasservicemgmt.googleapis.com";
  option (google.api.oauth_scopes) =
      "https://www.googleapis.com/auth/cloud-platform";

  // Retrieve a collection of saas.
  rpc ListSaas(ListSaasRequest) returns (ListSaasResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*/locations/*}/saas"
    };
    option (google.api.method_signature) = "parent";
  }

  // Retrieve a single saas.
  rpc GetSaas(GetSaasRequest) returns (Saas) {
    option (google.api.http) = {
      get: "/v1beta1/{name=projects/*/locations/*/saas/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Create a new saas.
  rpc CreateSaas(CreateSaasRequest) returns (Saas) {
    option (google.api.http) = {
      post: "/v1beta1/{parent=projects/*/locations/*}/saas"
      body: "saas"
    };
    option (google.api.method_signature) = "parent,saas,saas_id";
  }

  // Update a single saas.
  rpc UpdateSaas(UpdateSaasRequest) returns (Saas) {
    option (google.api.http) = {
      patch: "/v1beta1/{saas.name=projects/*/locations/*/saas/*}"
      body: "saas"
    };
    option (google.api.method_signature) = "saas,update_mask";
  }

  // Delete a single saas.
  rpc DeleteSaas(DeleteSaasRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta1/{name=projects/*/locations/*/saas/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Retrieve a collection of tenants.
  rpc ListTenants(ListTenantsRequest) returns (ListTenantsResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*/locations/*}/tenants"
    };
    option (google.api.method_signature) = "parent";
  }

  // Retrieve a single tenant.
  rpc GetTenant(GetTenantRequest) returns (Tenant) {
    option (google.api.http) = {
      get: "/v1beta1/{name=projects/*/locations/*/tenants/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Create a new tenant.
  rpc CreateTenant(CreateTenantRequest) returns (Tenant) {
    option (google.api.http) = {
      post: "/v1beta1/{parent=projects/*/locations/*}/tenants"
      body: "tenant"
    };
    option (google.api.method_signature) = "parent,tenant,tenant_id";
  }

  // Update a single tenant.
  rpc UpdateTenant(UpdateTenantRequest) returns (Tenant) {
    option (google.api.http) = {
      patch: "/v1beta1/{tenant.name=projects/*/locations/*/tenants/*}"
      body: "tenant"
    };
    option (google.api.method_signature) = "tenant,update_mask";
  }

  // Delete a single tenant.
  rpc DeleteTenant(DeleteTenantRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta1/{name=projects/*/locations/*/tenants/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Retrieve a collection of unit kinds.
  rpc ListUnitKinds(ListUnitKindsRequest) returns (ListUnitKindsResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*/locations/*}/unitKinds"
    };
    option (google.api.method_signature) = "parent";
  }

  // Retrieve a single unit kind.
  rpc GetUnitKind(GetUnitKindRequest) returns (UnitKind) {
    option (google.api.http) = {
      get: "/v1beta1/{name=projects/*/locations/*/unitKinds/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Create a new unit kind.
  rpc CreateUnitKind(CreateUnitKindRequest) returns (UnitKind) {
    option (google.api.http) = {
      post: "/v1beta1/{parent=projects/*/locations/*}/unitKinds"
      body: "unit_kind"
    };
    option (google.api.method_signature) = "parent,unit_kind,unit_kind_id";
  }

  // Update a single unit kind.
  rpc UpdateUnitKind(UpdateUnitKindRequest) returns (UnitKind) {
    option (google.api.http) = {
      patch: "/v1beta1/{unit_kind.name=projects/*/locations/*/unitKinds/*}"
      body: "unit_kind"
    };
    option (google.api.method_signature) = "unit_kind,update_mask";
  }

  // Delete a single unit kind.
  rpc DeleteUnitKind(DeleteUnitKindRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta1/{name=projects/*/locations/*/unitKinds/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Retrieve a collection of units.
  rpc ListUnits(ListUnitsRequest) returns (ListUnitsResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*/locations/*}/units"
    };
    option (google.api.method_signature) = "parent";
  }

  // Retrieve a single unit.
  rpc GetUnit(GetUnitRequest) returns (Unit) {
    option (google.api.http) = {
      get: "/v1beta1/{name=projects/*/locations/*/units/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Create a new unit.
  rpc CreateUnit(CreateUnitRequest) returns (Unit) {
    option (google.api.http) = {
      post: "/v1beta1/{parent=projects/*/locations/*}/units"
      body: "unit"
    };
    option (google.api.method_signature) = "parent,unit,unit_id";
  }

  // Update a single unit.
  rpc UpdateUnit(UpdateUnitRequest) returns (Unit) {
    option (google.api.http) = {
      patch: "/v1beta1/{unit.name=projects/*/locations/*/units/*}"
      body: "unit"
    };
    option (google.api.method_signature) = "unit,update_mask";
  }

  // Delete a single unit.
  rpc DeleteUnit(DeleteUnitRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta1/{name=projects/*/locations/*/units/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Retrieve a collection of unit operations.
  rpc ListUnitOperations(ListUnitOperationsRequest)
      returns (ListUnitOperationsResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*/locations/*}/unitOperations"
    };
    option (google.api.method_signature) = "parent";
  }

  // Retrieve a single unit operation.
  rpc GetUnitOperation(GetUnitOperationRequest) returns (UnitOperation) {
    option (google.api.http) = {
      get: "/v1beta1/{name=projects/*/locations/*/unitOperations/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Create a new unit operation.
  rpc CreateUnitOperation(CreateUnitOperationRequest) returns (UnitOperation) {
    option (google.api.http) = {
      post: "/v1beta1/{parent=projects/*/locations/*}/unitOperations"
      body: "unit_operation"
    };
    option (google.api.method_signature) =
        "parent,unit_operation,unit_operation_id";
  }

  // Update a single unit operation.
  rpc UpdateUnitOperation(UpdateUnitOperationRequest) returns (UnitOperation) {
    option (google.api.http) = {
      patch: "/v1beta1/{unit_operation.name=projects/*/locations/*/unitOperations/*}"
      body: "unit_operation"
    };
    option (google.api.method_signature) = "unit_operation,update_mask";
  }

  // Delete a single unit operation.
  rpc DeleteUnitOperation(DeleteUnitOperationRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta1/{name=projects/*/locations/*/unitOperations/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Retrieve a collection of releases.
  rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*/locations/*}/releases"
    };
    option (google.api.method_signature) = "parent";
  }

  // Retrieve a single release.
  rpc GetRelease(GetReleaseRequest) returns (Release) {
    option (google.api.http) = {
      get: "/v1beta1/{name=projects/*/locations/*/releases/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Create a new release.
  rpc CreateRelease(CreateReleaseRequest) returns (Release) {
    option (google.api.http) = {
      post: "/v1beta1/{parent=projects/*/locations/*}/releases"
      body: "release"
    };
    option (google.api.method_signature) = "parent,release,release_id";
  }

  // Update a single release.
  rpc UpdateRelease(UpdateReleaseRequest) returns (Release) {
    option (google.api.http) = {
      patch: "/v1beta1/{release.name=projects/*/locations/*/releases/*}"
      body: "release"
    };
    option (google.api.method_signature) = "release,update_mask";
  }

  // Delete a single release.
  rpc DeleteRelease(DeleteReleaseRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta1/{name=projects/*/locations/*/releases/*}"
    };
    option (google.api.method_signature) = "name";
  }
}

// The request structure for the ListSaas method.
message ListSaasRequest {
  // Required. The parent of the saas.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Saas"
    }
  ];

  // The maximum number of saas to send per page.
  int32 page_size = 10505;

  // The page token: If the next_page_token from a previous response
  // is provided, this request will send the subsequent page.
  string page_token = 10506;

  // Filter the list as specified in https://google.aip.dev/160.
  string filter = 10507;

  // Order results as specified in https://google.aip.dev/132.
  string order_by = 10508;
}

// The response structure for the ListSaas method.
message ListSaasResponse {
  // The resulting saas.
  repeated Saas saas = 10509;

  // If present, the next page token can be provided to a subsequent
  // ListSaas call to list the next page.
  // If empty, there are no more pages.
  string next_page_token = 10510;

  // Locations that could not be reached.
  repeated string unreachable = 10511;
}

// The request structure for the GetSaas method.
message GetSaasRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Saas"
    }
  ];
}

// The request structure for the CreateSaas method.
message CreateSaasRequest {
  // Required. The parent of the saas.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Saas"
    }
  ];

  // Required. The ID value for the new saas.
  string saas_id = 10503 [(google.api.field_behavior) = REQUIRED];

  // Required. The desired state for the saas.
  Saas saas = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the UpdateSaas method.
message UpdateSaasRequest {
  // Required. The desired state for the saas.
  Saas saas = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;

  // Field mask is used to specify the fields to be overwritten in the
  // Saas resource by the update.
  //
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  //
  // If the user does not provide a mask then all fields in the
  // Saas will be overwritten.
  google.protobuf.FieldMask update_mask = 10512;
}

// The request structure for the DeleteSaas method.
message DeleteSaasRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Saas"
    }
  ];

  // The etag known to the client for the expected state of the saas. This is
  // used with state-changing methods to prevent accidental overwrites when
  // multiple user agents might be acting in parallel on the same resource.
  //
  // An etag wildcard provide optimistic concurrency based on the expected
  // existence of the saas. The Any wildcard (`*`) requires that the resource
  // must already exists, and the Not Any wildcard (`!*`) requires that it must
  // not.
  string etag = 10202;

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the ListTenants method.
message ListTenantsRequest {
  // Required. The parent of the tenant.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Tenant"
    }
  ];

  // The maximum number of tenants to send per page.
  int32 page_size = 10505;

  // The page token: If the next_page_token from a previous response
  // is provided, this request will send the subsequent page.
  string page_token = 10506;

  // Filter the list as specified in https://google.aip.dev/160.
  string filter = 10507;

  // Order results as specified in https://google.aip.dev/132.
  string order_by = 10508;
}

// The response structure for the ListTenants method.
message ListTenantsResponse {
  // The resulting tenants.
  repeated Tenant tenants = 10509;

  // If present, the next page token can be provided to a subsequent
  // ListTenants call to list the next page.
  // If empty, there are no more pages.
  string next_page_token = 10510;

  // Locations that could not be reached.
  repeated string unreachable = 10511;
}

// The request structure for the GetTenant method.
message GetTenantRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Tenant"
    }
  ];
}

// The request structure for the CreateTenant method.
message CreateTenantRequest {
  // Required. The parent of the tenant.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Tenant"
    }
  ];

  // Required. The ID value for the new tenant.
  string tenant_id = 10503 [(google.api.field_behavior) = REQUIRED];

  // Required. The desired state for the tenant.
  Tenant tenant = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the UpdateTenant method.
message UpdateTenantRequest {
  // Required. The desired state for the tenant.
  Tenant tenant = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;

  // Field mask is used to specify the fields to be overwritten in the
  // Tenant resource by the update.
  //
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  //
  // If the user does not provide a mask then all fields in the
  // Tenant will be overwritten.
  google.protobuf.FieldMask update_mask = 10512;
}

// The request structure for the DeleteTenant method.
message DeleteTenantRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Tenant"
    }
  ];

  // The etag known to the client for the expected state of the tenant. This is
  // used with state-changing methods to prevent accidental overwrites when
  // multiple user agents might be acting in parallel on the same resource.
  //
  // An etag wildcard provide optimistic concurrency based on the expected
  // existence of the tenant. The Any wildcard (`*`) requires that the resource
  // must already exists, and the Not Any wildcard (`!*`) requires that it must
  // not.
  string etag = 10202;

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the ListUnitKinds method.
message ListUnitKindsRequest {
  // Required. The parent of the unit kind.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/UnitKind"
    }
  ];

  // The maximum number of unit kinds to send per page.
  int32 page_size = 10505;

  // The page token: If the next_page_token from a previous response
  // is provided, this request will send the subsequent page.
  string page_token = 10506;

  // Filter the list as specified in https://google.aip.dev/160.
  string filter = 10507;

  // Order results as specified in https://google.aip.dev/132.
  string order_by = 10508;
}

// The response structure for the ListUnitKinds method.
message ListUnitKindsResponse {
  // The resulting unit kinds.
  repeated UnitKind unit_kinds = 10509;

  // If present, the next page token can be provided to a subsequent
  // ListUnitKinds call to list the next page.
  // If empty, there are no more pages.
  string next_page_token = 10510;

  // Locations that could not be reached.
  repeated string unreachable = 10511;
}

// The request structure for the GetUnitKind method.
message GetUnitKindRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/UnitKind"
    }
  ];
}

// The request structure for the CreateUnitKind method.
message CreateUnitKindRequest {
  // Required. The parent of the unit kind.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/UnitKind"
    }
  ];

  // Required. The ID value for the new unit kind.
  string unit_kind_id = 10503 [(google.api.field_behavior) = REQUIRED];

  // Required. The desired state for the unit kind.
  UnitKind unit_kind = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the UpdateUnitKind method.
message UpdateUnitKindRequest {
  // Required. The desired state for the unit kind.
  UnitKind unit_kind = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;

  // Field mask is used to specify the fields to be overwritten in the
  // UnitKind resource by the update.
  //
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  //
  // If the user does not provide a mask then all fields in the
  // UnitKind will be overwritten.
  google.protobuf.FieldMask update_mask = 10512;
}

// The request structure for the DeleteUnitKind method.
message DeleteUnitKindRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/UnitKind"
    }
  ];

  // The etag known to the client for the expected state of the unit kind. This
  // is used with state-changing methods to prevent accidental overwrites when
  // multiple user agents might be acting in parallel on the same resource.
  //
  // An etag wildcard provide optimistic concurrency based on the expected
  // existence of the unit kind. The Any wildcard (`*`) requires that the
  // resource must already exists, and the Not Any wildcard (`!*`) requires that
  // it must not.
  string etag = 10202;

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the ListUnits method.
message ListUnitsRequest {
  // Required. The parent of the unit.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Unit"
    }
  ];

  // The maximum number of units to send per page.
  int32 page_size = 10505;

  // The page token: If the next_page_token from a previous response
  // is provided, this request will send the subsequent page.
  string page_token = 10506;

  // Filter the list as specified in https://google.aip.dev/160.
  string filter = 10507;

  // Order results as specified in https://google.aip.dev/132.
  string order_by = 10508;
}

// The response structure for the ListUnits method.
message ListUnitsResponse {
  // The resulting units.
  repeated Unit units = 10509;

  // If present, the next page token can be provided to a subsequent
  // ListUnits call to list the next page.
  // If empty, there are no more pages.
  string next_page_token = 10510;

  // Locations that could not be reached.
  repeated string unreachable = 10511;
}

// The request structure for the GetUnit method.
message GetUnitRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Unit"
    }
  ];
}

// The request structure for the CreateUnit method.
message CreateUnitRequest {
  // Required. The parent of the unit.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Unit"
    }
  ];

  // Required. The ID value for the new unit.
  string unit_id = 10503 [(google.api.field_behavior) = REQUIRED];

  // Required. The desired state for the unit.
  Unit unit = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the UpdateUnit method.
message UpdateUnitRequest {
  // Required. The desired state for the unit.
  Unit unit = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;

  // Field mask is used to specify the fields to be overwritten in the
  // Unit resource by the update.
  //
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  //
  // If the user does not provide a mask then all fields in the
  // Unit will be overwritten.
  google.protobuf.FieldMask update_mask = 10512;
}

// The request structure for the DeleteUnit method.
message DeleteUnitRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Unit"
    }
  ];

  // The etag known to the client for the expected state of the unit. This is
  // used with state-changing methods to prevent accidental overwrites when
  // multiple user agents might be acting in parallel on the same resource.
  //
  // An etag wildcard provide optimistic concurrency based on the expected
  // existence of the unit. The Any wildcard (`*`) requires that the resource
  // must already exists, and the Not Any wildcard (`!*`) requires that it must
  // not.
  string etag = 10202;

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the ListUnitOperations method.
message ListUnitOperationsRequest {
  // Required. The parent of the unit operation.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/UnitOperation"
    }
  ];

  // The maximum number of unit operations to send per page.
  int32 page_size = 10505;

  // The page token: If the next_page_token from a previous response
  // is provided, this request will send the subsequent page.
  string page_token = 10506;

  // Filter the list as specified in https://google.aip.dev/160.
  string filter = 10507;

  // Order results as specified in https://google.aip.dev/132.
  string order_by = 10508;
}

// The response structure for the ListUnitOperations method.
message ListUnitOperationsResponse {
  // The resulting unit operations.
  repeated UnitOperation unit_operations = 10509;

  // If present, the next page token can be provided to a subsequent
  // ListUnitOperations call to list the next page.
  // If empty, there are no more pages.
  string next_page_token = 10510;

  // Locations that could not be reached.
  repeated string unreachable = 10511;
}

// The request structure for the GetUnitOperation method.
message GetUnitOperationRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/UnitOperation"
    }
  ];
}

// The request structure for the CreateUnitOperation method.
message CreateUnitOperationRequest {
  // Required. The parent of the unit operation.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/UnitOperation"
    }
  ];

  // Required. The ID value for the new unit operation.
  string unit_operation_id = 10503 [(google.api.field_behavior) = REQUIRED];

  // Required. The desired state for the unit operation.
  UnitOperation unit_operation = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the UpdateUnitOperation method.
message UpdateUnitOperationRequest {
  // Required. The desired state for the unit operation.
  UnitOperation unit_operation = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;

  // Field mask is used to specify the fields to be overwritten in the
  // UnitOperation resource by the update.
  //
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  //
  // If the user does not provide a mask then all fields in the
  // UnitOperation will be overwritten.
  google.protobuf.FieldMask update_mask = 10512;
}

// The request structure for the DeleteUnitOperation method.
message DeleteUnitOperationRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/UnitOperation"
    }
  ];

  // The etag known to the client for the expected state of the unit operation.
  // This is used with state-changing methods to prevent accidental overwrites
  // when multiple user agents might be acting in parallel on the same resource.
  //
  // An etag wildcard provide optimistic concurrency based on the expected
  // existence of the unit operation. The Any wildcard (`*`) requires that the
  // resource must already exists, and the Not Any wildcard (`!*`) requires that
  // it must not.
  string etag = 10202;

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the ListReleases method.
message ListReleasesRequest {
  // Required. The parent of the release.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Release"
    }
  ];

  // The maximum number of releases to send per page.
  int32 page_size = 10505;

  // The page token: If the next_page_token from a previous response
  // is provided, this request will send the subsequent page.
  string page_token = 10506;

  // Filter the list as specified in https://google.aip.dev/160.
  string filter = 10507;

  // Order results as specified in https://google.aip.dev/132.
  string order_by = 10508;
}

// The response structure for the ListReleases method.
message ListReleasesResponse {
  // The resulting releases.
  repeated Release releases = 10509;

  // If present, the next page token can be provided to a subsequent
  // ListReleases call to list the next page.
  // If empty, there are no more pages.
  string next_page_token = 10510;

  // Locations that could not be reached.
  repeated string unreachable = 10511;
}

// The request structure for the GetRelease method.
message GetReleaseRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Release"
    }
  ];
}

// The request structure for the CreateRelease method.
message CreateReleaseRequest {
  // Required. The parent of the release.
  string parent = 10006 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "saasservicemgmt.googleapis.com/Release"
    }
  ];

  // Required. The ID value for the new release.
  string release_id = 10503 [(google.api.field_behavior) = REQUIRED];

  // Required. The desired state for the release.
  Release release = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}

// The request structure for the UpdateRelease method.
message UpdateReleaseRequest {
  // Required. The desired state for the release.
  Release release = 10504 [(google.api.field_behavior) = REQUIRED];

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;

  // Field mask is used to specify the fields to be overwritten in the
  // Release resource by the update.
  //
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  //
  // If the user does not provide a mask then all fields in the
  // Release will be overwritten.
  google.protobuf.FieldMask update_mask = 10512;
}

// The request structure for the DeleteRelease method.
message DeleteReleaseRequest {
  // Required. The resource name of the resource within a service.
  string name = 10001 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "saasservicemgmt.googleapis.com/Release"
    }
  ];

  // The etag known to the client for the expected state of the release. This is
  // used with state-changing methods to prevent accidental overwrites when
  // multiple user agents might be acting in parallel on the same resource.
  //
  // An etag wildcard provide optimistic concurrency based on the expected
  // existence of the release. The Any wildcard (`*`) requires that the resource
  // must already exists, and the Not Any wildcard (`!*`) requires that it must
  // not.
  string etag = 10202;

  // If "validate_only" is set to true, the service will try to validate
  // that this request would succeed, but will not actually make changes.
  bool validate_only = 10501;

  // An optional request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request
  // ID, the server can check if original operation with the same request ID
  // was received, and if so, will ignore the second request. This prevents
  // clients from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 10502;
}
