google-apis-osconfig_v1 0.6.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -57,6 +57,98 @@ module Google
57
57
  end
58
58
  end
59
59
 
60
+ # Common Vulnerability Scoring System version 3. For details, see https://www.
61
+ # first.org/cvss/specification-document
62
+ class CvsSv3
63
+ include Google::Apis::Core::Hashable
64
+
65
+ # This metric describes the conditions beyond the attacker's control that must
66
+ # exist in order to exploit the vulnerability.
67
+ # Corresponds to the JSON property `attackComplexity`
68
+ # @return [String]
69
+ attr_accessor :attack_complexity
70
+
71
+ # This metric reflects the context by which vulnerability exploitation is
72
+ # possible.
73
+ # Corresponds to the JSON property `attackVector`
74
+ # @return [String]
75
+ attr_accessor :attack_vector
76
+
77
+ # This metric measures the impact to the availability of the impacted component
78
+ # resulting from a successfully exploited vulnerability.
79
+ # Corresponds to the JSON property `availabilityImpact`
80
+ # @return [String]
81
+ attr_accessor :availability_impact
82
+
83
+ # The base score is a function of the base metric scores. https://www.first.org/
84
+ # cvss/specification-document#Base-Metrics
85
+ # Corresponds to the JSON property `baseScore`
86
+ # @return [Float]
87
+ attr_accessor :base_score
88
+
89
+ # This metric measures the impact to the confidentiality of the information
90
+ # resources managed by a software component due to a successfully exploited
91
+ # vulnerability.
92
+ # Corresponds to the JSON property `confidentialityImpact`
93
+ # @return [String]
94
+ attr_accessor :confidentiality_impact
95
+
96
+ # The Exploitability sub-score equation is derived from the Base Exploitability
97
+ # metrics. https://www.first.org/cvss/specification-document#2-1-Exploitability-
98
+ # Metrics
99
+ # Corresponds to the JSON property `exploitabilityScore`
100
+ # @return [Float]
101
+ attr_accessor :exploitability_score
102
+
103
+ # The Impact sub-score equation is derived from the Base Impact metrics.
104
+ # Corresponds to the JSON property `impactScore`
105
+ # @return [Float]
106
+ attr_accessor :impact_score
107
+
108
+ # This metric measures the impact to integrity of a successfully exploited
109
+ # vulnerability.
110
+ # Corresponds to the JSON property `integrityImpact`
111
+ # @return [String]
112
+ attr_accessor :integrity_impact
113
+
114
+ # This metric describes the level of privileges an attacker must possess before
115
+ # successfully exploiting the vulnerability.
116
+ # Corresponds to the JSON property `privilegesRequired`
117
+ # @return [String]
118
+ attr_accessor :privileges_required
119
+
120
+ # The Scope metric captures whether a vulnerability in one vulnerable component
121
+ # impacts resources in components beyond its security scope.
122
+ # Corresponds to the JSON property `scope`
123
+ # @return [String]
124
+ attr_accessor :scope
125
+
126
+ # This metric captures the requirement for a human user, other than the attacker,
127
+ # to participate in the successful compromise of the vulnerable component.
128
+ # Corresponds to the JSON property `userInteraction`
129
+ # @return [String]
130
+ attr_accessor :user_interaction
131
+
132
+ def initialize(**args)
133
+ update!(**args)
134
+ end
135
+
136
+ # Update properties of this object
137
+ def update!(**args)
138
+ @attack_complexity = args[:attack_complexity] if args.key?(:attack_complexity)
139
+ @attack_vector = args[:attack_vector] if args.key?(:attack_vector)
140
+ @availability_impact = args[:availability_impact] if args.key?(:availability_impact)
141
+ @base_score = args[:base_score] if args.key?(:base_score)
142
+ @confidentiality_impact = args[:confidentiality_impact] if args.key?(:confidentiality_impact)
143
+ @exploitability_score = args[:exploitability_score] if args.key?(:exploitability_score)
144
+ @impact_score = args[:impact_score] if args.key?(:impact_score)
145
+ @integrity_impact = args[:integrity_impact] if args.key?(:integrity_impact)
146
+ @privileges_required = args[:privileges_required] if args.key?(:privileges_required)
147
+ @scope = args[:scope] if args.key?(:scope)
148
+ @user_interaction = args[:user_interaction] if args.key?(:user_interaction)
149
+ end
150
+ end
151
+
60
152
  # Message for canceling a patch job.
61
153
  class CancelPatchJobRequest
62
154
  include Google::Apis::Core::Hashable
@@ -70,6 +162,47 @@ module Google
70
162
  end
71
163
  end
72
164
 
165
+ # Represents a whole or partial calendar date, such as a birthday. The time of
166
+ # day and time zone are either specified elsewhere or are insignificant. The
167
+ # date is relative to the Gregorian Calendar. This can represent one of the
168
+ # following: * A full date, with non-zero year, month, and day values * A month
169
+ # and day value, with a zero year, such as an anniversary * A year on its own,
170
+ # with zero month and day values * A year and month value, with a zero day, such
171
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
172
+ # google.protobuf.Timestamp`.
173
+ class Date
174
+ include Google::Apis::Core::Hashable
175
+
176
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
177
+ # specify a year by itself or a year and month where the day isn't significant.
178
+ # Corresponds to the JSON property `day`
179
+ # @return [Fixnum]
180
+ attr_accessor :day
181
+
182
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
183
+ # and day.
184
+ # Corresponds to the JSON property `month`
185
+ # @return [Fixnum]
186
+ attr_accessor :month
187
+
188
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
189
+ # year.
190
+ # Corresponds to the JSON property `year`
191
+ # @return [Fixnum]
192
+ attr_accessor :year
193
+
194
+ def initialize(**args)
195
+ update!(**args)
196
+ end
197
+
198
+ # Update properties of this object
199
+ def update!(**args)
200
+ @day = args[:day] if args.key?(:day)
201
+ @month = args[:month] if args.key?(:month)
202
+ @year = args[:year] if args.key?(:year)
203
+ end
204
+ end
205
+
73
206
  # A generic empty message that you can re-use to avoid defining duplicated empty
74
207
  # messages in your APIs. A typical example is to use it as the request or the
75
208
  # response type of an API method. For instance: service Foo ` rpc Bar(google.
@@ -286,7 +419,11 @@ module Google
286
419
  end
287
420
  end
288
421
 
289
- # The inventory details of a VM.
422
+ # This API resource represents the available inventory data for a Compute Engine
423
+ # virtual machine (VM) instance at a given point in time. You can use this API
424
+ # resource to determine the inventory data of your VM. For more information, see
425
+ # [Information provided by OS inventory management](https://cloud.google.com/
426
+ # compute/docs/instances/os-inventory-management#data-collected).
290
427
  class Inventory
291
428
  include Google::Apis::Core::Hashable
292
429
 
@@ -297,11 +434,22 @@ module Google
297
434
  # @return [Hash<String,Google::Apis::OsconfigV1::InventoryItem>]
298
435
  attr_accessor :items
299
436
 
437
+ # Output only. The `Inventory` API resource name. Format: `projects/`
438
+ # project_number`/locations/`location`/instances/`instance_id`/inventory`
439
+ # Corresponds to the JSON property `name`
440
+ # @return [String]
441
+ attr_accessor :name
442
+
300
443
  # Operating system information for the VM.
301
444
  # Corresponds to the JSON property `osInfo`
302
445
  # @return [Google::Apis::OsconfigV1::InventoryOsInfo]
303
446
  attr_accessor :os_info
304
447
 
448
+ # Output only. Timestamp of the last reported inventory for the VM.
449
+ # Corresponds to the JSON property `updateTime`
450
+ # @return [String]
451
+ attr_accessor :update_time
452
+
305
453
  def initialize(**args)
306
454
  update!(**args)
307
455
  end
@@ -309,7 +457,9 @@ module Google
309
457
  # Update properties of this object
310
458
  def update!(**args)
311
459
  @items = args[:items] if args.key?(:items)
460
+ @name = args[:name] if args.key?(:name)
312
461
  @os_info = args[:os_info] if args.key?(:os_info)
462
+ @update_time = args[:update_time] if args.key?(:update_time)
313
463
  end
314
464
  end
315
465
 
@@ -459,6 +609,14 @@ module Google
459
609
  # @return [Google::Apis::OsconfigV1::InventoryWindowsQuickFixEngineeringPackage]
460
610
  attr_accessor :qfe_package
461
611
 
612
+ # Contains information about a Windows application as retrieved from the Windows
613
+ # Registry. For more information about these fields, see [Windows Installer
614
+ # Properties for the Uninstall Registry](https://docs.microsoft.com/en-us/
615
+ # windows/win32/msi/uninstall-registry-key)`: class="external" `
616
+ # Corresponds to the JSON property `windowsApplication`
617
+ # @return [Google::Apis::OsconfigV1::InventoryWindowsApplication]
618
+ attr_accessor :windows_application
619
+
462
620
  # Details related to a Windows Update package. Field data and names are taken
463
621
  # from Windows Update API IUpdate Interface: https://docs.microsoft.com/en-us/
464
622
  # windows/win32/api/_wua/ Descriptive fields like title, and description are
@@ -494,6 +652,7 @@ module Google
494
652
  @cos_package = args[:cos_package] if args.key?(:cos_package)
495
653
  @googet_package = args[:googet_package] if args.key?(:googet_package)
496
654
  @qfe_package = args[:qfe_package] if args.key?(:qfe_package)
655
+ @windows_application = args[:windows_application] if args.key?(:windows_application)
497
656
  @wua_package = args[:wua_package] if args.key?(:wua_package)
498
657
  @yum_package = args[:yum_package] if args.key?(:yum_package)
499
658
  @zypper_package = args[:zypper_package] if args.key?(:zypper_package)
@@ -533,6 +692,59 @@ module Google
533
692
  end
534
693
  end
535
694
 
