Class: Google::Apis::ContentV2::DatafeedFetchSchedule

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

Overview

The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DatafeedFetchSchedule

Returns a new instance of DatafeedFetchSchedule



1230
1231
1232
# File 'generated/google/apis/content_v2/classes.rb', line 1230

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

Instance Attribute Details

#day_of_monthFixnum

The day of the month the feed file should be fetched (1-31). Corresponds to the JSON property dayOfMonth

Returns:

  • (Fixnum)


1184
1185
1186
# File 'generated/google/apis/content_v2/classes.rb', line 1184

def day_of_month
  @day_of_month
end

#fetch_urlString

The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols. Corresponds to the JSON property fetchUrl

Returns:

  • (String)


1192
1193
1194
# File 'generated/google/apis/content_v2/classes.rb', line 1192

def fetch_url
  @fetch_url
end

#hourFixnum

The hour of the day the feed file should be fetched (0-23). Corresponds to the JSON property hour

Returns:

  • (Fixnum)


1197
1198
1199
# File 'generated/google/apis/content_v2/classes.rb', line 1197

def hour
  @hour
end

#minute_of_hourFixnum

The minute of the hour the feed file should be fetched (0-59). Read-only. Corresponds to the JSON property minuteOfHour

Returns:

  • (Fixnum)


1202
1203
1204
# File 'generated/google/apis/content_v2/classes.rb', line 1202

def minute_of_hour
  @minute_of_hour
end

#passwordString

An optional password for fetch_url. Corresponds to the JSON property password

Returns:

  • (String)


1207
1208
1209
# File 'generated/google/apis/content_v2/classes.rb', line 1207

def password
  @password
end

#pausedBoolean Also known as: paused?

Whether the scheduled fetch is paused or not. Corresponds to the JSON property paused

Returns:

  • (Boolean)


1212
1213
1214
# File 'generated/google/apis/content_v2/classes.rb', line 1212

def paused
  @paused
end

#time_zoneString

Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". Corresponds to the JSON property timeZone

Returns:

  • (String)


1218
1219
1220
# File 'generated/google/apis/content_v2/classes.rb', line 1218

def time_zone
  @time_zone
end

#usernameString

An optional user name for fetch_url. Corresponds to the JSON property username

Returns:

  • (String)


1223
1224
1225
# File 'generated/google/apis/content_v2/classes.rb', line 1223

def username
  @username
end

#weekdayString

The day of the week the feed file should be fetched. Corresponds to the JSON property weekday

Returns:

  • (String)


1228
1229
1230
# File 'generated/google/apis/content_v2/classes.rb', line 1228

def weekday
  @weekday
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
# File 'generated/google/apis/content_v2/classes.rb', line 1235

def update!(**args)
  @day_of_month = args[:day_of_month] if args.key?(:day_of_month)
  @fetch_url = args[:fetch_url] if args.key?(:fetch_url)
  @hour = args[:hour] if args.key?(:hour)
  @minute_of_hour = args[:minute_of_hour] if args.key?(:minute_of_hour)
  @password = args[:password] if args.key?(:password)
  @paused = args[:paused] if args.key?(:paused)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @username = args[:username] if args.key?(:username)
  @weekday = args[:weekday] if args.key?(:weekday)
end