Skip to content

Commit

Permalink
Add optional field
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandInguva committed Feb 22, 2023
1 parent 9b2f0de commit 35631f5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ message PTransform {
// is a ParDoPayload, and so on. For some special composite transforms,
// the payload is also officially defined. See StandardPTransforms for
// details.
FunctionSpec spec = 1;
optional FunctionSpec spec = 1;

// (Optional) A list of the ids of transforms that it contains.
//
Expand Down Expand Up @@ -529,12 +529,12 @@ message ParDoPayload {
// (Optional) Only set when this ParDo contains a splittable DoFn.
// If this is set, the corresponding standard requirement should also
// be placed in the pipeline requirements.
string restriction_coder_id = 7;
optional string restriction_coder_id = 7;

// (Optional) Only set when this ParDo can request bundle finalization.
// If this is set, the corresponding standard requirement should also
// be placed in the pipeline requirements.
bool requests_finalization = 8;
optional bool requests_finalization = 8;

// Whether this stage requires time sorted input.
// If this is set, the corresponding standard requirement should also
Expand Down Expand Up @@ -662,7 +662,7 @@ message TestStreamPayload {

// (Optional) If specified, points to a TestStreamService to be
// used to retrieve events.
ApiServiceDescriptor endpoint = 3;
optional ApiServiceDescriptor endpoint = 3;

message Event {
oneof event {
Expand All @@ -679,7 +679,7 @@ message TestStreamPayload {
// (Optional) The output watermark tag for a PCollection. If unspecified
// or with an empty string, this will default to the Main PCollection
// Output
string tag = 2;
optional string tag = 2;
}

// Advances the processing time clock by the specified amount.
Expand All @@ -696,7 +696,7 @@ message TestStreamPayload {
// (Optional) The output PCollection tag to add these elements to. If
// unspecified or with an empty string, this will default to the Main
// PCollection Output.
string tag = 3;
optional string tag = 3;
}
}

Expand Down Expand Up @@ -806,7 +806,7 @@ message GroupIntoBatchesPayload {
int64 batch_size_bytes = 3;

// (Optional) Max duration a batch is allowed to be cached in states.
int64 max_buffering_duration_millis = 2;
optional int64 max_buffering_duration_millis = 2;
}

// A coder, the binary format for serialization and deserialization of data in
Expand Down Expand Up @@ -1156,7 +1156,7 @@ message WindowingStrategy {
// (Optional) Environment where the current window_fn should be applied in.
// Runner that executes the pipeline may choose to override this if needed.
// If not specified, environment will be decided by the runner.
string environment_id = 11;
optional string environment_id = 11;
}

// Whether or not a PCollection's WindowFn is non-merging, merging, or
Expand Down Expand Up @@ -1297,10 +1297,10 @@ message Trigger {
message AfterEndOfWindow {

// (Optional) A trigger governing output prior to the end of the window.
Trigger early_firings = 1;
optional Trigger early_firings = 1;

// (Optional) A trigger governing output after the end of the window.
Trigger late_firings = 2;
optional Trigger late_firings = 2;
}

// After input arrives, ready when the specified delay has passed.
Expand Down Expand Up @@ -1481,7 +1481,7 @@ message ArtifactUrlPayload {
string url = 1;

// (Optional) The hex-encoded sha256 checksum of the artifact if available.
string sha256 = 2;
optional string sha256 = 2;
}

message EmbeddedFilePayload {
Expand All @@ -1503,7 +1503,7 @@ message MavenPayload {
string artifact = 1;

// (Optional) Repository URL. If not specified, Maven central is used by default.
string repository_url = 2;
optional string repository_url = 2;
}

message DeferredArtifactPayload {
Expand Down Expand Up @@ -1765,7 +1765,7 @@ message FunctionSpec {

// (Optional) The data specifying any parameters to the URN. If
// the URN does not require any arguments, this may be omitted.
bytes payload = 3;
optional bytes payload = 3;
}

// A set of well known URNs describing display data.
Expand Down Expand Up @@ -1829,7 +1829,7 @@ message DisplayData {

// (Optional) The data specifying any parameters to the URN. If
// the URN does not require any arguments, this may be omitted.
bytes payload = 2;
optional bytes payload = 2;
}


Expand All @@ -1846,7 +1846,7 @@ message MessageWithComponents {
//
// If this is absent, it is expected that there are no
// references.
Components components = 1;
optional Components components = 1;

// (Required) The root message that may contain pointers
// that should be resolved by looking inside components.
Expand Down Expand Up @@ -1960,7 +1960,7 @@ message ExecutableStagePayload {
// value using the beam:coder:windowed_value:v1 coder parameterized by
// a beam:coder:bytes:v1 element coder and the window coder that this
// param_windowed_value coder uses.
bytes payload = 2;
optional bytes payload = 2;

// (Required) The target(PCollection or Timer) this setting applies to.
oneof target {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ message ApiServiceDescriptor {
// (Optional) The method for authentication. If unspecified, access to the
// url is already being performed in a trusted context (e.g. localhost,
// private network).
AuthenticationSpec authentication = 2;
optional AuthenticationSpec authentication = 2;
}

message AuthenticationSpec {
Expand All @@ -48,7 +48,7 @@ message AuthenticationSpec {

// (Optional) The data specifying any parameters to the URN. If
// the URN does not require any arguments, this may be omitted.
bytes payload = 2;
optional bytes payload = 2;
}

// TODO: Add authentication specifications as needed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ message Field {
// REQUIRED. Name of this field within the schema.
string name = 1;
// OPTIONAL. Human readable description of this field, such as the query that generated it.
string description = 2;
optional string description = 2;
FieldType type = 3;

int32 id = 4;
Expand All @@ -58,7 +58,7 @@ message Field {
// If no fields have encoding position populated the order of encoding is the same as the order in the Schema.
// If this Field is part of a Schema where encoding_positions_set is True then encoding_position must be
// defined, otherwise this field is ignored.
int32 encoding_position = 5;
optional int32 encoding_position = 5;
repeated Option options = 6;
}

Expand Down

0 comments on commit 35631f5

Please sign in to comment.