20
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
// SOFTWARE.
22
22
23
+ import { ResetValue } from "../common/options" ;
23
24
import { Expression } from "../params" ;
24
25
import { WireParamSpec } from "../params/types" ;
25
26
@@ -30,19 +31,19 @@ export interface ManifestEndpoint {
30
31
entryPoint ?: string ;
31
32
region ?: string [ ] ;
32
33
platform ?: string ;
33
- availableMemoryMb ?: number | Expression < number > ;
34
- maxInstances ?: number | Expression < number > ;
35
- minInstances ?: number | Expression < number > ;
36
- concurrency ?: number | Expression < number > ;
37
- serviceAccountEmail ?: string ;
38
- timeoutSeconds ?: number | Expression < number > ;
39
- cpu ?: number | "gcf_gen1" ;
34
+ availableMemoryMb ?: number | Expression < number > | ResetValue ;
35
+ maxInstances ?: number | Expression < number > | ResetValue ;
36
+ minInstances ?: number | Expression < number > | ResetValue ;
37
+ concurrency ?: number | Expression < number > | ResetValue ;
38
+ timeoutSeconds ?: number | Expression < number > | ResetValue ;
40
39
vpc ?: {
41
- connector : string | Expression < string > ;
40
+ connector : string | Expression < string > | ResetValue ;
42
41
egressSettings ?: string ;
43
42
} ;
43
+ ingressSettings ?: string | ResetValue ;
44
+ serviceAccountEmail ?: string ;
45
+ cpu ?: number | "gcf_gen1" ;
44
46
labels ?: Record < string , string > ;
45
- ingressSettings ?: string ;
46
47
environmentVariables ?: Record < string , string > ;
47
48
secretEnvironmentVariables ?: Array < { key : string ; secret ?: string } > ;
48
49
@@ -57,20 +58,20 @@ export interface ManifestEndpoint {
57
58
eventFilterPathPatterns ?: Record < string , string | Expression < string > > ;
58
59
channel ?: string ;
59
60
eventType : string ;
60
- retry : boolean | Expression < boolean > ;
61
+ retry : boolean | Expression < boolean > | ResetValue ;
61
62
region ?: string ;
62
- serviceAccountEmail ?: string ;
63
+ serviceAccountEmail ?: string | ResetValue ;
63
64
} ;
64
65
65
66
scheduleTrigger ?: {
66
67
schedule ?: string | Expression < string > ;
67
- timeZone ?: string | Expression < string > ;
68
+ timeZone ?: string | Expression < string > | ResetValue ;
68
69
retryConfig ?: {
69
- retryCount ?: number | Expression < number > ;
70
- maxRetrySeconds ?: string | Expression < string > ;
71
- minBackoffSeconds ?: string | Expression < string > ;
72
- maxBackoffSeconds ?: string | Expression < string > ;
73
- maxDoublings ?: number | Expression < number > ;
70
+ retryCount ?: number | Expression < number > | ResetValue ;
71
+ maxRetrySeconds ?: string | Expression < string > | ResetValue ;
72
+ minBackoffSeconds ?: string | Expression < string > | ResetValue ;
73
+ maxBackoffSeconds ?: string | Expression < string > | ResetValue ;
74
+ maxDoublings ?: number | Expression < number > | ResetValue ;
74
75
} ;
75
76
} ;
76
77
@@ -107,6 +108,8 @@ export function stackToWire(stack: ManifestStack): Record<string, unknown> {
107
108
for ( const [ key , val ] of Object . entries ( obj ) ) {
108
109
if ( val instanceof Expression ) {
109
110
obj [ key ] = val . toCEL ( ) ;
111
+ } else if ( val instanceof ResetValue ) {
112
+ obj [ key ] = val . toJSON ( ) ;
110
113
} else if ( typeof val === "object" && val !== null ) {
111
114
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
112
115
traverse ( val as any ) ;
0 commit comments