Class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction

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

Overview

A restriction in the App Restriction Schema represents a piece of configuration that may be pre-applied.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AppRestrictionsSchemaRestriction

Returns a new instance of AppRestrictionsSchemaRestriction.


209
210
211
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 209

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

Instance Attribute Details

#default_valueGoogle::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue

A typed value for the restriction. Corresponds to the JSON property defaultValue


165
166
167
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 165

def default_value
  @default_value
end

#descriptionString

A longer description of the restriction, giving more detail of what it affects. Corresponds to the JSON property description

Returns:

  • (String)

170
171
172
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 170

def description
  @description
end

#entryArray<String>

For choice or multiselect restrictions, the list of possible entries' human- readable names. Corresponds to the JSON property entry

Returns:

  • (Array<String>)

176
177
178
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 176

def entry
  @entry
end

#entry_valueArray<String>

For choice or multiselect restrictions, the list of possible entries' machine- readable values. These values should be used in the configuration, either as a single string value for a choice restriction or in a stringArray for a multiselect restriction. Corresponds to the JSON property entryValue

Returns:

  • (Array<String>)

184
185
186
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 184

def entry_value
  @entry_value
end

#keyString

The unique key that the product uses to identify the restriction, e.g. "com. google.android.gm.fieldname". Corresponds to the JSON property key

Returns:

  • (String)

190
191
192
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 190

def key
  @key
end

#nested_restrictionArray<Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction>

For bundle or bundleArray restrictions, the list of nested restrictions. A bundle restriction is always nested within a bundleArray restriction, and a bundleArray restriction is at most two levels deep. Corresponds to the JSON property nestedRestriction


197
198
199
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 197

def nested_restriction
  @nested_restriction
end

#restriction_typeString

The type of the restriction. Corresponds to the JSON property restrictionType

Returns:

  • (String)

202
203
204
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 202

def restriction_type
  @restriction_type
end

#titleString

The name of the restriction. Corresponds to the JSON property title

Returns:

  • (String)

207
208
209
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 207

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


214
215
216
217
218
219
220
221
222
223
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 214

def update!(**args)
  @default_value = args[:default_value] if args.key?(:default_value)
  @description = args[:description] if args.key?(:description)
  @entry = args[:entry] if args.key?(:entry)
  @entry_value = args[:entry_value] if args.key?(:entry_value)
  @key = args[:key] if args.key?(:key)
  @nested_restriction = args[:nested_restriction] if args.key?(:nested_restriction)
  @restriction_type = args[:restriction_type] if args.key?(:restriction_type)
  @title = args[:title] if args.key?(:title)
end