Class: Google::Apis::DriveV2::Channel

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

Overview

A notification channel used to watch for resource changes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Channel

Returns a new instance of Channel.



927
928
929
# File 'lib/google/apis/drive_v2/classes.rb', line 927

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

Instance Attribute Details

#addressString

The address where notifications are delivered for this channel. Corresponds to the JSON property address

Returns:

  • (String)


874
875
876
# File 'lib/google/apis/drive_v2/classes.rb', line 874

def address
  @address
end

#expirationFixnum

Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. Corresponds to the JSON property expiration

Returns:

  • (Fixnum)


880
881
882
# File 'lib/google/apis/drive_v2/classes.rb', line 880

def expiration
  @expiration
end

#idString

A UUID or similar unique string that identifies this channel. Corresponds to the JSON property id

Returns:

  • (String)


885
886
887
# File 'lib/google/apis/drive_v2/classes.rb', line 885

def id
  @id
end

#kindString

Identifies this as a notification channel used to watch for changes to a resource, which is api#channel. Corresponds to the JSON property kind

Returns:

  • (String)


891
892
893
# File 'lib/google/apis/drive_v2/classes.rb', line 891

def kind
  @kind
end

#paramsHash<String,String>

Additional parameters controlling delivery channel behavior. Optional. Corresponds to the JSON property params

Returns:

  • (Hash<String,String>)


896
897
898
# File 'lib/google/apis/drive_v2/classes.rb', line 896

def params
  @params
end

#payloadBoolean Also known as: payload?

A Boolean value to indicate whether payload is wanted. Optional. Corresponds to the JSON property payload

Returns:

  • (Boolean)


901
902
903
# File 'lib/google/apis/drive_v2/classes.rb', line 901

def payload
  @payload
end

#resource_idString

An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. Corresponds to the JSON property resourceId

Returns:

  • (String)


908
909
910
# File 'lib/google/apis/drive_v2/classes.rb', line 908

def resource_id
  @resource_id
end

#resource_uriString

A version-specific identifier for the watched resource. Corresponds to the JSON property resourceUri

Returns:

  • (String)


913
914
915
# File 'lib/google/apis/drive_v2/classes.rb', line 913

def resource_uri
  @resource_uri
end

#tokenString

An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. Corresponds to the JSON property token

Returns:

  • (String)


919
920
921
# File 'lib/google/apis/drive_v2/classes.rb', line 919

def token
  @token
end

#typeString

The type of delivery mechanism used for this channel. Valid values are " web_hook" or "webhook". Corresponds to the JSON property type

Returns:

  • (String)


925
926
927
# File 'lib/google/apis/drive_v2/classes.rb', line 925

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



932
933
934
935
936
937
938
939
940
941
942
943
# File 'lib/google/apis/drive_v2/classes.rb', line 932

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @expiration = args[:expiration] if args.key?(:expiration)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @params = args[:params] if args.key?(:params)
  @payload = args[:payload] if args.key?(:payload)
  @resource_id = args[:resource_id] if args.key?(:resource_id)
  @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
  @token = args[:token] if args.key?(:token)
  @type = args[:type] if args.key?(:type)
end