695
+ # Contains information about a Windows application as retrieved from the Windows
696
+ # Registry. For more information about these fields, see [Windows Installer
697
+ # Properties for the Uninstall Registry](https://docs.microsoft.com/en-us/
698
+ # windows/win32/msi/uninstall-registry-key)`: class="external" `
699
+ class InventoryWindowsApplication
700
+ include Google::Apis::Core::Hashable
701
+
702
+ # The name of the application or product.
703
+ # Corresponds to the JSON property `displayName`
704
+ # @return [String]
705
+ attr_accessor :display_name
706
+
707
+ # The version of the product or application in string format.
708
+ # Corresponds to the JSON property `displayVersion`
709
+ # @return [String]
710
+ attr_accessor :display_version
711
+
712
+ # The internet address for technical support.
713
+ # Corresponds to the JSON property `helpLink`
714
+ # @return [String]
715
+ attr_accessor :help_link
716
+
717
+ # Represents a whole or partial calendar date, such as a birthday. The time of
718
+ # day and time zone are either specified elsewhere or are insignificant. The
719
+ # date is relative to the Gregorian Calendar. This can represent one of the
720
+ # following: * A full date, with non-zero year, month, and day values * A month
721
+ # and day value, with a zero year, such as an anniversary * A year on its own,
722
+ # with zero month and day values * A year and month value, with a zero day, such
723
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
724
+ # google.protobuf.Timestamp`.
725
+ # Corresponds to the JSON property `installDate`
726
+ # @return [Google::Apis::OsconfigV1::Date]
727
+ attr_accessor :install_date
728
+
729
+ # The name of the manufacturer for the product or application.
730
+ # Corresponds to the JSON property `publisher`
731
+ # @return [String]
732
+ attr_accessor :publisher
733
+
734
+ def initialize(**args)
735
+ update!(**args)
736
+ end
737
+
738
+ # Update properties of this object
739
+ def update!(**args)
740
+ @display_name = args[:display_name] if args.key?(:display_name)
741
+ @display_version = args[:display_version] if args.key?(:display_version)
742
+ @help_link = args[:help_link] if args.key?(:help_link)
743
+ @install_date = args[:install_date] if args.key?(:install_date)
744
+ @publisher = args[:publisher] if args.key?(:publisher)
745
+ end
746
+ end
747
+
536
748
  # Information related to a Quick Fix Engineering package. Fields are taken from
537
749
  # Windows QuickFixEngineering Interface and match the source names: https://docs.
538
750
  # microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
@@ -652,10 +864,1151 @@ module Google
652
864
  # @return [String]
653
865
  attr_accessor :id
654
866
 
