@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
2020import "google/api/resource.proto" ;
2121import "google/cloud/osconfig/v1/patch_jobs.proto" ;
2222import "google/protobuf/duration.proto" ;
23+ import "google/protobuf/field_mask.proto" ;
2324import "google/protobuf/timestamp.proto" ;
2425import "google/type/datetime.proto" ;
2526import "google/type/dayofweek.proto" ;
@@ -43,6 +44,19 @@ message PatchDeployment {
4344 pattern : "projects/{project}/patchDeployments/{patch_deployment}"
4445 };
4546
47+ // Represents state of patch peployment.
48+ enum State {
49+ // The default value. This value is used if the state is omitted.
50+ STATE_UNSPECIFIED = 0 ;
51+
52+ // Active value means that patch deployment generates Patch Jobs.
53+ ACTIVE = 1 ;
54+
55+ // Paused value means that patch deployment does not generate
56+ // Patch jobs. Requires user action to move in and out from this state.
57+ PAUSED = 2 ;
58+ }
59+
4660 // Unique name for the patch deployment resource in a project. The patch
4761 // deployment name is in the form:
4862 // `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
@@ -94,6 +108,9 @@ message PatchDeployment {
94108
95109 // Optional. Rollout strategy of the patch job.
96110 PatchRollout rollout = 11 [(google.api.field_behavior ) = OPTIONAL ];
111+
112+ // Output only. Current state of the patch deployment.
113+ State state = 12 [(google.api.field_behavior ) = OUTPUT_ONLY ];
97114}
98115
99116// Sets the time for a one time patch deployment. Timestamp is in
@@ -111,16 +128,16 @@ message RecurringSchedule {
111128 // Invalid. A frequency must be specified.
112129 FREQUENCY_UNSPECIFIED = 0 ;
113130
114- // Indicates that the frequency should be expressed in terms of
115- // weeks.
131+ // Indicates that the frequency of recurrence should be expressed in terms
132+ // of weeks.
116133 WEEKLY = 1 ;
117134
118- // Indicates that the frequency should be expressed in terms of
119- // months.
135+ // Indicates that the frequency of recurrence should be expressed in terms
136+ // of months.
120137 MONTHLY = 2 ;
121138
122- // Indicates that the frequency should be expressed in terms of
123- // days.
139+ // Indicates that the frequency of recurrence should be expressed in terms
140+ // of days.
124141 DAILY = 3 ;
125142 }
126143
@@ -197,6 +214,15 @@ message WeekDayOfMonth {
197214 // Required. A day of the week.
198215 google.type.DayOfWeek day_of_week = 2
199216 [(google.api.field_behavior ) = REQUIRED ];
217+
218+ // Optional. Represents the number of days before or after the given week day
219+ // of month that the patch deployment is scheduled for. For example if
220+ // `week_ordinal` and `day_of_week` values point to the second day of the
221+ // month and this `day_offset` value is set to `3`, the patch deployment takes
222+ // place three days after the second Tuesday of the month. If this value is
223+ // negative, for example -5, the patches are deployed five days before before
224+ // the second Tuesday of the month. Allowed values are in range [-30, 30].
225+ int32 day_offset = 3 [(google.api.field_behavior ) = OPTIONAL ];
200226}
201227
202228// A request message for creating a patch deployment.
@@ -276,3 +302,38 @@ message DeletePatchDeploymentRequest {
276302 }
277303 ];
278304}
305+
306+ // A request message for updating a patch deployment.
307+ message UpdatePatchDeploymentRequest {
308+ // Required. The patch deployment to Update.
309+ PatchDeployment patch_deployment = 1 [(google.api.field_behavior ) = REQUIRED ];
310+
311+ // Optional. Field mask that controls which fields of the patch deployment
312+ // should be updated.
313+ google.protobuf.FieldMask update_mask = 2
314+ [(google.api.field_behavior ) = OPTIONAL ];
315+ }
316+
317+ // A request message for pausing a patch deployment.
318+ message PausePatchDeploymentRequest {
319+ // Required. The resource name of the patch deployment in the form
320+ // `projects/*/patchDeployments/*`.
321+ string name = 1 [
322+ (google.api.field_behavior ) = REQUIRED ,
323+ (google.api.resource_reference ) = {
324+ type : "osconfig.googleapis.com/PatchDeployment"
325+ }
326+ ];
327+ }
328+
329+ // A request message for resuming a patch deployment.
330+ message ResumePatchDeploymentRequest {
331+ // Required. The resource name of the patch deployment in the form
332+ // `projects/*/patchDeployments/*`.
333+ string name = 1 [
334+ (google.api.field_behavior ) = REQUIRED ,
335+ (google.api.resource_reference ) = {
336+ type : "osconfig.googleapis.com/PatchDeployment"
337+ }
338+ ];
339+ }
0 commit comments