Class: Google::Apis::FileV1::MaintenancePolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/file_v1/classes.rb,
lib/google/apis/file_v1/representations.rb,
lib/google/apis/file_v1/representations.rb

Overview

Defines policies to service maintenance events.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MaintenancePolicy

Returns a new instance of MaintenancePolicy.



1173
1174
1175
# File 'lib/google/apis/file_v1/classes.rb', line 1173

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_timeString

Output only. The time when the resource was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1134
1135
1136
# File 'lib/google/apis/file_v1/classes.rb', line 1134

def create_time
  @create_time
end

#descriptionString

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512. Corresponds to the JSON property description

Returns:

  • (String)


1140
1141
1142
# File 'lib/google/apis/file_v1/classes.rb', line 1140

def description
  @description
end

#labelsHash<String,String>

Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1147
1148
1149
# File 'lib/google/apis/file_v1/classes.rb', line 1147

def labels
  @labels
end

#nameString

Required. MaintenancePolicy name using the form: projects/project_id/ locations/location_id/maintenancePolicies/maintenance_policy_id`where project_idrefers to a GCP consumer project ID,location_idrefers to a GCP region/zone,maintenance_policy_idmust be 1-63 characters long and match the regular expressiona-z0-9?. Corresponds to the JSON propertyname`

Returns:

  • (String)


1156
1157
1158
# File 'lib/google/apis/file_v1/classes.rb', line 1156

def name
  @name
end

#stateString

Optional. The state of the policy. Corresponds to the JSON property state

Returns:

  • (String)


1161
1162
1163
# File 'lib/google/apis/file_v1/classes.rb', line 1161

def state
  @state
end

#update_policyGoogle::Apis::FileV1::UpdatePolicy

Maintenance policy applicable to instance updates. Corresponds to the JSON property updatePolicy



1166
1167
1168
# File 'lib/google/apis/file_v1/classes.rb', line 1166

def update_policy
  @update_policy
end

#update_timeString

Output only. The time when the resource was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


1171
1172
1173
# File 'lib/google/apis/file_v1/classes.rb', line 1171

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1178
1179
1180
1181
1182
1183
1184
1185
1186
# File 'lib/google/apis/file_v1/classes.rb', line 1178

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @update_policy = args[:update_policy] if args.key?(:update_policy)
  @update_time = args[:update_time] if args.key?(:update_time)
end