655
- # The name of the windows update category.
656
- # Corresponds to the JSON property `name`
657
- # @return [String]
658
- attr_accessor :name
867
+ # The name of the windows update category.
868
+ # Corresponds to the JSON property `name`
869
+ # @return [String]
870
+ attr_accessor :name
871
+
872
+ def initialize(**args)
873
+ update!(**args)
874
+ end
875
+
876
+ # Update properties of this object
877
+ def update!(**args)
878
+ @id = args[:id] if args.key?(:id)
879
+ @name = args[:name] if args.key?(:name)
880
+ end
881
+ end
882
+
883
+ # Details related to a Zypper Patch.
884
+ class InventoryZypperPatch
885
+ include Google::Apis::Core::Hashable
886
+
887
+ # The category of the patch.
888
+ # Corresponds to the JSON property `category`
889
+ # @return [String]
890
+ attr_accessor :category
891
+
892
+ # The name of the patch.
893
+ # Corresponds to the JSON property `patchName`
894
+ # @return [String]
895
+ attr_accessor :patch_name
896
+
897
+ # The severity specified for this patch
898
+ # Corresponds to the JSON property `severity`
899
+ # @return [String]
900
+ attr_accessor :severity
901
+
902
+ # Any summary information provided about this patch.
903
+ # Corresponds to the JSON property `summary`
904
+ # @return [String]
905
+ attr_accessor :summary
906
+
907
+ def initialize(**args)
908
+ update!(**args)
909
+ end
910
+
911
+ # Update properties of this object
912
+ def update!(**args)
913
+ @category = args[:category] if args.key?(:category)
914
+ @patch_name = args[:patch_name] if args.key?(:patch_name)
915
+ @severity = args[:severity] if args.key?(:severity)
916
+ @summary = args[:summary] if args.key?(:summary)
917
+ end
918
+ end
919
+
920
+ # A response message for listing inventory data for all VMs in a specified
921
+ # location.
922
+ class ListInventoriesResponse
923
+ include Google::Apis::Core::Hashable
924
+
925
+ # List of inventory objects.
926
+ # Corresponds to the JSON property `inventories`
927
+ # @return [Array<Google::Apis::OsconfigV1::Inventory>]
928
+ attr_accessor :inventories
929
+
930
+ # The pagination token to retrieve the next page of inventory objects.
931
+ # Corresponds to the JSON property `nextPageToken`
932
+ # @return [String]
933
+ attr_accessor :next_page_token
934
+
935
+ def initialize(**args)
936
+ update!(**args)
937
+ end
938
+
939
+ # Update properties of this object
940
+ def update!(**args)
941
+ @inventories = args[:inventories] if args.key?(:inventories)
942
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
943
+ end
944
+ end
945
+
946
+ # A response message for listing all revisions for a OS policy assignment.
947
+ class ListOsPolicyAssignmentRevisionsResponse
948
+ include Google::Apis::Core::Hashable
949
+
950
+ # The pagination token to retrieve the next page of OS policy assignment
951
+ # revisions.
952
+ # Corresponds to the JSON property `nextPageToken`
953
+ # @return [String]
954
+ attr_accessor :next_page_token
955
+
956
+ # The OS policy assignment revisions
957
+ # Corresponds to the JSON property `osPolicyAssignments`
958
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyAssignment>]
959
+ attr_accessor :os_policy_assignments
960
+
961
+ def initialize(**args)
962
+ update!(**args)
963
+ end
964
+
965
+ # Update properties of this object
966
+ def update!(**args)
967
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
968
+ @os_policy_assignments = args[:os_policy_assignments] if args.key?(:os_policy_assignments)
969
+ end
970
+ end
971
+
972
+ # A response message for listing all assignments under given parent.
973
+ class ListOsPolicyAssignmentsResponse
974
+ include Google::Apis::Core::Hashable
975
+
976
+ # The pagination token to retrieve the next page of OS policy assignments.
977
+ # Corresponds to the JSON property `nextPageToken`
978
+ # @return [String]
979
+ attr_accessor :next_page_token
980
+
981
+ # The list of assignments
982
+ # Corresponds to the JSON property `osPolicyAssignments`
983
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyAssignment>]
984
+ attr_accessor :os_policy_assignments
985
+
986
+ def initialize(**args)
987
+ update!(**args)
988
+ end
989
+
990
+ # Update properties of this object
991
+ def update!(**args)
992
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
993
+ @os_policy_assignments = args[:os_policy_assignments] if args.key?(:os_policy_assignments)
994
+ end
995
+ end
996
+
997
+ # A response message for listing patch deployments.
998
+ class ListPatchDeploymentsResponse
999
+ include Google::Apis::Core::Hashable
1000
+
1001
+ # A pagination token that can be used to get the next page of patch deployments.
1002
+ # Corresponds to the JSON property `nextPageToken`
1003
+ # @return [String]
1004
+ attr_accessor :next_page_token
1005
+
1006
+ # The list of patch deployments.
1007
+ # Corresponds to the JSON property `patchDeployments`
1008
+ # @return [Array<Google::Apis::OsconfigV1::PatchDeployment>]
1009
+ attr_accessor :patch_deployments
1010
+
1011
+ def initialize(**args)
1012
+ update!(**args)
1013
+ end
1014
+
1015
+ # Update properties of this object
1016
+ def update!(**args)
1017
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1018
+ @patch_deployments = args[:patch_deployments] if args.key?(:patch_deployments)
1019
+ end
1020
+ end
1021
+
1022
+ # A response message for listing the instances details for a patch job.
1023
+ class ListPatchJobInstanceDetailsResponse
1024
+ include Google::Apis::Core::Hashable
1025
+
1026
+ # A pagination token that can be used to get the next page of results.
1027
+ # Corresponds to the JSON property `nextPageToken`
1028
+ # @return [String]
1029
+ attr_accessor :next_page_token
1030
+
1031
+ # A list of instance status.
1032
+ # Corresponds to the JSON property `patchJobInstanceDetails`
1033
+ # @return [Array<Google::Apis::OsconfigV1::PatchJobInstanceDetails>]
1034
+ attr_accessor :patch_job_instance_details
1035
+
1036
+ def initialize(**args)
1037
+ update!(**args)
1038
+ end
1039
+
1040
+ # Update properties of this object
1041
+ def update!(**args)
1042
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1043
+ @patch_job_instance_details = args[:patch_job_instance_details] if args.key?(:patch_job_instance_details)
1044
+ end
1045
+ end
1046
+
1047
+ # A response message for listing patch jobs.
1048
+ class ListPatchJobsResponse
1049
+ include Google::Apis::Core::Hashable
1050
+
1051
+ # A pagination token that can be used to get the next page of results.
1052
+ # Corresponds to the JSON property `nextPageToken`
1053
+ # @return [String]
1054
+ attr_accessor :next_page_token
1055
+
1056
+ # The list of patch jobs.
1057
+ # Corresponds to the JSON property `patchJobs`
1058
+ # @return [Array<Google::Apis::OsconfigV1::PatchJob>]
1059
+ attr_accessor :patch_jobs
1060
+
1061
+ def initialize(**args)
1062
+ update!(**args)
1063
+ end
1064
+
1065
+ # Update properties of this object
1066
+ def update!(**args)
1067
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1068
+ @patch_jobs = args[:patch_jobs] if args.key?(:patch_jobs)
1069
+ end
1070
+ end
1071
+
1072
+ # A response message for listing vulnerability reports for all VM instances in
1073
+ # the specified location.
1074
+ class ListVulnerabilityReportsResponse
1075
+ include Google::Apis::Core::Hashable
1076
+
1077
+ # The pagination token to retrieve the next page of vulnerabilityReports object.
1078
+ # Corresponds to the JSON property `nextPageToken`
1079
+ # @return [String]
1080
+ attr_accessor :next_page_token
1081
+
1082
+ # List of vulnerabilityReport objects.
1083
+ # Corresponds to the JSON property `vulnerabilityReports`
1084
+ # @return [Array<Google::Apis::OsconfigV1::VulnerabilityReport>]
1085
+ attr_accessor :vulnerability_reports
1086
+
1087
+ def initialize(**args)
1088
+ update!(**args)
1089
+ end
1090
+
1091
+ # Update properties of this object
1092
+ def update!(**args)
1093
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1094
+ @vulnerability_reports = args[:vulnerability_reports] if args.key?(:vulnerability_reports)
1095
+ end
1096
+ end
1097
+
1098
+ # Represents a monthly schedule. An example of a valid monthly schedule is "on
1099
+ # the third Tuesday of the month" or "on the 15th of the month".
1100
+ class MonthlySchedule
1101
+ include Google::Apis::Core::Hashable
1102
+
1103
+ # Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
1104
+ # indicates the last day of the month. Months without the target day will be
1105
+ # skipped. For example, a schedule to run "every month on the 31st" will not run
1106
+ # in February, April, June, etc.
1107
+ # Corresponds to the JSON property `monthDay`
1108
+ # @return [Fixnum]
1109
+ attr_accessor :month_day
1110
+
1111
+ # Represents one week day in a month. An example is "the 4th Sunday".
1112
+ # Corresponds to the JSON property `weekDayOfMonth`
1113
+ # @return [Google::Apis::OsconfigV1::WeekDayOfMonth]
1114
+ attr_accessor :week_day_of_month
1115
+
1116
+ def initialize(**args)
1117
+ update!(**args)
1118
+ end
1119
+
1120
+ # Update properties of this object
1121
+ def update!(**args)
1122
+ @month_day = args[:month_day] if args.key?(:month_day)
1123
+ @week_day_of_month = args[:week_day_of_month] if args.key?(:week_day_of_month)
1124
+ end
1125
+ end
1126
+
1127
+ # An OS policy defines the desired state configuration for a VM.
1128
+ class OsPolicy
1129
+ include Google::Apis::Core::Hashable
1130
+
1131
+ # This flag determines the OS policy compliance status when none of the resource
1132
+ # groups within the policy are applicable for a VM. Set this value to `true` if
1133
+ # the policy needs to be reported as compliant even if the policy has nothing to
1134
+ # validate or enforce.
1135
+ # Corresponds to the JSON property `allowNoResourceGroupMatch`
1136
+ # @return [Boolean]
1137
+ attr_accessor :allow_no_resource_group_match
1138
+ alias_method :allow_no_resource_group_match?, :allow_no_resource_group_match
1139
+
1140
+ # Policy description. Length of the description is limited to 1024 characters.
1141
+ # Corresponds to the JSON property `description`
1142
+ # @return [String]
1143
+ attr_accessor :description
1144
+
1145
+ # Required. The id of the OS policy with the following restrictions: * Must
1146
+ # contain only lowercase letters, numbers, and hyphens. * Must start with a
1147
+ # letter. * Must be between 1-63 characters. * Must end with a number or a
1148
+ # letter. * Must be unique within the assignment.
1149
+ # Corresponds to the JSON property `id`
1150
+ # @return [String]
1151
+ attr_accessor :id
1152
+
1153
+ # Required. Policy mode
1154
+ # Corresponds to the JSON property `mode`
1155
+ # @return [String]
1156
+ attr_accessor :mode
1157
+
1158
+ # Required. List of resource groups for the policy. For a particular VM,
1159
+ # resource groups are evaluated in the order specified and the first resource
1160
+ # group that is applicable is selected and the rest are ignored. If none of the
1161
+ # resource groups are applicable for a VM, the VM is considered to be non-
1162
+ # compliant w.r.t this policy. This behavior can be toggled by the flag `
1163
+ # allow_no_resource_group_match`
1164
+ # Corresponds to the JSON property `resourceGroups`
1165
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyResourceGroup>]
1166
+ attr_accessor :resource_groups
1167
+
1168
+ def initialize(**args)
1169
+ update!(**args)
1170
+ end
1171
+
1172
+ # Update properties of this object
1173
+ def update!(**args)
1174
+ @allow_no_resource_group_match = args[:allow_no_resource_group_match] if args.key?(:allow_no_resource_group_match)
1175
+ @description = args[:description] if args.key?(:description)
1176
+ @id = args[:id] if args.key?(:id)
1177
+ @mode = args[:mode] if args.key?(:mode)
1178
+ @resource_groups = args[:resource_groups] if args.key?(:resource_groups)
1179
+ end
1180
+ end
1181
+
1182
+ # OS policy assignment is an API resource that is used to apply a set of OS
1183
+ # policies to a dynamically targeted group of Compute Engine VM instances. An OS
1184
+ # policy is used to define the desired state configuration for a Compute Engine
1185
+ # VM instance through a set of configuration resources that provide capabilities
1186
+ # such as installing or removing software packages, or executing a script. For
1187
+ # more information, see [OS policy and OS policy assignment](https://cloud.
1188
+ # google.com/compute/docs/os-configuration-management/working-with-os-policies).
1189
+ class OsPolicyAssignment
1190
+ include Google::Apis::Core::Hashable
1191
+
1192
+ # Output only. Indicates that this revision has been successfully rolled out in
1193
+ # this zone and new VMs will be assigned OS policies from this revision. For a
1194
+ # given OS policy assignment, there is only one revision with a value of `true`
1195
+ # for this field.
1196
+ # Corresponds to the JSON property `baseline`
1197
+ # @return [Boolean]
1198
+ attr_accessor :baseline
1199
+ alias_method :baseline?, :baseline
1200
+
1201
+ # Output only. Indicates that this revision deletes the OS policy assignment.
1202
+ # Corresponds to the JSON property `deleted`
1203
+ # @return [Boolean]
1204
+ attr_accessor :deleted
1205
+ alias_method :deleted?, :deleted
1206
+
1207
+ # OS policy assignment description. Length of the description is limited to 1024
1208
+ # characters.
1209
+ # Corresponds to the JSON property `description`
1210
+ # @return [String]
1211
+ attr_accessor :description
1212
+
1213
+ # The etag for this OS policy assignment. If this is provided on update, it must
1214
+ # match the server's etag.
1215
+ # Corresponds to the JSON property `etag`
1216
+ # @return [String]
1217
+ attr_accessor :etag
1218
+
1219
+ # Filters to select target VMs for an assignment. If more than one filter
1220
+ # criteria is specified below, a VM will be selected if and only if it satisfies
1221
+ # all of them.
1222
+ # Corresponds to the JSON property `instanceFilter`
1223
+ # @return [Google::Apis::OsconfigV1::OsPolicyAssignmentInstanceFilter]
1224
+ attr_accessor :instance_filter
1225
+
1226
+ # Resource name. Format: `projects/`project_number`/locations/`location`/
1227
+ # osPolicyAssignments/`os_policy_assignment_id`` This field is ignored when you
1228
+ # create an OS policy assignment.
1229
+ # Corresponds to the JSON property `name`
1230
+ # @return [String]
1231
+ attr_accessor :name
1232
+
1233
+ # Required. List of OS policies to be applied to the VMs.
1234
+ # Corresponds to the JSON property `osPolicies`
1235
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicy>]
1236
+ attr_accessor :os_policies
1237
+
1238
+ # Output only. Indicates that reconciliation is in progress for the revision.
1239
+ # This value is `true` when the `rollout_state` is one of: * IN_PROGRESS *
1240
+ # CANCELLING
1241
+ # Corresponds to the JSON property `reconciling`
1242
+ # @return [Boolean]
1243
+ attr_accessor :reconciling
1244
+ alias_method :reconciling?, :reconciling
1245
+
1246
+ # Output only. The timestamp that the revision was created.
1247
+ # Corresponds to the JSON property `revisionCreateTime`
1248
+ # @return [String]
1249
+ attr_accessor :revision_create_time
1250
+
1251
+ # Output only. The assignment revision ID A new revision is committed whenever a
1252
+ # rollout is triggered for a OS policy assignment
1253
+ # Corresponds to the JSON property `revisionId`
1254
+ # @return [String]
1255
+ attr_accessor :revision_id
1256
+
1257
+ # Message to configure the rollout at the zonal level for the OS policy
1258
+ # assignment.
1259
+ # Corresponds to the JSON property `rollout`
1260
+ # @return [Google::Apis::OsconfigV1::OsPolicyAssignmentRollout]
1261
+ attr_accessor :rollout
1262
+
1263
+ # Output only. OS policy assignment rollout state
1264
+ # Corresponds to the JSON property `rolloutState`
1265
+ # @return [String]
1266
+ attr_accessor :rollout_state
1267
+
1268
+ # Output only. Server generated unique id for the OS policy assignment resource.
1269
+ # Corresponds to the JSON property `uid`
1270
+ # @return [String]
1271
+ attr_accessor :uid
1272
+
1273
+ def initialize(**args)
1274
+ update!(**args)
1275
+ end
1276
+
1277
+ # Update properties of this object
1278
+ def update!(**args)
1279
+ @baseline = args[:baseline] if args.key?(:baseline)
1280
+ @deleted = args[:deleted] if args.key?(:deleted)
1281
+ @description = args[:description] if args.key?(:description)
1282
+ @etag = args[:etag] if args.key?(:etag)
1283
+ @instance_filter = args[:instance_filter] if args.key?(:instance_filter)
1284
+ @name = args[:name] if args.key?(:name)
1285
+ @os_policies = args[:os_policies] if args.key?(:os_policies)
1286
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
1287
+ @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)
1288
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
1289
+ @rollout = args[:rollout] if args.key?(:rollout)
1290
+ @rollout_state = args[:rollout_state] if args.key?(:rollout_state)
1291
+ @uid = args[:uid] if args.key?(:uid)
1292
+ end
1293
+ end
1294
+
1295
+ # Filters to select target VMs for an assignment. If more than one filter
1296
+ # criteria is specified below, a VM will be selected if and only if it satisfies
1297
+ # all of them.
1298
+ class OsPolicyAssignmentInstanceFilter
1299
+ include Google::Apis::Core::Hashable
1300
+
1301
+ # Target all VMs in the project. If true, no other criteria is permitted.
1302
+ # Corresponds to the JSON property `all`
1303
+ # @return [Boolean]
1304
+ attr_accessor :all
1305
+ alias_method :all?, :all
1306
+
1307
+ # List of label sets used for VM exclusion. If the list has more than one label
1308
+ # set, the VM is excluded if any of the label sets are applicable for the VM.
1309
+ # Corresponds to the JSON property `exclusionLabels`
1310
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyAssignmentLabelSet>]
1311
+ attr_accessor :exclusion_labels
1312
+
1313
+ # List of label sets used for VM inclusion. If the list has more than one `
1314
+ # LabelSet`, the VM is included if any of the label sets are applicable for the
1315
+ # VM.
1316
+ # Corresponds to the JSON property `inclusionLabels`
1317
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyAssignmentLabelSet>]
1318
+ attr_accessor :inclusion_labels
1319
+
1320
+ # List of inventories to select VMs. A VM is selected if its inventory data
1321
+ # matches at least one of the following inventories.
1322
+ # Corresponds to the JSON property `inventories`
1323
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyAssignmentInstanceFilterInventory>]
1324
+ attr_accessor :inventories
1325
+
1326
+ def initialize(**args)
1327
+ update!(**args)
1328
+ end
1329
+
1330
+ # Update properties of this object
1331
+ def update!(**args)
1332
+ @all = args[:all] if args.key?(:all)
1333
+ @exclusion_labels = args[:exclusion_labels] if args.key?(:exclusion_labels)
1334
+ @inclusion_labels = args[:inclusion_labels] if args.key?(:inclusion_labels)
1335
+ @inventories = args[:inventories] if args.key?(:inventories)
1336
+ end
1337
+ end
1338
+
1339
+ # VM inventory details.
1340
+ class OsPolicyAssignmentInstanceFilterInventory
1341
+ include Google::Apis::Core::Hashable
1342
+
1343
+ # Required. The OS short name
1344
+ # Corresponds to the JSON property `osShortName`
1345
+ # @return [String]
1346
+ attr_accessor :os_short_name
1347
+
1348
+ # The OS version Prefix matches are supported if asterisk(*) is provided as the
1349
+ # last character. For example, to match all versions with a major version of `7`,
1350
+ # specify the following value for this field `7.*` An empty string matches all
1351
+ # OS versions.
1352
+ # Corresponds to the JSON property `osVersion`
1353
+ # @return [String]
1354
+ attr_accessor :os_version
1355
+
1356
+ def initialize(**args)
1357
+ update!(**args)
1358
+ end
1359
+
1360
+ # Update properties of this object
1361
+ def update!(**args)
1362
+ @os_short_name = args[:os_short_name] if args.key?(:os_short_name)
1363
+ @os_version = args[:os_version] if args.key?(:os_version)
1364
+ end
1365
+ end
1366
+
1367
+ # Message representing label set. * A label is a key value pair set for a VM. *
1368
+ # A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other
1369
+ # words, a LabelSet is applicable for a VM only if it matches all the labels in
1370
+ # the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=
1371
+ # webserver` will only be applicable for those VMs with both labels present.
1372
+ class OsPolicyAssignmentLabelSet
1373
+ include Google::Apis::Core::Hashable
1374
+
1375
+ # Labels are identified by key/value pairs in this map. A VM should contain all
1376
+ # the key/value pairs specified in this map to be selected.
1377
+ # Corresponds to the JSON property `labels`
1378
+ # @return [Hash<String,String>]
1379
+ attr_accessor :labels
1380
+
1381
+ def initialize(**args)
1382
+ update!(**args)
1383
+ end
1384
+
1385
+ # Update properties of this object
1386
+ def update!(**args)
1387
+ @labels = args[:labels] if args.key?(:labels)
1388
+ end
1389
+ end
1390
+
1391
+ # OS policy assignment operation metadata provided by OS policy assignment API
1392
+ # methods that return long running operations.
1393
+ class OsPolicyAssignmentOperationMetadata
1394
+ include Google::Apis::Core::Hashable
1395
+
1396
+ # The OS policy assignment API method.
1397
+ # Corresponds to the JSON property `apiMethod`
1398
+ # @return [String]
1399
+ attr_accessor :api_method
1400
+
1401
+ # Reference to the `OSPolicyAssignment` API resource. Format: `projects/`
1402
+ # project_number`/locations/`location`/osPolicyAssignments/`
1403
+ # os_policy_assignment_id@revision_id``
1404
+ # Corresponds to the JSON property `osPolicyAssignment`
1405
+ # @return [String]
1406
+ attr_accessor :os_policy_assignment
1407
+
1408
+ # Rollout start time
1409
+ # Corresponds to the JSON property `rolloutStartTime`
1410
+ # @return [String]
1411
+ attr_accessor :rollout_start_time
1412
+
1413
+ # State of the rollout
1414
+ # Corresponds to the JSON property `rolloutState`
1415
+ # @return [String]
1416
+ attr_accessor :rollout_state
1417
+
1418
+ # Rollout update time
1419
+ # Corresponds to the JSON property `rolloutUpdateTime`
1420
+ # @return [String]
1421
+ attr_accessor :rollout_update_time
1422
+
1423
+ def initialize(**args)
1424
+ update!(**args)
1425
+ end
1426
+
1427
+ # Update properties of this object
1428
+ def update!(**args)
1429
+ @api_method = args[:api_method] if args.key?(:api_method)
1430
+ @os_policy_assignment = args[:os_policy_assignment] if args.key?(:os_policy_assignment)
1431
+ @rollout_start_time = args[:rollout_start_time] if args.key?(:rollout_start_time)
1432
+ @rollout_state = args[:rollout_state] if args.key?(:rollout_state)
1433
+ @rollout_update_time = args[:rollout_update_time] if args.key?(:rollout_update_time)
1434
+ end
1435
+ end
1436
+
1437
+ # Message to configure the rollout at the zonal level for the OS policy
1438
+ # assignment.
1439
+ class OsPolicyAssignmentRollout
1440
+ include Google::Apis::Core::Hashable
1441
+
1442
+ # Message encapsulating a value that can be either absolute ("fixed") or
1443
+ # relative ("percent") to a value.
1444
+ # Corresponds to the JSON property `disruptionBudget`
1445
+ # @return [Google::Apis::OsconfigV1::FixedOrPercent]
1446
+ attr_accessor :disruption_budget
1447
+
1448
+ # Required. This determines the minimum duration of time to wait after the
1449
+ # configuration changes are applied through the current rollout. A VM continues
1450
+ # to count towards the `disruption_budget` at least until this duration of time
1451
+ # has passed after configuration changes are applied.
1452
+ # Corresponds to the JSON property `minWaitDuration`
1453
+ # @return [String]
1454
+ attr_accessor :min_wait_duration
1455
+
1456
+ def initialize(**args)
1457
+ update!(**args)
1458
+ end
1459
+
1460
+ # Update properties of this object
1461
+ def update!(**args)
1462
+ @disruption_budget = args[:disruption_budget] if args.key?(:disruption_budget)
1463
+ @min_wait_duration = args[:min_wait_duration] if args.key?(:min_wait_duration)
1464
+ end
1465
+ end
1466
+
1467
+ # Filtering criteria to select VMs based on inventory details.
1468
+ class OsPolicyInventoryFilter
1469
+ include Google::Apis::Core::Hashable
1470
+
1471
+ # Required. The OS short name
1472
+ # Corresponds to the JSON property `osShortName`
1473
+ # @return [String]
1474
+ attr_accessor :os_short_name
1475
+
1476
+ # The OS version Prefix matches are supported if asterisk(*) is provided as the
1477
+ # last character. For example, to match all versions with a major version of `7`,
1478
+ # specify the following value for this field `7.*` An empty string matches all
1479
+ # OS versions.
1480
+ # Corresponds to the JSON property `osVersion`
1481
+ # @return [String]
1482
+ attr_accessor :os_version
1483
+
1484
+ def initialize(**args)
1485
+ update!(**args)
1486
+ end
1487
+
1488
+ # Update properties of this object
1489
+ def update!(**args)
1490
+ @os_short_name = args[:os_short_name] if args.key?(:os_short_name)
1491
+ @os_version = args[:os_version] if args.key?(:os_version)
1492
+ end
1493
+ end
1494
+
1495
+ # An OS policy resource is used to define the desired state configuration and
1496
+ # provides a specific functionality like installing/removing packages, executing
1497
+ # a script etc. The system ensures that resources are always in their desired
1498
+ # state by taking necessary actions if they have drifted from their desired
1499
+ # state.
1500
+ class OsPolicyResource
1501
+ include Google::Apis::Core::Hashable
1502
+
1503
+ # A resource that allows executing scripts on the VM. The `ExecResource` has 2
1504
+ # stages: `validate` and `enforce` and both stages accept a script as an
1505
+ # argument to execute. When the `ExecResource` is applied by the agent, it first
1506
+ # executes the script in the `validate` stage. The `validate` stage can signal
1507
+ # that the `ExecResource` is already in the desired state by returning an exit
1508
+ # code of `100`. If the `ExecResource` is not in the desired state, it should
1509
+ # return an exit code of `101`. Any other exit code returned by this stage is
1510
+ # considered an error. If the `ExecResource` is not in the desired state based
1511
+ # on the exit code from the `validate` stage, the agent proceeds to execute the
1512
+ # script from the `enforce` stage. If the `ExecResource` is already in the
1513
+ # desired state, the `enforce` stage will not be run. Similar to `validate`
1514
+ # stage, the `enforce` stage should return an exit code of `100` to indicate
1515
+ # that the resource in now in its desired state. Any other exit code is
1516
+ # considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101`
1517
+ # vs `1`) to have an explicit indicator of `in desired state`, `not in desired
1518
+ # state` and errors. Because, for example, Powershell will always return an exit
1519
+ # code of `0` unless an `exit` statement is provided in the script. So, for
1520
+ # reasons of consistency and being explicit, exit codes `100` and `101` were
1521
+ # chosen.
1522
+ # Corresponds to the JSON property `exec`
1523
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceExecResource]
1524
+ attr_accessor :exec
1525
+
1526
+ # A resource that manages the state of a file.
1527
+ # Corresponds to the JSON property `file`
1528
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFileResource]
1529
+ attr_accessor :file
1530
+
1531
+ # Required. The id of the resource with the following restrictions: * Must
1532
+ # contain only lowercase letters, numbers, and hyphens. * Must start with a
1533
+ # letter. * Must be between 1-63 characters. * Must end with a number or a
1534
+ # letter. * Must be unique within the OS policy.
1535
+ # Corresponds to the JSON property `id`
1536
+ # @return [String]
1537
+ attr_accessor :id
1538
+
1539
+ # A resource that manages a system package.
1540
+ # Corresponds to the JSON property `pkg`
1541
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResource]
1542
+ attr_accessor :pkg
1543
+
1544
+ # A resource that manages a package repository.
1545
+ # Corresponds to the JSON property `repository`
1546
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceRepositoryResource]
1547
+ attr_accessor :repository
1548
+
1549
+ def initialize(**args)
1550
+ update!(**args)
1551
+ end
1552
+
1553
+ # Update properties of this object
1554
+ def update!(**args)
1555
+ @exec = args[:exec] if args.key?(:exec)
1556
+ @file = args[:file] if args.key?(:file)
1557
+ @id = args[:id] if args.key?(:id)
1558
+ @pkg = args[:pkg] if args.key?(:pkg)
1559
+ @repository = args[:repository] if args.key?(:repository)
1560
+ end
1561
+ end
1562
+
1563
+ # A resource that allows executing scripts on the VM. The `ExecResource` has 2
1564
+ # stages: `validate` and `enforce` and both stages accept a script as an
1565
+ # argument to execute. When the `ExecResource` is applied by the agent, it first
1566
+ # executes the script in the `validate` stage. The `validate` stage can signal
1567
+ # that the `ExecResource` is already in the desired state by returning an exit
1568
+ # code of `100`. If the `ExecResource` is not in the desired state, it should
1569
+ # return an exit code of `101`. Any other exit code returned by this stage is
1570
+ # considered an error. If the `ExecResource` is not in the desired state based
1571
+ # on the exit code from the `validate` stage, the agent proceeds to execute the
1572
+ # script from the `enforce` stage. If the `ExecResource` is already in the
1573
+ # desired state, the `enforce` stage will not be run. Similar to `validate`
1574
+ # stage, the `enforce` stage should return an exit code of `100` to indicate
1575
+ # that the resource in now in its desired state. Any other exit code is
1576
+ # considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101`
1577
+ # vs `1`) to have an explicit indicator of `in desired state`, `not in desired
1578
+ # state` and errors. Because, for example, Powershell will always return an exit
1579
+ # code of `0` unless an `exit` statement is provided in the script. So, for
1580
+ # reasons of consistency and being explicit, exit codes `100` and `101` were
1581
+ # chosen.
1582
+ class OsPolicyResourceExecResource
1583
+ include Google::Apis::Core::Hashable
1584
+
1585
+ # A file or script to execute.
1586
+ # Corresponds to the JSON property `enforce`
1587
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceExecResourceExec]
1588
+ attr_accessor :enforce
1589
+
1590
+ # A file or script to execute.
1591
+ # Corresponds to the JSON property `validate`
1592
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceExecResourceExec]
1593
+ attr_accessor :validate
1594
+
1595
+ def initialize(**args)
1596
+ update!(**args)
1597
+ end
1598
+
1599
+ # Update properties of this object
1600
+ def update!(**args)
1601
+ @enforce = args[:enforce] if args.key?(:enforce)
1602
+ @validate = args[:validate] if args.key?(:validate)
1603
+ end
1604
+ end
1605
+
1606
+ # A file or script to execute.
1607
+ class OsPolicyResourceExecResourceExec
1608
+ include Google::Apis::Core::Hashable
1609
+
1610
+ # Optional arguments to pass to the source during execution.
1611
+ # Corresponds to the JSON property `args`
1612
+ # @return [Array<String>]
1613
+ attr_accessor :args
1614
+
1615
+ # A remote or local file.
1616
+ # Corresponds to the JSON property `file`
1617
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFile]
1618
+ attr_accessor :file
1619
+
1620
+ # Required. The script interpreter to use.
1621
+ # Corresponds to the JSON property `interpreter`
1622
+ # @return [String]
1623
+ attr_accessor :interpreter
1624
+
1625
+ # Only recorded for enforce Exec. Path to an output file (that is created by
1626
+ # this Exec) whose content will be recorded in OSPolicyResourceCompliance after
1627
+ # a successful run. Absence or failure to read this file will result in this
1628
+ # ExecResource being non-compliant. Output file size is limited to 100K bytes.
1629
+ # Corresponds to the JSON property `outputFilePath`
1630
+ # @return [String]
1631
+ attr_accessor :output_file_path
1632
+
1633
+ # An inline script. The size of the script is limited to 1024 characters.
1634
+ # Corresponds to the JSON property `script`
1635
+ # @return [String]
1636
+ attr_accessor :script
1637
+
1638
+ def initialize(**args)
1639
+ update!(**args)
1640
+ end
1641
+
1642
+ # Update properties of this object
1643
+ def update!(**args)
1644
+ @args = args[:args] if args.key?(:args)
1645
+ @file = args[:file] if args.key?(:file)
1646
+ @interpreter = args[:interpreter] if args.key?(:interpreter)
1647
+ @output_file_path = args[:output_file_path] if args.key?(:output_file_path)
1648
+ @script = args[:script] if args.key?(:script)
1649
+ end
1650
+ end
1651
+
1652
+ # A remote or local file.
1653
+ class OsPolicyResourceFile
1654
+ include Google::Apis::Core::Hashable
1655
+
1656
+ # Defaults to false. When false, files are subject to validations based on the
1657
+ # file type: Remote: A checksum must be specified. Cloud Storage: An object
1658
+ # generation number must be specified.
1659
+ # Corresponds to the JSON property `allowInsecure`
1660
+ # @return [Boolean]
1661
+ attr_accessor :allow_insecure
1662
+ alias_method :allow_insecure?, :allow_insecure
1663
+
1664
+ # Specifies a file available as a Cloud Storage Object.
1665
+ # Corresponds to the JSON property `gcs`
1666
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFileGcs]
1667
+ attr_accessor :gcs
1668
+
1669
+ # A local path within the VM to use.
1670
+ # Corresponds to the JSON property `localPath`
1671
+ # @return [String]
1672
+ attr_accessor :local_path
1673
+
1674
+ # Specifies a file available via some URI.
1675
+ # Corresponds to the JSON property `remote`
1676
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFileRemote]
1677
+ attr_accessor :remote
1678
+
1679
+ def initialize(**args)
1680
+ update!(**args)
1681
+ end
1682
+
1683
+ # Update properties of this object
1684
+ def update!(**args)
1685
+ @allow_insecure = args[:allow_insecure] if args.key?(:allow_insecure)
1686
+ @gcs = args[:gcs] if args.key?(:gcs)
1687
+ @local_path = args[:local_path] if args.key?(:local_path)
1688
+ @remote = args[:remote] if args.key?(:remote)
1689
+ end
1690
+ end
1691
+
1692
+ # Specifies a file available as a Cloud Storage Object.
1693
+ class OsPolicyResourceFileGcs
1694
+ include Google::Apis::Core::Hashable
1695
+
1696
+ # Required. Bucket of the Cloud Storage object.
1697
+ # Corresponds to the JSON property `bucket`
1698
+ # @return [String]
1699
+ attr_accessor :bucket
1700
+
1701
+ # Generation number of the Cloud Storage object.
1702
+ # Corresponds to the JSON property `generation`
1703
+ # @return [Fixnum]
1704
+ attr_accessor :generation
1705
+
1706
+ # Required. Name of the Cloud Storage object.
1707
+ # Corresponds to the JSON property `object`
1708
+ # @return [String]
1709
+ attr_accessor :object
1710
+
1711
+ def initialize(**args)
1712
+ update!(**args)
1713
+ end
1714
+
1715
+ # Update properties of this object
1716
+ def update!(**args)
1717
+ @bucket = args[:bucket] if args.key?(:bucket)
1718
+ @generation = args[:generation] if args.key?(:generation)
1719
+ @object = args[:object] if args.key?(:object)
1720
+ end
1721
+ end
1722
+
1723
+ # Specifies a file available via some URI.
1724
+ class OsPolicyResourceFileRemote
1725
+ include Google::Apis::Core::Hashable
1726
+
1727
+ # SHA256 checksum of the remote file.
1728
+ # Corresponds to the JSON property `sha256Checksum`
1729
+ # @return [String]
1730
+ attr_accessor :sha256_checksum
1731
+
1732
+ # Required. URI from which to fetch the object. It should contain both the
1733
+ # protocol and path following the format ``protocol`://`location``.
1734
+ # Corresponds to the JSON property `uri`
1735
+ # @return [String]
1736
+ attr_accessor :uri
1737
+
1738
+ def initialize(**args)
1739
+ update!(**args)
1740
+ end
1741
+
1742
+ # Update properties of this object
1743
+ def update!(**args)
1744
+ @sha256_checksum = args[:sha256_checksum] if args.key?(:sha256_checksum)
1745
+ @uri = args[:uri] if args.key?(:uri)
1746
+ end
1747
+ end
1748
+
1749
+ # A resource that manages the state of a file.
1750
+ class OsPolicyResourceFileResource
1751
+ include Google::Apis::Core::Hashable
1752
+
1753
+ # A a file with this content. The size of the content is limited to 1024
1754
+ # characters.
1755
+ # Corresponds to the JSON property `content`
1756
+ # @return [String]
1757
+ attr_accessor :content
1758
+
1759
+ # A remote or local file.
1760
+ # Corresponds to the JSON property `file`
1761
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFile]
1762
+ attr_accessor :file
1763
+
1764
+ # Required. The absolute path of the file within the VM.
1765
+ # Corresponds to the JSON property `path`
1766
+ # @return [String]
1767
+ attr_accessor :path
1768
+
1769
+ # Consists of three octal digits which represent, in order, the permissions of
1770
+ # the owner, group, and other users for the file (similarly to the numeric mode
1771
+ # used in the linux chmod utility). Each digit represents a three bit number
1772
+ # with the 4 bit corresponding to the read permissions, the 2 bit corresponds to
1773
+ # the write bit, and the one bit corresponds to the execute permission. Default
1774
+ # behavior is 755. Below are some examples of permissions and their associated
1775
+ # values: read, write, and execute: 7 read and execute: 5 read and write: 6 read
1776
+ # only: 4
1777
+ # Corresponds to the JSON property `permissions`
1778
+ # @return [String]
1779
+ attr_accessor :permissions
1780
+
1781
+ # Required. Desired state of the file.
1782
+ # Corresponds to the JSON property `state`
1783
+ # @return [String]
1784
+ attr_accessor :state
1785
+
1786
+ def initialize(**args)
1787
+ update!(**args)
1788
+ end
1789
+
1790
+ # Update properties of this object
1791
+ def update!(**args)
1792
+ @content = args[:content] if args.key?(:content)
1793
+ @file = args[:file] if args.key?(:file)
1794
+ @path = args[:path] if args.key?(:path)
1795
+ @permissions = args[:permissions] if args.key?(:permissions)
1796
+ @state = args[:state] if args.key?(:state)
1797
+ end
1798
+ end
1799
+
1800
+ # Resource groups provide a mechanism to group OS policy resources. Resource
1801
+ # groups enable OS policy authors to create a single OS policy to be applied to
1802
+ # VMs running different operating Systems. When the OS policy is applied to a
1803
+ # target VM, the appropriate resource group within the OS policy is selected
1804
+ # based on the `OSFilter` specified within the resource group.
1805
+ class OsPolicyResourceGroup
1806
+ include Google::Apis::Core::Hashable
1807
+
1808
+ # List of inventory filters for the resource group. The resources in this
1809
+ # resource group are applied to the target VM if it satisfies at least one of
1810
+ # the following inventory filters. For example, to apply this resource group to
1811
+ # VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for
1812
+ # the list with following values: inventory_filters[0].os_short_name='rhel' and
1813
+ # inventory_filters[1].os_short_name='centos' If the list is empty, this
1814
+ # resource group will be applied to the target VM unconditionally.
1815
+ # Corresponds to the JSON property `inventoryFilters`
1816
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyInventoryFilter>]
1817
+ attr_accessor :inventory_filters
1818
+
1819
+ # Required. List of resources configured for this resource group. The resources
1820
+ # are executed in the exact order specified here.
1821
+ # Corresponds to the JSON property `resources`
1822
+ # @return [Array<Google::Apis::OsconfigV1::OsPolicyResource>]
1823
+ attr_accessor :resources
1824
+
1825
+ def initialize(**args)
1826
+ update!(**args)
1827
+ end
1828
+
1829
+ # Update properties of this object
1830
+ def update!(**args)
1831
+ @inventory_filters = args[:inventory_filters] if args.key?(:inventory_filters)
1832
+ @resources = args[:resources] if args.key?(:resources)
1833
+ end
1834
+ end
1835
+
1836
+ # A resource that manages a system package.
1837
+ class OsPolicyResourcePackageResource
1838
+ include Google::Apis::Core::Hashable
1839
+
1840
+ # A package managed by APT. - install: `apt-get update && apt-get -y install [
1841
+ # name]` - remove: `apt-get -y remove [name]`
1842
+ # Corresponds to the JSON property `apt`
1843
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceApt]
1844
+ attr_accessor :apt
1845
+
1846
+ # A deb package file. dpkg packages only support INSTALLED state.
1847
+ # Corresponds to the JSON property `deb`
1848
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceDeb]
1849
+ attr_accessor :deb
1850
+
1851
+ # Required. The desired state the agent should maintain for this package.
1852
+ # Corresponds to the JSON property `desiredState`
1853
+ # @return [String]
1854
+ attr_accessor :desired_state
1855
+
1856
+ # A package managed by GooGet. - install: `googet -noconfirm install package` -
1857
+ # remove: `googet -noconfirm remove package`
1858
+ # Corresponds to the JSON property `googet`
1859
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceGooGet]
1860
+ attr_accessor :googet
1861
+
1862
+ # An MSI package. MSI packages only support INSTALLED state.
1863
+ # Corresponds to the JSON property `msi`
1864
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceMsi]
1865
+ attr_accessor :msi
1866
+
1867
+ # An RPM package file. RPM packages only support INSTALLED state.
1868
+ # Corresponds to the JSON property `rpm`
1869
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceRpm]
1870
+ attr_accessor :rpm
1871
+
1872
+ # A package managed by YUM. - install: `yum -y install package` - remove: `yum -
1873
+ # y remove package`
1874
+ # Corresponds to the JSON property `yum`
1875
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceYum]
1876
+ attr_accessor :yum
1877
+
1878
+ # A package managed by Zypper. - install: `zypper -y install package` - remove: `
1879
+ # zypper -y rm package`
1880
+ # Corresponds to the JSON property `zypper`
1881
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceZypper]
1882
+ attr_accessor :zypper
1883
+
1884
+ def initialize(**args)
1885
+ update!(**args)
1886
+ end
1887
+
1888
+ # Update properties of this object
1889
+ def update!(**args)
1890
+ @apt = args[:apt] if args.key?(:apt)
1891
+ @deb = args[:deb] if args.key?(:deb)
1892
+ @desired_state = args[:desired_state] if args.key?(:desired_state)
1893
+ @googet = args[:googet] if args.key?(:googet)
1894
+ @msi = args[:msi] if args.key?(:msi)
1895
+ @rpm = args[:rpm] if args.key?(:rpm)
1896
+ @yum = args[:yum] if args.key?(:yum)
1897
+ @zypper = args[:zypper] if args.key?(:zypper)
1898
+ end
1899
+ end
1900
+
1901
+ # A package managed by APT. - install: `apt-get update && apt-get -y install [
1902
+ # name]` - remove: `apt-get -y remove [name]`
1903
+ class OsPolicyResourcePackageResourceApt
1904
+ include Google::Apis::Core::Hashable
1905
+
1906
+ # Required. Package name.
1907
+ # Corresponds to the JSON property `name`
1908
+ # @return [String]
1909
+ attr_accessor :name
1910
+
1911
+ def initialize(**args)
1912
+ update!(**args)
1913
+ end
1914
+
1915
+ # Update properties of this object
1916
+ def update!(**args)
1917
+ @name = args[:name] if args.key?(:name)
1918
+ end
1919
+ end
1920
+
1921
+ # A deb package file. dpkg packages only support INSTALLED state.
1922
+ class OsPolicyResourcePackageResourceDeb
1923
+ include Google::Apis::Core::Hashable
1924
+
1925
+ # Whether dependencies should also be installed. - install when false: `dpkg -i
1926
+ # package` - install when true: `apt-get update && apt-get -y install package.
1927
+ # deb`
1928
+ # Corresponds to the JSON property `pullDeps`
1929
+ # @return [Boolean]
1930
+ attr_accessor :pull_deps
1931
+ alias_method :pull_deps?, :pull_deps
1932
+
1933
+ # A remote or local file.
1934
+ # Corresponds to the JSON property `source`
1935
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFile]
1936
+ attr_accessor :source
1937
+
1938
+ def initialize(**args)
1939
+ update!(**args)
1940
+ end
1941
+
1942
+ # Update properties of this object
1943
+ def update!(**args)
1944
+ @pull_deps = args[:pull_deps] if args.key?(:pull_deps)
1945
+ @source = args[:source] if args.key?(:source)
1946
+ end
1947
+ end
1948
+
1949
+ # A package managed by GooGet. - install: `googet -noconfirm install package` -
1950
+ # remove: `googet -noconfirm remove package`
1951
+ class OsPolicyResourcePackageResourceGooGet
1952
+ include Google::Apis::Core::Hashable
1953
+
1954
+ # Required. Package name.
1955
+ # Corresponds to the JSON property `name`
1956
+ # @return [String]
1957
+ attr_accessor :name
1958
+
1959
+ def initialize(**args)
1960
+ update!(**args)
1961
+ end
1962
+
1963
+ # Update properties of this object
1964
+ def update!(**args)
1965
+ @name = args[:name] if args.key?(:name)
1966
+ end
1967
+ end
1968
+
1969
+ # An MSI package. MSI packages only support INSTALLED state.
1970
+ class OsPolicyResourcePackageResourceMsi
1971
+ include Google::Apis::Core::Hashable
1972
+
1973
+ # Additional properties to use during installation. This should be in the format
1974
+ # of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=
1975
+ # ReallySuppress`.
1976
+ # Corresponds to the JSON property `properties`
1977
+ # @return [Array<String>]
1978
+ attr_accessor :properties
1979
+
1980
+ # A remote or local file.
1981
+ # Corresponds to the JSON property `source`
1982
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFile]
1983
+ attr_accessor :source
1984
+
1985
+ def initialize(**args)
1986
+ update!(**args)
1987
+ end
1988
+
1989
+ # Update properties of this object
1990
+ def update!(**args)
1991
+ @properties = args[:properties] if args.key?(:properties)
1992
+ @source = args[:source] if args.key?(:source)
1993
+ end
1994
+ end
1995
+
1996
+ # An RPM package file. RPM packages only support INSTALLED state.
1997
+ class OsPolicyResourcePackageResourceRpm
1998
+ include Google::Apis::Core::Hashable
1999
+
2000
+ # Whether dependencies should also be installed. - install when false: `rpm --
2001
+ # upgrade --replacepkgs package.rpm` - install when true: `yum -y install
2002
+ # package.rpm` or `zypper -y install package.rpm`
2003
+ # Corresponds to the JSON property `pullDeps`
2004
+ # @return [Boolean]
2005
+ attr_accessor :pull_deps
2006
+ alias_method :pull_deps?, :pull_deps
2007
+
2008
+ # A remote or local file.
2009
+ # Corresponds to the JSON property `source`
2010
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceFile]
2011
+ attr_accessor :source
659
2012
 
