Skip to content

Commit

Permalink
feat(cloud): Finalize project environment API
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Oct 17, 2024
1 parent 456cf19 commit 5e65a2f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 119 deletions.
4 changes: 4 additions & 0 deletions packages/celest_cloud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.4

- feat: Finalize project environment API

# 0.1.3

- chore: Update protos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1326,14 +1326,14 @@ class DeployProjectEnvironmentRequest extends $pb.GeneratedMessage {
class DeployProjectEnvironmentResponse extends $pb.GeneratedMessage {
factory DeployProjectEnvironmentResponse({
$core.String? uri,
ProjectEnvironmentDatabase? database,
$56.ResolvedProject? project,
}) {
final $result = create();
if (uri != null) {
$result.uri = uri;
}
if (database != null) {
$result.database = database;
if (project != null) {
$result.project = project;
}
return $result;
}
Expand All @@ -1351,8 +1351,8 @@ class DeployProjectEnvironmentResponse extends $pb.GeneratedMessage {
_omitMessageNames ? '' : 'celest.cloud.v1alpha1'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'uri')
..aOM<ProjectEnvironmentDatabase>(2, _omitFieldNames ? '' : 'database',
subBuilder: ProjectEnvironmentDatabase.create)
..aOM<$56.ResolvedProject>(2, _omitFieldNames ? '' : 'project',
subBuilder: $56.ResolvedProject.create)
..hasRequiredFields = false;

@$core.Deprecated('Using this can add significant overhead to your binary. '
Expand Down Expand Up @@ -1396,105 +1396,20 @@ class DeployProjectEnvironmentResponse extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
void clearUri() => clearField(1);

/// The database of the deployed environment.
/// The resolved project of the deployed environment, with any missing values filled in.
@$pb.TagNumber(2)
ProjectEnvironmentDatabase get database => $_getN(1);
$56.ResolvedProject get project => $_getN(1);
@$pb.TagNumber(2)
set database(ProjectEnvironmentDatabase v) {
set project($56.ResolvedProject v) {
setField(2, v);
}

@$pb.TagNumber(2)
$core.bool hasDatabase() => $_has(1);
@$pb.TagNumber(2)
void clearDatabase() => clearField(2);
@$pb.TagNumber(2)
ProjectEnvironmentDatabase ensureDatabase() => $_ensure(1);
}

/// A project environment database.
class ProjectEnvironmentDatabase extends $pb.GeneratedMessage {
factory ProjectEnvironmentDatabase({
$core.String? host,
$core.String? token,
}) {
final $result = create();
if (host != null) {
$result.host = host;
}
if (token != null) {
$result.token = token;
}
return $result;
}
ProjectEnvironmentDatabase._() : super();
factory ProjectEnvironmentDatabase.fromBuffer($core.List<$core.int> i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(i, r);
factory ProjectEnvironmentDatabase.fromJson($core.String i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'ProjectEnvironmentDatabase',
package: const $pb.PackageName(
_omitMessageNames ? '' : 'celest.cloud.v1alpha1'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'host')
..aOS(2, _omitFieldNames ? '' : 'token')
..hasRequiredFields = false;

@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ProjectEnvironmentDatabase clone() =>
ProjectEnvironmentDatabase()..mergeFromMessage(this);
@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ProjectEnvironmentDatabase copyWith(
void Function(ProjectEnvironmentDatabase) updates) =>
super.copyWith(
(message) => updates(message as ProjectEnvironmentDatabase))
as ProjectEnvironmentDatabase;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static ProjectEnvironmentDatabase create() => ProjectEnvironmentDatabase._();
ProjectEnvironmentDatabase createEmptyInstance() => create();
static $pb.PbList<ProjectEnvironmentDatabase> createRepeated() =>
$pb.PbList<ProjectEnvironmentDatabase>();
@$core.pragma('dart2js:noInline')
static ProjectEnvironmentDatabase getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<ProjectEnvironmentDatabase>(create);
static ProjectEnvironmentDatabase? _defaultInstance;

/// The hostname of the database.
@$pb.TagNumber(1)
$core.String get host => $_getSZ(0);
@$pb.TagNumber(1)
set host($core.String v) {
$_setString(0, v);
}

@$pb.TagNumber(1)
$core.bool hasHost() => $_has(0);
@$pb.TagNumber(1)
void clearHost() => clearField(1);

/// The token of the database.
@$pb.TagNumber(2)
$core.String get token => $_getSZ(1);
@$pb.TagNumber(2)
set token($core.String v) {
$_setString(1, v);
}

$core.bool hasProject() => $_has(1);
@$pb.TagNumber(2)
$core.bool hasToken() => $_has(1);
void clearProject() => clearField(2);
@$pb.TagNumber(2)
void clearToken() => clearField(2);
$56.ResolvedProject ensureProject() => $_ensure(1);
}

const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,36 +413,22 @@ final $typed_data.Uint8List deployProjectEnvironmentRequestDescriptor = $convert
const DeployProjectEnvironmentResponse$json = {
'1': 'DeployProjectEnvironmentResponse',
'2': [
{'1': 'uri', '3': 1, '4': 1, '5': 9, '10': 'uri'},
{'1': 'uri', '3': 1, '4': 1, '5': 9, '8': {}, '10': 'uri'},
{
'1': 'database',
'1': 'project',
'3': 2,
'4': 1,
'5': 11,
'6': '.celest.cloud.v1alpha1.ProjectEnvironmentDatabase',
'10': 'database'
'6': '.celest.ast.v1.ResolvedProject',
'8': {},
'10': 'project'
},
],
};

/// Descriptor for `DeployProjectEnvironmentResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List deployProjectEnvironmentResponseDescriptor =
$convert.base64Decode(
'CiBEZXBsb3lQcm9qZWN0RW52aXJvbm1lbnRSZXNwb25zZRIQCgN1cmkYASABKAlSA3VyaRJNCg'
'hkYXRhYmFzZRgCIAEoCzIxLmNlbGVzdC5jbG91ZC52MWFscGhhMS5Qcm9qZWN0RW52aXJvbm1l'
'bnREYXRhYmFzZVIIZGF0YWJhc2U=');

@$core.Deprecated('Use projectEnvironmentDatabaseDescriptor instead')
const ProjectEnvironmentDatabase$json = {
'1': 'ProjectEnvironmentDatabase',
'2': [
{'1': 'host', '3': 1, '4': 1, '5': 9, '10': 'host'},
{'1': 'token', '3': 2, '4': 1, '5': 9, '10': 'token'},
],
};

/// Descriptor for `ProjectEnvironmentDatabase`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List projectEnvironmentDatabaseDescriptor =
$convert.base64Decode(
'ChpQcm9qZWN0RW52aXJvbm1lbnREYXRhYmFzZRISCgRob3N0GAEgASgJUgRob3N0EhQKBXRva2'
'VuGAIgASgJUgV0b2tlbg==');
'CiBEZXBsb3lQcm9qZWN0RW52aXJvbm1lbnRSZXNwb25zZRIVCgN1cmkYASABKAlCA+BBAlIDdX'
'JpEj0KB3Byb2plY3QYAiABKAsyHi5jZWxlc3QuYXN0LnYxLlJlc29sdmVkUHJvamVjdEID4EEC'
'Ugdwcm9qZWN0');
2 changes: 1 addition & 1 deletion packages/celest_cloud/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: celest_cloud
description: API contracts and Dart clients for the Celest Cloud platform.
version: 0.1.3
version: 0.1.4
repository: https://github.com/celest-dev/celest

environment:
Expand Down

0 comments on commit 5e65a2f

Please sign in to comment.