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

Defined in:
lib/google/ads/google_ads/factories/v14/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:



3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3551

def self.(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/account_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AccountLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AccountLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AccountLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Ad| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3902

def self.ad(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Ad
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Ad.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroup| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3824

def self.ad_group(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroupAd| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupAdOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3590

def self.ad_group_ad(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_ad_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroupAd
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroupAd.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupAdOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroupAsset| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3629

def self.ad_group_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroupAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroupAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroupBidModifier| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupBidModifierOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3668

def self.ad_group_bid_modifier(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_bid_modifier_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroupBidModifier
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroupBidModifier.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupBidModifierOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroupCriterion| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupCriterionOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3707

def self.ad_group_criterion(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_criterion_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroupCriterion
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroupCriterion.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupCriterionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroupExtensionSetting| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupExtensionSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3746

def self.ad_group_extension_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_extension_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroupExtensionSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroupExtensionSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupExtensionSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdGroupFeed| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdGroupFeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3785

def self.ad_group_feed(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_group_feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdGroupFeed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdGroupFeed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdGroupFeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AdParameter| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AdParameterOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3863

def self.ad_parameter(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/ad_parameter_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AdParameter
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AdParameter.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AdParameterOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Asset| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4058

def self.asset(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Asset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Asset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AssetGroup| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AssetGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4019

def self.asset_group(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/asset_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AssetGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AssetGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AssetGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AssetGroupAsset| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AssetGroupAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3941

def self.asset_group_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/asset_group_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AssetGroupAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AssetGroupAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AssetGroupAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AssetGroupListingGroupFilter| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AssetGroupListingGroupFilterOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 3980

def self.asset_group_listing_group_filter(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/asset_group_listing_group_filter_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AssetGroupListingGroupFilter
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AssetGroupListingGroupFilter.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AssetGroupListingGroupFilterOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::AssetSet| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AssetSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4097

def self.asset_set(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/asset_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::AssetSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::AssetSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AssetSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Audience| ... } ⇒ Google::Ads::GoogleAds::V14::Services::AudienceOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4136

def self.audience(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/audience_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Audience
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Audience.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::AudienceOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::BiddingDataExclusion| ... } ⇒ Google::Ads::GoogleAds::V14::Services::BiddingDataExclusionOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4175

def self.bidding_data_exclusion(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/bidding_data_exclusion_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::BiddingDataExclusion
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::BiddingDataExclusion.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::BiddingDataExclusionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::BiddingSeasonalityAdjustment| ... } ⇒ Google::Ads::GoogleAds::V14::Services::BiddingSeasonalityAdjustmentOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4214

def self.bidding_seasonality_adjustment(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/bidding_seasonality_adjustment_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::BiddingSeasonalityAdjustment
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::BiddingSeasonalityAdjustment.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::BiddingSeasonalityAdjustmentOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::BiddingStrategy| ... } ⇒ Google::Ads::GoogleAds::V14::Services::BiddingStrategyOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4253

def self.bidding_strategy(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/bidding_strategy_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::BiddingStrategy
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::BiddingStrategy.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::BiddingStrategyOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Campaign| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4643

def self.campaign(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Campaign
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Campaign.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignAsset| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4292

def self.campaign_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignAssetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignBidModifier| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignBidModifierOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4331

def self.campaign_bid_modifier(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_bid_modifier_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignBidModifier
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignBidModifier.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignBidModifierOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignBudget| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignBudgetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4370

def self.campaign_budget(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_budget_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignBudget
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignBudget.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignBudgetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignConversionGoal| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignConversionGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4409

def self.campaign_conversion_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_conversion_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignConversionGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignConversionGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignConversionGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignCriterion| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignCriterionOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4448

def self.campaign_criterion(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_criterion_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignCriterion
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignCriterion.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignCriterionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignDraft| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignDraftOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4487

def self.campaign_draft(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_draft_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignDraft
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignDraft.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignDraftOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignExtensionSetting| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignExtensionSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4526

def self.campaign_extension_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_extension_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignExtensionSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignExtensionSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignExtensionSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignFeed| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignFeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4565

def self.campaign_feed(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignFeed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignFeed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignFeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CampaignGroup| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CampaignGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4604

def self.campaign_group(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/campaign_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CampaignGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CampaignGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CampaignGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ConversionAction| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ConversionActionOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4682

def self.conversion_action(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/conversion_action_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ConversionAction
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ConversionAction.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ConversionActionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ConversionCustomVariable| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ConversionCustomVariableOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4721

def self.conversion_custom_variable(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/conversion_custom_variable_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ConversionCustomVariable
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ConversionCustomVariable.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ConversionCustomVariableOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ConversionGoalCampaignConfig| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ConversionGoalCampaignConfigOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4760

def self.conversion_goal_campaign_config(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/conversion_goal_campaign_config_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ConversionGoalCampaignConfig
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ConversionGoalCampaignConfig.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ConversionGoalCampaignConfigOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ConversionValueRule| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ConversionValueRuleOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4799

def self.conversion_value_rule(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/conversion_value_rule_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ConversionValueRule
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ConversionValueRule.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ConversionValueRuleOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ConversionValueRuleSet| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ConversionValueRuleSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4838

def self.conversion_value_rule_set(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/conversion_value_rule_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ConversionValueRuleSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ConversionValueRuleSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ConversionValueRuleSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomAudience| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomAudienceOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5735

def self.custom_audience(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/custom_audience_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomAudience
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomAudience.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomAudienceOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomConversionGoal| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomConversionGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4877

def self.custom_conversion_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/custom_conversion_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomConversionGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomConversionGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomConversionGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomInterest| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomInterestOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5774

def self.custom_interest(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/custom_interest_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomInterest
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomInterest.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomInterestOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Customer| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5072

def self.customer(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Customer
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Customer.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomerAsset| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerAssetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4916

def self.customer_asset(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_asset_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerAsset
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerAsset.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::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:



5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5813

def self.customer_client_link(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_client_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerClientLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerClientLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerClientLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomerConversionGoal| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerConversionGoalOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4955

def self.customer_conversion_goal(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_conversion_goal_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerConversionGoal
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerConversionGoal.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerConversionGoalOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomerExtensionSetting| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerExtensionSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 4994

def self.customer_extension_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_extension_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerExtensionSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerExtensionSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerExtensionSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomerFeed| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerFeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5033

def self.customer_feed(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerFeed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerFeed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerFeedOperation.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:



5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5852

def self.customer_manager_link(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_manager_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerManagerLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerManagerLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerManagerLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomerSkAdNetworkConversionValueSchema| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerSkAdNetworkConversionValueSchemaOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5891

def self.customer_sk_ad_network_conversion_value_schema(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_sk_ad_network_conversion_value_schema_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerSkAdNetworkConversionValueSchema
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerSkAdNetworkConversionValueSchema.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerSkAdNetworkConversionValueSchemaOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::CustomerUserAccess| ... } ⇒ Google::Ads::GoogleAds::V14::Services::CustomerUserAccessOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5930

def self.customer_user_access(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/customer_user_access_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::CustomerUserAccess
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::CustomerUserAccess.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::CustomerUserAccessOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Experiment| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ExperimentOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5150

def self.experiment(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/experiment_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Experiment
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Experiment.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ExperimentOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ExperimentArm| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ExperimentArmOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5111

def self.experiment_arm(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/experiment_arm_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ExperimentArm
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ExperimentArm.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ExperimentArmOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::ExtensionFeedItem| ... } ⇒ Google::Ads::GoogleAds::V14::Services::ExtensionFeedItemOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5189

def self.extension_feed_item(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/extension_feed_item_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::ExtensionFeedItem
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::ExtensionFeedItem.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::ExtensionFeedItemOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Feed| ... } ⇒ Google::Ads::GoogleAds::V14::Services::FeedOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5306

def self.feed(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/feed_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Feed
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Feed.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::FeedOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::FeedItem| ... } ⇒ Google::Ads::GoogleAds::V14::Services::FeedItemOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5228

def self.feed_item(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/feed_item_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::FeedItem
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::FeedItem.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::FeedItemOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::FeedItemSet| ... } ⇒ Google::Ads::GoogleAds::V14::Services::FeedItemSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5267

def self.feed_item_set(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/feed_item_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::FeedItemSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::FeedItemSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::FeedItemSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::KeywordPlan| ... } ⇒ Google::Ads::GoogleAds::V14::Services::KeywordPlanOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5501

def self.keyword_plan(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/keyword_plan_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::KeywordPlan
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::KeywordPlan.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::KeywordPlanOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::KeywordPlanAdGroup| ... } ⇒ Google::Ads::GoogleAds::V14::Services::KeywordPlanAdGroupOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5384

def self.keyword_plan_ad_group(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/keyword_plan_ad_group_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::KeywordPlanAdGroup
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::KeywordPlanAdGroup.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::KeywordPlanAdGroupOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::KeywordPlanAdGroupKeyword| ... } ⇒ Google::Ads::GoogleAds::V14::Services::KeywordPlanAdGroupKeywordOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5345

def self.keyword_plan_ad_group_keyword(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/keyword_plan_ad_group_keyword_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::KeywordPlanAdGroupKeyword
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::KeywordPlanAdGroupKeyword.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::KeywordPlanAdGroupKeywordOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::KeywordPlanCampaign| ... } ⇒ Google::Ads::GoogleAds::V14::Services::KeywordPlanCampaignOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5462

def self.keyword_plan_campaign(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/keyword_plan_campaign_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::KeywordPlanCampaign
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::KeywordPlanCampaign.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::KeywordPlanCampaignOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::KeywordPlanCampaignKeyword| ... } ⇒ Google::Ads::GoogleAds::V14::Services::KeywordPlanCampaignKeywordOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5423

def self.keyword_plan_campaign_keyword(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/keyword_plan_campaign_keyword_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::KeywordPlanCampaignKeyword
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::KeywordPlanCampaignKeyword.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::KeywordPlanCampaignKeywordOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::Label| ... } ⇒ Google::Ads::GoogleAds::V14::Services::LabelOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5540

def self.label(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/label_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::Label
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::Label.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::LabelOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

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

Overloads:



5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5969

def self.merchant_center_link(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/merchant_center_link_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::MerchantCenterLink
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::MerchantCenterLink.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::Resources::MerchantCenterLink === 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::V14::Services::MerchantCenterLinkOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::RemarketingAction| ... } ⇒ Google::Ads::GoogleAds::V14::Services::RemarketingActionOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5579

def self.remarketing_action(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/remarketing_action_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::RemarketingAction
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::RemarketingAction.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::RemarketingActionOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::SharedSet| ... } ⇒ Google::Ads::GoogleAds::V14::Services::SharedSetOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5618

def self.shared_set(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/shared_set_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::SharedSet
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::SharedSet.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::SharedSetOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::SmartCampaignSetting| ... } ⇒ Google::Ads::GoogleAds::V14::Services::SmartCampaignSettingOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5657

def self.smart_campaign_setting(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/smart_campaign_setting_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::SmartCampaignSetting
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::SmartCampaignSetting.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::SmartCampaignSettingOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end

. {|Google::Ads::GoogleAds::V14::Resources::UserList| ... } ⇒ Google::Ads::GoogleAds::V14::Services::UserListOperation . { ... } ⇒ Google::Ads::GoogleAds::V14::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:



5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
# File 'lib/google/ads/google_ads/factories/v14/operations.rb', line 5696

def self.user_list(resource_or_path, &blk)
  require "google/ads/google_ads/v14/services/user_list_service_pb"
  res = case resource_or_path
  when Google::Ads::GoogleAds::V14::Resources::UserList
    resource_or_path
  # got a resource path
  when String
    obj = Google::Ads::GoogleAds::V14::Resources::UserList.new
    obj.resource_name = resource_or_path
    obj
  else
    unless Google::Ads::GoogleAds::V14::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::V14::Services::UserListOperation.new
  op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk)
  op["update"] = res
  op
end