660
2013
  def initialize(**args)
661
2014
  update!(**args)
@@ -663,34 +2016,20 @@ module Google
663
2016
 
664
2017
  # Update properties of this object
665
2018
  def update!(**args)
666
- @id = args[:id] if args.key?(:id)
667
- @name = args[:name] if args.key?(:name)
2019
+ @pull_deps = args[:pull_deps] if args.key?(:pull_deps)
2020
+ @source = args[:source] if args.key?(:source)
668
2021
  end
669
2022
  end
670
2023
 
671
- # Details related to a Zypper Patch.
672
- class InventoryZypperPatch
2024
+ # A package managed by YUM. - install: `yum -y install package` - remove: `yum -
2025
+ # y remove package`
2026
+ class OsPolicyResourcePackageResourceYum
673
2027
  include Google::Apis::Core::Hashable
674
2028
 
675
- # The category of the patch.
676
- # Corresponds to the JSON property `category`
677
- # @return [String]
678
- attr_accessor :category
679
-
680
- # The name of the patch.
681
- # Corresponds to the JSON property `patchName`
682
- # @return [String]
683
- attr_accessor :patch_name
684
-
685
- # The severity specified for this patch
686
- # Corresponds to the JSON property `severity`
687
- # @return [String]
688
- attr_accessor :severity
689
-
690
- # Any summary information provided about this patch.
691
- # Corresponds to the JSON property `summary`
2029
+ # Required. Package name.
2030
+ # Corresponds to the JSON property `name`
692
2031
  # @return [String]
