Class: Google::Apis::CloudfunctionsV2alpha::Function

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

Overview

Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Function

Returns a new instance of Function.



496
497
498
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 496

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

Instance Attribute Details

#build_configGoogle::Apis::CloudfunctionsV2alpha::BuildConfig

Describes the Build step of the function that builds a container from the given source. Corresponds to the JSON property buildConfig



447
448
449
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 447

def build_config
  @build_config
end

#descriptionString

User-provided description of a function. Corresponds to the JSON property description

Returns:

  • (String)


452
453
454
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 452

def description
  @description
end

#environmentString

Describe whether the function is gen1 or gen2. Corresponds to the JSON property environment

Returns:

  • (String)


457
458
459
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 457

def environment
  @environment
end

#event_triggerGoogle::Apis::CloudfunctionsV2alpha::EventTrigger

Describes EventTrigger, used to request events to be sent from another service. Corresponds to the JSON property eventTrigger



462
463
464
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 462

def event_trigger
  @event_trigger
end

#labelsHash<String,String>

Labels associated with this Cloud Function. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


467
468
469
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 467

def labels
  @labels
end

#nameString

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/* Corresponds to the JSON property name

Returns:

  • (String)


473
474
475
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 473

def name
  @name
end

#service_configGoogle::Apis::CloudfunctionsV2alpha::ServiceConfig

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed). Next tag: 23 Corresponds to the JSON property serviceConfig



479
480
481
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 479

def service_config
  @service_config
end

#stateString

Output only. State of the function. Corresponds to the JSON property state

Returns:

  • (String)


484
485
486
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 484

def state
  @state
end

#state_messagesArray<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStateMessage>

Output only. State Messages for this Cloud Function. Corresponds to the JSON property stateMessages



489
490
491
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 489

def state_messages
  @state_messages
end

#update_timeString

Output only. The last update timestamp of a Cloud Function. Corresponds to the JSON property updateTime

Returns:

  • (String)


494
495
496
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 494

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



501
502
503
504
505
506
507
508
509
510
511
512
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 501

def update!(**args)
  @build_config = args[:build_config] if args.key?(:build_config)
  @description = args[:description] if args.key?(:description)
  @environment = args[:environment] if args.key?(:environment)
  @event_trigger = args[:event_trigger] if args.key?(:event_trigger)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @service_config = args[:service_config] if args.key?(:service_config)
  @state = args[:state] if args.key?(:state)
  @state_messages = args[:state_messages] if args.key?(:state_messages)
  @update_time = args[:update_time] if args.key?(:update_time)
end