Module: Google::Ads::GoogleAds::Factories::V17::Operations::UpdateResource

Defined in:
lib/google/ads/google_ads/factories/v17/operations.rb

Class Method Summary collapse

Class Method Details

A convenience method for creating an AccountLinkOperation instance with its “update” field prepopulated with an AccountLink instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3660

def self.(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/account_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AccountLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AccountLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AccountLink === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AccountLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Ad| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdOperation

A convenience method for creating an AdOperation instance with its “update” field prepopulated with an Ad instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4011

def self.ad(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Ad
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Ad.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Ad === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroup| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupOperation

A convenience method for creating an AdGroupOperation instance with its “update” field prepopulated with an AdGroup instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3933

def self.ad_group(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroup === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroupAd| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupAdOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupAdOperation

A convenience method for creating an AdGroupAdOperation instance with its “update” field prepopulated with an AdGroupAd instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3699

def self.ad_group_ad(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_ad_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroupAd
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroupAd.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroupAd === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupAdOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroupAsset| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupAssetOperation

A convenience method for creating an AdGroupAssetOperation instance with its “update” field prepopulated with an AdGroupAsset instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3738

def self.ad_group_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroupAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroupAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroupAsset === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroupBidModifier| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupBidModifierOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupBidModifierOperation

A convenience method for creating an AdGroupBidModifierOperation instance with its “update” field prepopulated with an AdGroupBidModifier instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3777

def self.ad_group_bid_modifier(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_bid_modifier_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroupBidModifier
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroupBidModifier.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroupBidModifier === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupBidModifierOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroupCriterion| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupCriterionOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupCriterionOperation

A convenience method for creating an AdGroupCriterionOperation instance with its “update” field prepopulated with an AdGroupCriterion instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3816

def self.ad_group_criterion(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_criterion_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroupCriterion
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroupCriterion.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroupCriterion === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupCriterionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroupExtensionSetting| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupExtensionSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupExtensionSettingOperation

A convenience method for creating an AdGroupExtensionSettingOperation instance with its “update” field prepopulated with an AdGroupExtensionSetting instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3855

def self.ad_group_extension_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_extension_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroupExtensionSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroupExtensionSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroupExtensionSetting === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupExtensionSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdGroupFeed| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupFeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdGroupFeedOperation

A convenience method for creating an AdGroupFeedOperation instance with its “update” field prepopulated with an AdGroupFeed instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3894

def self.ad_group_feed(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_group_feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdGroupFeed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdGroupFeed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdGroupFeed === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdGroupFeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AdParameter| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdParameterOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AdParameterOperation

A convenience method for creating an AdParameterOperation instance with its “update” field prepopulated with an AdParameter instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 3972

def self.ad_parameter(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/ad_parameter_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AdParameter
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AdParameter.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AdParameter === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AdParameterOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Asset| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetOperation

A convenience method for creating an AssetOperation instance with its “update” field prepopulated with an Asset instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4167

def self.asset(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Asset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Asset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Asset === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AssetGroup| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetGroupOperation

A convenience method for creating an AssetGroupOperation instance with its “update” field prepopulated with an AssetGroup instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4128

def self.asset_group(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/asset_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AssetGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AssetGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AssetGroup === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AssetGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AssetGroupAsset| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetGroupAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetGroupAssetOperation

A convenience method for creating an AssetGroupAssetOperation instance with its “update” field prepopulated with an AssetGroupAsset instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4050

def self.asset_group_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/asset_group_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AssetGroupAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AssetGroupAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AssetGroupAsset === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AssetGroupAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AssetGroupListingGroupFilter| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetGroupListingGroupFilterOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetGroupListingGroupFilterOperation

A convenience method for creating an AssetGroupListingGroupFilterOperation instance with its “update” field prepopulated with an AssetGroupListingGroupFilter instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4089

def self.asset_group_listing_group_filter(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/asset_group_listing_group_filter_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AssetGroupListingGroupFilter
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AssetGroupListingGroupFilter.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AssetGroupListingGroupFilter === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AssetGroupListingGroupFilterOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::AssetSet| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AssetSetOperation

A convenience method for creating an AssetSetOperation instance with its “update” field prepopulated with an AssetSet instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4206

def self.asset_set(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/asset_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::AssetSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::AssetSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::AssetSet === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AssetSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Audience| ... } ⇒ Google::Ads::GoogleAds::V17::Services::AudienceOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::AudienceOperation

A convenience method for creating an AudienceOperation instance with its “update” field prepopulated with an Audience instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4245

def self.audience(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/audience_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Audience
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Audience.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Audience === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::AudienceOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::BiddingDataExclusion| ... } ⇒ Google::Ads::GoogleAds::V17::Services::BiddingDataExclusionOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::BiddingDataExclusionOperation

A convenience method for creating an BiddingDataExclusionOperation instance with its “update” field prepopulated with an BiddingDataExclusion instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4284

def self.bidding_data_exclusion(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/bidding_data_exclusion_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::BiddingDataExclusion
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::BiddingDataExclusion.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::BiddingDataExclusion === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::BiddingDataExclusionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::BiddingSeasonalityAdjustment| ... } ⇒ Google::Ads::GoogleAds::V17::Services::BiddingSeasonalityAdjustmentOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::BiddingSeasonalityAdjustmentOperation

A convenience method for creating an BiddingSeasonalityAdjustmentOperation instance with its “update” field prepopulated with an BiddingSeasonalityAdjustment instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4323

def self.bidding_seasonality_adjustment(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/bidding_seasonality_adjustment_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::BiddingSeasonalityAdjustment
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::BiddingSeasonalityAdjustment.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::BiddingSeasonalityAdjustment === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::BiddingSeasonalityAdjustmentOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::BiddingStrategy| ... } ⇒ Google::Ads::GoogleAds::V17::Services::BiddingStrategyOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::BiddingStrategyOperation

A convenience method for creating an BiddingStrategyOperation instance with its “update” field prepopulated with an BiddingStrategy instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4362

def self.bidding_strategy(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/bidding_strategy_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::BiddingStrategy
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::BiddingStrategy.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::BiddingStrategy === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::BiddingStrategyOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Campaign| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignOperation

A convenience method for creating an CampaignOperation instance with its “update” field prepopulated with an Campaign instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4752

def self.campaign(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Campaign
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Campaign.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Campaign === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignAsset| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignAssetOperation

A convenience method for creating an CampaignAssetOperation instance with its “update” field prepopulated with an CampaignAsset instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4401

def self.campaign_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignAsset === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignBidModifier| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignBidModifierOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignBidModifierOperation

A convenience method for creating an CampaignBidModifierOperation instance with its “update” field prepopulated with an CampaignBidModifier instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4440

def self.campaign_bid_modifier(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_bid_modifier_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignBidModifier
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignBidModifier.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignBidModifier === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignBidModifierOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignBudget| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignBudgetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignBudgetOperation

A convenience method for creating an CampaignBudgetOperation instance with its “update” field prepopulated with an CampaignBudget instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4479

def self.campaign_budget(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_budget_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignBudget
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignBudget.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignBudget === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignBudgetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignConversionGoal| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignConversionGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignConversionGoalOperation

A convenience method for creating an CampaignConversionGoalOperation instance with its “update” field prepopulated with an CampaignConversionGoal instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4518

def self.campaign_conversion_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_conversion_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignConversionGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignConversionGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignConversionGoal === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignConversionGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignCriterion| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignCriterionOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignCriterionOperation

A convenience method for creating an CampaignCriterionOperation instance with its “update” field prepopulated with an CampaignCriterion instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4557

def self.campaign_criterion(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_criterion_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignCriterion
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignCriterion.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignCriterion === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignCriterionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignDraft| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignDraftOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignDraftOperation

A convenience method for creating an CampaignDraftOperation instance with its “update” field prepopulated with an CampaignDraft instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4596

def self.campaign_draft(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_draft_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignDraft
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignDraft.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignDraft === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignDraftOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignExtensionSetting| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignExtensionSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignExtensionSettingOperation

A convenience method for creating an CampaignExtensionSettingOperation instance with its “update” field prepopulated with an CampaignExtensionSetting instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4635

def self.campaign_extension_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_extension_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignExtensionSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignExtensionSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignExtensionSetting === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignExtensionSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignFeed| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignFeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignFeedOperation

A convenience method for creating an CampaignFeedOperation instance with its “update” field prepopulated with an CampaignFeed instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4674

def self.campaign_feed(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignFeed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignFeed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignFeed === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignFeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignGroup| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignGroupOperation

A convenience method for creating an CampaignGroupOperation instance with its “update” field prepopulated with an CampaignGroup instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4713

def self.campaign_group(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignGroup === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CampaignLifecycleGoal| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignLifecycleGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CampaignLifecycleGoalOperation

A convenience method for creating an CampaignLifecycleGoalOperation instance with its “update” field prepopulated with an CampaignLifecycleGoal instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5883

def self.campaign_lifecycle_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/campaign_lifecycle_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CampaignLifecycleGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CampaignLifecycleGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CampaignLifecycleGoal === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CampaignLifecycleGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ConversionAction| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionActionOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionActionOperation

A convenience method for creating an ConversionActionOperation instance with its “update” field prepopulated with an ConversionAction instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4791

def self.conversion_action(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/conversion_action_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ConversionAction
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ConversionAction.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ConversionAction === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ConversionActionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ConversionCustomVariable| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionCustomVariableOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionCustomVariableOperation

A convenience method for creating an ConversionCustomVariableOperation instance with its “update” field prepopulated with an ConversionCustomVariable instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4830

def self.conversion_custom_variable(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/conversion_custom_variable_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ConversionCustomVariable
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ConversionCustomVariable.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ConversionCustomVariable === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ConversionCustomVariableOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ConversionGoalCampaignConfig| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionGoalCampaignConfigOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionGoalCampaignConfigOperation

A convenience method for creating an ConversionGoalCampaignConfigOperation instance with its “update” field prepopulated with an ConversionGoalCampaignConfig instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4869

def self.conversion_goal_campaign_config(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/conversion_goal_campaign_config_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ConversionGoalCampaignConfig
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ConversionGoalCampaignConfig.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ConversionGoalCampaignConfig === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ConversionGoalCampaignConfigOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ConversionValueRule| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionValueRuleOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionValueRuleOperation

A convenience method for creating an ConversionValueRuleOperation instance with its “update” field prepopulated with an ConversionValueRule instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4908

def self.conversion_value_rule(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/conversion_value_rule_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ConversionValueRule
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ConversionValueRule.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ConversionValueRule === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ConversionValueRuleOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ConversionValueRuleSet| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionValueRuleSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ConversionValueRuleSetOperation

A convenience method for creating an ConversionValueRuleSetOperation instance with its “update” field prepopulated with an ConversionValueRuleSet instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4947

def self.conversion_value_rule_set(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/conversion_value_rule_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ConversionValueRuleSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ConversionValueRuleSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ConversionValueRuleSet === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ConversionValueRuleSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomAudience| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomAudienceOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomAudienceOperation

A convenience method for creating an CustomAudienceOperation instance with its “update” field prepopulated with an CustomAudience instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5922

def self.custom_audience(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/custom_audience_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomAudience
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomAudience.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomAudience === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomAudienceOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomConversionGoal| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomConversionGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomConversionGoalOperation

A convenience method for creating an CustomConversionGoalOperation instance with its “update” field prepopulated with an CustomConversionGoal instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 4986

def self.custom_conversion_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/custom_conversion_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomConversionGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomConversionGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomConversionGoal === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomConversionGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomInterest| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomInterestOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomInterestOperation

A convenience method for creating an CustomInterestOperation instance with its “update” field prepopulated with an CustomInterest instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5961

def self.custom_interest(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/custom_interest_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomInterest
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomInterest.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomInterest === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomInterestOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Customer| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerOperation

A convenience method for creating an CustomerOperation instance with its “update” field prepopulated with an Customer instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5181

def self.customer(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Customer
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Customer.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Customer === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerAsset| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerAssetOperation

A convenience method for creating an CustomerAssetOperation instance with its “update” field prepopulated with an CustomerAsset instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5025

def self.customer_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerAsset === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

A convenience method for creating an CustomerClientLinkOperation instance with its “update” field prepopulated with an CustomerClientLink instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 6000

def self.customer_client_link(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_client_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerClientLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerClientLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerClientLink === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerClientLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerConversionGoal| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerConversionGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerConversionGoalOperation

A convenience method for creating an CustomerConversionGoalOperation instance with its “update” field prepopulated with an CustomerConversionGoal instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5064

def self.customer_conversion_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_conversion_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerConversionGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerConversionGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerConversionGoal === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerConversionGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerExtensionSetting| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerExtensionSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerExtensionSettingOperation

A convenience method for creating an CustomerExtensionSettingOperation instance with its “update” field prepopulated with an CustomerExtensionSetting instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5103

def self.customer_extension_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_extension_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerExtensionSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerExtensionSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerExtensionSetting === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerExtensionSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerFeed| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerFeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerFeedOperation

A convenience method for creating an CustomerFeedOperation instance with its “update” field prepopulated with an CustomerFeed instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5142

def self.customer_feed(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerFeed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerFeed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerFeed === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerFeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerLifecycleGoal| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerLifecycleGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerLifecycleGoalOperation

A convenience method for creating an CustomerLifecycleGoalOperation instance with its “update” field prepopulated with an CustomerLifecycleGoal instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 6039

def self.customer_lifecycle_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_lifecycle_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerLifecycleGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerLifecycleGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerLifecycleGoal === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerLifecycleGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

A convenience method for creating an CustomerManagerLinkOperation instance with its “update” field prepopulated with an CustomerManagerLink instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 6078

def self.customer_manager_link(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_manager_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerManagerLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerManagerLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerManagerLink === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerManagerLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerSkAdNetworkConversionValueSchema| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerSkAdNetworkConversionValueSchemaOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerSkAdNetworkConversionValueSchemaOperation

A convenience method for creating an CustomerSkAdNetworkConversionValueSchemaOperation instance with its “update” field prepopulated with an CustomerSkAdNetworkConversionValueSchema instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 6117

def self.customer_sk_ad_network_conversion_value_schema(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_sk_ad_network_conversion_value_schema_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerSkAdNetworkConversionValueSchema
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerSkAdNetworkConversionValueSchema.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerSkAdNetworkConversionValueSchema === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerSkAdNetworkConversionValueSchemaOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::CustomerUserAccess| ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerUserAccessOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::CustomerUserAccessOperation

A convenience method for creating an CustomerUserAccessOperation instance with its “update” field prepopulated with an CustomerUserAccess instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 6156

def self.customer_user_access(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/customer_user_access_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::CustomerUserAccess
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::CustomerUserAccess.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::CustomerUserAccess === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::CustomerUserAccessOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Experiment| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ExperimentOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ExperimentOperation

A convenience method for creating an ExperimentOperation instance with its “update” field prepopulated with an Experiment instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5259

def self.experiment(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/experiment_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Experiment
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Experiment.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Experiment === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ExperimentOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ExperimentArm| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ExperimentArmOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ExperimentArmOperation

A convenience method for creating an ExperimentArmOperation instance with its “update” field prepopulated with an ExperimentArm instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5220

def self.experiment_arm(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/experiment_arm_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ExperimentArm
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ExperimentArm.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ExperimentArm === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ExperimentArmOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::ExtensionFeedItem| ... } ⇒ Google::Ads::GoogleAds::V17::Services::ExtensionFeedItemOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::ExtensionFeedItemOperation

A convenience method for creating an ExtensionFeedItemOperation instance with its “update” field prepopulated with an ExtensionFeedItem instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5298

def self.extension_feed_item(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/extension_feed_item_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::ExtensionFeedItem
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::ExtensionFeedItem.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::ExtensionFeedItem === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::ExtensionFeedItemOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Feed| ... } ⇒ Google::Ads::GoogleAds::V17::Services::FeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::FeedOperation

A convenience method for creating an FeedOperation instance with its “update” field prepopulated with an Feed instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5415

def self.feed(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Feed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Feed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Feed === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::FeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::FeedItem| ... } ⇒ Google::Ads::GoogleAds::V17::Services::FeedItemOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::FeedItemOperation

A convenience method for creating an FeedItemOperation instance with its “update” field prepopulated with an FeedItem instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5337

def self.feed_item(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/feed_item_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::FeedItem
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::FeedItem.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::FeedItem === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::FeedItemOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::FeedItemSet| ... } ⇒ Google::Ads::GoogleAds::V17::Services::FeedItemSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::FeedItemSetOperation

A convenience method for creating an FeedItemSetOperation instance with its “update” field prepopulated with an FeedItemSet instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5376

def self.feed_item_set(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/feed_item_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::FeedItemSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::FeedItemSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::FeedItemSet === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::FeedItemSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::KeywordPlan| ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanOperation

A convenience method for creating an KeywordPlanOperation instance with its “update” field prepopulated with an KeywordPlan instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5610

def self.keyword_plan(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/keyword_plan_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::KeywordPlan
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::KeywordPlan.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::KeywordPlan === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::KeywordPlanOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroup| ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanAdGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanAdGroupOperation

A convenience method for creating an KeywordPlanAdGroupOperation instance with its “update” field prepopulated with an KeywordPlanAdGroup instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5493

def self.keyword_plan_ad_group(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/keyword_plan_ad_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroup === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::KeywordPlanAdGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroupKeyword| ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanAdGroupKeywordOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanAdGroupKeywordOperation

A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with its “update” field prepopulated with an KeywordPlanAdGroupKeyword instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5454

def self.keyword_plan_ad_group_keyword(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/keyword_plan_ad_group_keyword_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroupKeyword
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroupKeyword.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::KeywordPlanAdGroupKeyword === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::KeywordPlanAdGroupKeywordOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaign| ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanCampaignOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanCampaignOperation

A convenience method for creating an KeywordPlanCampaignOperation instance with its “update” field prepopulated with an KeywordPlanCampaign instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5571

def self.keyword_plan_campaign(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/keyword_plan_campaign_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaign
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaign.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaign === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::KeywordPlanCampaignOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaignKeyword| ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanCampaignKeywordOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::KeywordPlanCampaignKeywordOperation

A convenience method for creating an KeywordPlanCampaignKeywordOperation instance with its “update” field prepopulated with an KeywordPlanCampaignKeyword instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5532

def self.keyword_plan_campaign_keyword(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/keyword_plan_campaign_keyword_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaignKeyword
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaignKeyword.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::KeywordPlanCampaignKeyword === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::KeywordPlanCampaignKeywordOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::Label| ... } ⇒ Google::Ads::GoogleAds::V17::Services::LabelOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::LabelOperation

A convenience method for creating an LabelOperation instance with its “update” field prepopulated with an Label instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5649

def self.label(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/label_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::Label
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::Label.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::Label === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::LabelOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::RecommendationSubscription| ... } ⇒ Google::Ads::GoogleAds::V17::Services::RecommendationSubscriptionOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::RecommendationSubscriptionOperation

A convenience method for creating an RecommendationSubscriptionOperation instance with its “update” field prepopulated with an RecommendationSubscription instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5688

def self.recommendation_subscription(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/recommendation_subscription_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::RecommendationSubscription
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::RecommendationSubscription.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::RecommendationSubscription === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::RecommendationSubscriptionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::RemarketingAction| ... } ⇒ Google::Ads::GoogleAds::V17::Services::RemarketingActionOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::RemarketingActionOperation

A convenience method for creating an RemarketingActionOperation instance with its “update” field prepopulated with an RemarketingAction instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5727

def self.remarketing_action(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/remarketing_action_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::RemarketingAction
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::RemarketingAction.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::RemarketingAction === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::RemarketingActionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::SharedSet| ... } ⇒ Google::Ads::GoogleAds::V17::Services::SharedSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::SharedSetOperation

A convenience method for creating an SharedSetOperation instance with its “update” field prepopulated with an SharedSet instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5766

def self.shared_set(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/shared_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::SharedSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::SharedSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::SharedSet === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::SharedSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::SmartCampaignSetting| ... } ⇒ Google::Ads::GoogleAds::V17::Services::SmartCampaignSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::SmartCampaignSettingOperation

A convenience method for creating an SmartCampaignSettingOperation instance with its “update” field prepopulated with an SmartCampaignSetting instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5805

def self.smart_campaign_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/smart_campaign_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::SmartCampaignSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::SmartCampaignSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::SmartCampaignSetting === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::SmartCampaignSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V17::Resources::UserList| ... } ⇒ Google::Ads::GoogleAds::V17::Services::UserListOperation . { ... } ⇒ Google::Ads::GoogleAds::V17::Services::UserListOperation

A convenience method for creating an UserListOperation instance with its “update” field prepopulated with an UserList instance, and its “update_mask” field populated as needed to send the updates to the API.

Overloads:



5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
# File 'lib/google/ads/google_ads/factories/v17/operations.rb', line 5844

def self.user_list(resource_or_path, &blk)
  require "google/ads/google_ads/v17/services/user_list_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V17::Resources::UserList
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V17::Resources::UserList.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V17::Resources::UserList === res
      raise ArgumentError.new(
        "Called #{__method__} with instance of wrong type:" \
        " #{res.class} want #{operation.update_class}" \
        " or String representing resource name"
      )
    end
  end

  op = Google::Ads::GoogleAds::V17::Services::UserListOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end