693
- attr_accessor :summary
2032
+ attr_accessor :name
694
2033
 
695
2034
  def initialize(**args)
696
2035
  update!(**args)
@@ -698,26 +2037,19 @@ module Google
698
2037
 
699
2038
  # Update properties of this object
700
2039
  def update!(**args)
701
- @category = args[:category] if args.key?(:category)
702
- @patch_name = args[:patch_name] if args.key?(:patch_name)
703
- @severity = args[:severity] if args.key?(:severity)
704
- @summary = args[:summary] if args.key?(:summary)
2040
+ @name = args[:name] if args.key?(:name)
705
2041
  end
706
2042
  end
707
2043
 
708
- # The response message for Operations.ListOperations.
709
- class ListOperationsResponse
2044
+ # A package managed by Zypper. - install: `zypper -y install package` - remove: `
2045
+ # zypper -y rm package`
2046
+ class OsPolicyResourcePackageResourceZypper
710
2047
  include Google::Apis::Core::Hashable
711
2048
 
712
- # The standard List next-page token.
713
- # Corresponds to the JSON property `nextPageToken`
2049
+ # Required. Package name.
2050
+ # Corresponds to the JSON property `name`
714
2051
  # @return [String]
715
- attr_accessor :next_page_token
716
-
717
- # A list of operations that matches the specified filter in the request.
718
- # Corresponds to the JSON property `operations`
719
- # @return [Array<Google::Apis::OsconfigV1::Operation>]
720
- attr_accessor :operations
2052
+ attr_accessor :name
721
2053
 
722
2054
  def initialize(**args)
723
2055
  update!(**args)
@@ -725,24 +2057,37 @@ module Google
725
2057
 
726
2058
  # Update properties of this object
727
2059
  def update!(**args)
728
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
729
- @operations = args[:operations] if args.key?(:operations)
2060
+ @name = args[:name] if args.key?(:name)
730
2061
  end
731
2062
  end
732
2063
 
733
- # A response message for listing patch deployments.
734
- class ListPatchDeploymentsResponse
2064
+ # A resource that manages a package repository.
2065
+ class OsPolicyResourceRepositoryResource
735
2066
  include Google::Apis::Core::Hashable
736
2067
 
737
- # A pagination token that can be used to get the next page of patch deployments.
738
- # Corresponds to the JSON property `nextPageToken`
739
- # @return [String]
740
- attr_accessor :next_page_token
2068
+ # Represents a single apt package repository. These will be added to a repo file
2069
+ # that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.
2070
+ # Corresponds to the JSON property `apt`
2071
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceRepositoryResourceAptRepository]
2072
+ attr_accessor :apt
741
2073
 
742
- # The list of patch deployments.
743
- # Corresponds to the JSON property `patchDeployments`
744
- # @return [Array<Google::Apis::OsconfigV1::PatchDeployment>]
745
- attr_accessor :patch_deployments
2074
+ # Represents a Goo package repository. These are added to a repo file that is
2075
+ # managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
2076
+ # Corresponds to the JSON property `goo`
2077
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceRepositoryResourceGooRepository]
2078
+ attr_accessor :goo
2079
+
2080
+ # Represents a single yum package repository. These are added to a repo file
2081
+ # that is managed at `/etc/yum.repos.d/google_osconfig.repo`.
2082
+ # Corresponds to the JSON property `yum`
2083
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceRepositoryResourceYumRepository]
2084
+ attr_accessor :yum
2085
+
2086
+ # Represents a single zypper package repository. These are added to a repo file
2087
+ # that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.
2088
+ # Corresponds to the JSON property `zypper`
2089
+ # @return [Google::Apis::OsconfigV1::OsPolicyResourceRepositoryResourceZypperRepository]
2090
+ attr_accessor :zypper
746
2091
 
747
2092
  def initialize(**args)
748
2093
  update!(**args)
@@ -750,24 +2095,44 @@ module Google
750
2095
 
751
2096
  # Update properties of this object
752
2097
  def update!(**args)
753
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
754
- @patch_deployments = args[:patch_deployments] if args.key?(:patch_deployments)
2098
+ @apt = args[:apt] if args.key?(:apt)
2099
+ @goo = args[:goo] if args.key?(:goo)
2100
+ @yum = args[:yum] if args.key?(:yum)
2101
+ @zypper = args[:zypper] if args.key?(:zypper)
755
2102
  end
756
2103
  end
757
2104
 
758
- # A response message for listing the instances details for a patch job.
759
- class ListPatchJobInstanceDetailsResponse
2105
+ # Represents a single apt package repository. These will be added to a repo file
2106
+ # that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.
2107
+ class OsPolicyResourceRepositoryResourceAptRepository
760
2108
  include Google::Apis::Core::Hashable
761
2109
 
762
- # A pagination token that can be used to get the next page of results.
763
- # Corresponds to the JSON property `nextPageToken`
2110
+ # Required. Type of archive files in this repository.
2111
+ # Corresponds to the JSON property `archiveType`
764
2112
  # @return [String]
765
- attr_accessor :next_page_token
2113
+ attr_accessor :archive_type
766
2114
 
767
- # A list of instance status.
768
- # Corresponds to the JSON property `patchJobInstanceDetails`
769
- # @return [Array<Google::Apis::OsconfigV1::PatchJobInstanceDetails>]
770
- attr_accessor :patch_job_instance_details
2115
+ # Required. List of components for this repository. Must contain at least one
2116
+ # item.
2117
+ # Corresponds to the JSON property `components`
2118
+ # @return [Array<String>]
2119
+ attr_accessor :components
2120
+
2121
+ # Required. Distribution of this repository.
2122
+ # Corresponds to the JSON property `distribution`
2123
+ # @return [String]
2124
+ attr_accessor :distribution
2125
+
2126
+ # URI of the key file for this repository. The agent maintains a keyring at `/
2127
+ # etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
2128
+ # Corresponds to the JSON property `gpgKey`
2129
+ # @return [String]
2130
+ attr_accessor :gpg_key
2131
+
2132
+ # Required. URI for this repository.
2133
+ # Corresponds to the JSON property `uri`
2134
+ # @return [String]
2135
+ attr_accessor :uri
771
2136
 
772
2137
  def initialize(**args)
773
2138
  update!(**args)
@@ -775,24 +2140,28 @@ module Google
775
2140
 
776
2141
  # Update properties of this object
777
2142
  def update!(**args)
778
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
779
- @patch_job_instance_details = args[:patch_job_instance_details] if args.key?(:patch_job_instance_details)
2143
+ @archive_type = args[:archive_type] if args.key?(:archive_type)
2144
+ @components = args[:components] if args.key?(:components)
2145
+ @distribution = args[:distribution] if args.key?(:distribution)
2146
+ @gpg_key = args[:gpg_key] if args.key?(:gpg_key)
2147
+ @uri = args[:uri] if args.key?(:uri)
780
2148
  end
781
2149
  end
782
2150
 
783
- # A response message for listing patch jobs.
784
- class ListPatchJobsResponse
2151
+ # Represents a Goo package repository. These are added to a repo file that is
2152
+ # managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
2153
+ class OsPolicyResourceRepositoryResourceGooRepository
785
2154
  include Google::Apis::Core::Hashable
786
2155
 
787
- # A pagination token that can be used to get the next page of results.
788
- # Corresponds to the JSON property `nextPageToken`
2156
+ # Required. The name of the repository.
2157
+ # Corresponds to the JSON property `name`
789
2158
  # @return [String]
790
- attr_accessor :next_page_token
2159
+ attr_accessor :name
791
2160
 
792
- # The list of patch jobs.
793
- # Corresponds to the JSON property `patchJobs`
794
- # @return [Array<Google::Apis::OsconfigV1::PatchJob>]
795
- attr_accessor :patch_jobs
2161
+ # Required. The url of the repository.
2162
+ # Corresponds to the JSON property `url`
2163
+ # @return [String]
2164
+ attr_accessor :url
796
2165
 
797
2166
  def initialize(**args)
798
2167
  update!(**args)
@@ -800,28 +2169,38 @@ module Google
800
2169
 
801
2170
  # Update properties of this object
802
2171
  def update!(**args)
803
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
804
- @patch_jobs = args[:patch_jobs] if args.key?(:patch_jobs)
2172
+ @name = args[:name] if args.key?(:name)
2173
+ @url = args[:url] if args.key?(:url)
805
2174
  end
806
2175
  end
807
2176
 
808
- # Represents a monthly schedule. An example of a valid monthly schedule is "on
809
- # the third Tuesday of the month" or "on the 15th of the month".
810
- class MonthlySchedule
2177
+ # Represents a single yum package repository. These are added to a repo file
2178
+ # that is managed at `/etc/yum.repos.d/google_osconfig.repo`.
2179
+ class OsPolicyResourceRepositoryResourceYumRepository
811
2180
  include Google::Apis::Core::Hashable
812
2181
 
813
- # Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
814
- # indicates the last day of the month. Months without the target day will be
815
- # skipped. For example, a schedule to run "every month on the 31st" will not run
816
- # in February, April, June, etc.
817
- # Corresponds to the JSON property `monthDay`
818
- # @return [Fixnum]
819
- attr_accessor :month_day
2182
+ # Required. The location of the repository directory.
2183
+ # Corresponds to the JSON property `baseUrl`
2184
+ # @return [String]
2185
+ attr_accessor :base_url
820
2186
 
821
- # Represents one week day in a month. An example is "the 4th Sunday".
822
- # Corresponds to the JSON property `weekDayOfMonth`
823
- # @return [Google::Apis::OsconfigV1::WeekDayOfMonth]
824
- attr_accessor :week_day_of_month
2187
+ # The display name of the repository.
2188
+ # Corresponds to the JSON property `displayName`
2189
+ # @return [String]
2190
+ attr_accessor :display_name
2191
+
2192
+ # URIs of GPG keys.
2193
+ # Corresponds to the JSON property `gpgKeys`
2194
+ # @return [Array<String>]
2195
+ attr_accessor :gpg_keys
2196
+
2197
+ # Required. A one word, unique name for this repository. This is the `repo id`
2198
+ # in the yum config file and also the `display_name` if `display_name` is
2199
+ # omitted. This id is also used as the unique identifier when checking for
2200
+ # resource conflicts.
2201
+ # Corresponds to the JSON property `id`
2202
+ # @return [String]
2203
+ attr_accessor :id
825
2204
 
826
2205
  def initialize(**args)
827
2206
  update!(**args)
@@ -829,42 +2208,40 @@ module Google
829
2208
 
830
2209
  # Update properties of this object
831
2210
  def update!(**args)
832
- @month_day = args[:month_day] if args.key?(:month_day)
833
- @week_day_of_month = args[:week_day_of_month] if args.key?(:week_day_of_month)
2211
+ @base_url = args[:base_url] if args.key?(:base_url)
2212
+ @display_name = args[:display_name] if args.key?(:display_name)
2213
+ @gpg_keys = args[:gpg_keys] if args.key?(:gpg_keys)
2214
+ @id = args[:id] if args.key?(:id)
834
2215
  end
835
2216
  end
836
2217
 
837
- # OS policy assignment operation metadata provided by OS policy assignment API
838
- # methods that return long running operations.
839
- class OsPolicyAssignmentOperationMetadata
2218
+ # Represents a single zypper package repository. These are added to a repo file
2219
+ # that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.
2220
+ class OsPolicyResourceRepositoryResourceZypperRepository
840
2221
  include Google::Apis::Core::Hashable
841
2222
 
842
- # The OS policy assignment API method.
843
- # Corresponds to the JSON property `apiMethod`
844
- # @return [String]
845
- attr_accessor :api_method
846
-
847
- # Reference to the `OSPolicyAssignment` API resource. Format: `projects/`
848
- # project_number`/locations/`location`/osPolicyAssignments/`
849
- # os_policy_assignment_id@revision_id``
850
- # Corresponds to the JSON property `osPolicyAssignment`
2223
+ # Required. The location of the repository directory.
2224
+ # Corresponds to the JSON property `baseUrl`
851
2225
  # @return [String]
852
- attr_accessor :os_policy_assignment
2226
+ attr_accessor :base_url
853
2227
 
854
- # Rollout start time
855
- # Corresponds to the JSON property `rolloutStartTime`
2228
+ # The display name of the repository.
2229
+ # Corresponds to the JSON property `displayName`
856
2230
  # @return [String]
857
- attr_accessor :rollout_start_time
2231
+ attr_accessor :display_name
858
2232
 
859
- # State of the rollout
860
- # Corresponds to the JSON property `rolloutState`
861
- # @return [String]
862
- attr_accessor :rollout_state
2233
+ # URIs of GPG keys.
2234
+ # Corresponds to the JSON property `gpgKeys`
2235
+ # @return [Array<String>]
2236
+ attr_accessor :gpg_keys
863
2237
 
864
- # Rollout update time
865
- # Corresponds to the JSON property `rolloutUpdateTime`
2238
+ # Required. A one word, unique name for this repository. This is the `repo id`
2239
+ # in the zypper config file and also the `display_name` if `display_name` is
2240
+ # omitted. This id is also used as the unique identifier when checking for
2241
+ # GuestPolicy conflicts.
2242
+ # Corresponds to the JSON property `id`
866
2243
  # @return [String]
867
- attr_accessor :rollout_update_time
2244
+ attr_accessor :id
868
2245
 
869
2246
  def initialize(**args)
870
2247
  update!(**args)
@@ -872,11 +2249,10 @@ module Google
872
2249
 
873
2250
  # Update properties of this object
874
2251
  def update!(**args)
875
- @api_method = args[:api_method] if args.key?(:api_method)
876
- @os_policy_assignment = args[:os_policy_assignment] if args.key?(:os_policy_assignment)
877
- @rollout_start_time = args[:rollout_start_time] if args.key?(:rollout_start_time)
878
- @rollout_state = args[:rollout_state] if args.key?(:rollout_state)
879
- @rollout_update_time = args[:rollout_update_time] if args.key?(:rollout_update_time)
2252
+ @base_url = args[:base_url] if args.key?(:base_url)
2253
+ @display_name = args[:display_name] if args.key?(:display_name)
2254
+ @gpg_keys = args[:gpg_keys] if args.key?(:gpg_keys)
2255
+ @id = args[:id] if args.key?(:id)
880
2256
  end
881
2257
  end
882
2258
 
@@ -1682,6 +3058,173 @@ module Google
1682
3058
  end
1683
3059
  end
1684
3060
 
3061
+ # This API resource represents the vulnerability report for a specified Compute
3062
+ # Engine virtual machine (VM) instance at a given point in time. For more
3063
+ # information, see [Vulnerability reports](https://cloud.google.com/compute/docs/
3064
+ # instances/os-inventory-management#vulnerability-reports).
3065
+ class VulnerabilityReport
3066
+ include Google::Apis::Core::Hashable
3067
+
3068
+ # Output only. The `vulnerabilityReport` API resource name. Format: `projects/`
3069
+ # project_number`/locations/`location`/instances/`instance_id`/
3070
+ # vulnerabilityReport`
3071
+ # Corresponds to the JSON property `name`
3072
+ # @return [String]
3073
+ attr_accessor :name
3074
+
3075
+ # Output only. The timestamp for when the last vulnerability report was
3076
+ # generated for the VM.
3077
+ # Corresponds to the JSON property `updateTime`
3078
+ # @return [String]
3079
+ attr_accessor :update_time
3080
+
3081
+ # Output only. List of vulnerabilities affecting the VM.
3082
+ # Corresponds to the JSON property `vulnerabilities`
3083
+ # @return [Array<Google::Apis::OsconfigV1::VulnerabilityReportVulnerability>]
3084
+ attr_accessor :vulnerabilities
3085
+
3086
+ def initialize(**args)
3087
+ update!(**args)
3088
+ end
3089
+
3090
+ # Update properties of this object
3091
+ def update!(**args)
3092
+ @name = args[:name] if args.key?(:name)
3093
+ @update_time = args[:update_time] if args.key?(:update_time)
3094
+ @vulnerabilities = args[:vulnerabilities] if args.key?(:vulnerabilities)
3095
+ end
3096
+ end
3097
+
3098
+ # A vulnerability affecting the VM instance.
3099
+ class VulnerabilityReportVulnerability
3100
+ include Google::Apis::Core::Hashable
3101
+
3102
+ # Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the
3103
+ # vulnerability report was not updated after the VM inventory update, these
3104
+ # values might not display in VM inventory. If there is no available fix, the
3105
+ # field is empty. The `inventory_item` value specifies the latest `
3106
+ # SoftwarePackage` available to the VM that fixes the vulnerability.
3107
+ # Corresponds to the JSON property `availableInventoryItemIds`
3108
+ # @return [Array<String>]
3109
+ attr_accessor :available_inventory_item_ids
3110
+
3111
+ # The timestamp for when the vulnerability was first detected.
3112
+ # Corresponds to the JSON property `createTime`
3113
+ # @return [String]
3114
+ attr_accessor :create_time
3115
+
3116
+ # Contains metadata information for the vulnerability. This information is
3117
+ # collected from the upstream feed of the operating system.
3118
+ # Corresponds to the JSON property `details`
3119
+ # @return [Google::Apis::OsconfigV1::VulnerabilityReportVulnerabilityDetails]
3120
+ attr_accessor :details
3121
+
3122
+ # Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field
3123
+ # displays the inventory items affected by this vulnerability. If the
3124
+ # vulnerability report was not updated after the VM inventory update, these
3125
+ # values might not display in VM inventory. For some distros, this field may be
3126
+ # empty.
3127
+ # Corresponds to the JSON property `installedInventoryItemIds`
3128
+ # @return [Array<String>]
3129
+ attr_accessor :installed_inventory_item_ids
3130
+
3131
+ # The timestamp for when the vulnerability was last modified.
3132
+ # Corresponds to the JSON property `updateTime`
3133
+ # @return [String]
3134
+ attr_accessor :update_time
3135
+
3136
+ def initialize(**args)
3137
+ update!(**args)
3138
+ end
3139
+
3140
+ # Update properties of this object
3141
+ def update!(**args)
3142
+ @available_inventory_item_ids = args[:available_inventory_item_ids] if args.key?(:available_inventory_item_ids)
3143
+ @create_time = args[:create_time] if args.key?(:create_time)
3144
+ @details = args[:details] if args.key?(:details)
3145
+ @installed_inventory_item_ids = args[:installed_inventory_item_ids] if args.key?(:installed_inventory_item_ids)
3146
+ @update_time = args[:update_time] if args.key?(:update_time)
3147
+ end
3148
+ end
3149
+
3150
+ # Contains metadata information for the vulnerability. This information is
3151
+ # collected from the upstream feed of the operating system.
3152
+ class VulnerabilityReportVulnerabilityDetails
3153
+ include Google::Apis::Core::Hashable
3154
+
3155
+ # The CVE of the vulnerability. CVE cannot be empty and the combination of
3156
+ # should be unique across vulnerabilities for a VM.
3157
+ # Corresponds to the JSON property `cve`
3158
+ # @return [String]
3159
+ attr_accessor :cve
3160
+
3161
+ # The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of 0 - 10
3162
+ # where 0 indicates low severity and 10 indicates high severity.
3163
+ # Corresponds to the JSON property `cvssV2Score`
3164
+ # @return [Float]
3165
+ attr_accessor :cvss_v2_score
3166
+
3167
+ # Common Vulnerability Scoring System version 3. For details, see https://www.
3168
+ # first.org/cvss/specification-document
3169
+ # Corresponds to the JSON property `cvssV3`
3170
+ # @return [Google::Apis::OsconfigV1::CvsSv3]
3171
+ attr_accessor :cvss_v3
3172
+
3173
+ # The note or description describing the vulnerability from the distro.
3174
+ # Corresponds to the JSON property `description`
3175
+ # @return [String]
3176
+ attr_accessor :description
3177
+
3178
+ # Corresponds to the references attached to the `VulnerabilityDetails`.
3179
+ # Corresponds to the JSON property `references`
3180
+ # @return [Array<Google::Apis::OsconfigV1::VulnerabilityReportVulnerabilityDetailsReference>]
3181
+ attr_accessor :references
3182
+
3183
+ # Assigned severity/impact ranking from the distro.
3184
+ # Corresponds to the JSON property `severity`
3185
+ # @return [String]
3186
+ attr_accessor :severity
3187
+
3188
+ def initialize(**args)
3189
+ update!(**args)
3190
+ end
3191
+
3192
+ # Update properties of this object
3193
+ def update!(**args)
3194
+ @cve = args[:cve] if args.key?(:cve)
3195
+ @cvss_v2_score = args[:cvss_v2_score] if args.key?(:cvss_v2_score)
3196
+ @cvss_v3 = args[:cvss_v3] if args.key?(:cvss_v3)
3197
+ @description = args[:description] if args.key?(:description)
3198
+ @references = args[:references] if args.key?(:references)
3199
+ @severity = args[:severity] if args.key?(:severity)
3200
+ end
3201
+ end
3202
+
3203
+ # A reference for this vulnerability.
3204
+ class VulnerabilityReportVulnerabilityDetailsReference
3205
+ include Google::Apis::Core::Hashable
3206
+
3207
+ # The source of the reference e.g. NVD.
3208
+ # Corresponds to the JSON property `source`
3209
+ # @return [String]
3210
+ attr_accessor :source
3211
+
3212
+ # The url of the reference.
3213
+ # Corresponds to the JSON property `url`
3214
+ # @return [String]
3215
+ attr_accessor :url
3216
+
3217
+ def initialize(**args)
3218
+ update!(**args)
3219
+ end
3220
+
3221
+ # Update properties of this object
3222
+ def update!(**args)
3223
+ @source = args[:source] if args.key?(:source)
3224
+ @url = args[:url] if args.key?(:url)
3225
+ end
3226
+ end
3227
+
1685
3228
  # Represents one week day in a month. An example is "the 4th Sunday".
1686
3229
  class WeekDayOfMonth
1687
3230
  include Google::Apis::Core::Hashable