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

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



3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3537

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

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



3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3888

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

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



3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3810

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

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



3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3576

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

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



3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3615

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

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



3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3654

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

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



3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3693

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

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



3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3732

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

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



3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3771

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

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



3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3849

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

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



4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4044

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

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



4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4005

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

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



3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3927

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

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



3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 3966

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

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



4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4083

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

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



4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4122

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

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



4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4161

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

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



4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4200

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

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



4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4239

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

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



4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4629

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

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



4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4278

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

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



4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4317

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

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



4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4356

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

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



4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4395

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

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



4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4434

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

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



4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4473

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

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



4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4512

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

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



4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4551

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

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



4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4590

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

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



4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4668

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

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



4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4707

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

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



4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4746

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

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



4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4785

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

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



4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4824

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

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



5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5721

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

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



4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4863

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

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



5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5760

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

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



5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5058

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

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



4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4902

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



5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5799

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

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



4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4941

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

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



4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 4980

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

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



5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5019

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



5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5838

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

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



5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5877

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

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



5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5136

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

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



5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5097

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

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



5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5175

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

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



5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5292

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

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



5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5214

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

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



5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5253

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

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



5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5487

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

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



5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5370

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

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



5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5331

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

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



5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5448

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

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



5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5409

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

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



5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5526

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



5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5916

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

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



5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5565

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

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



5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5604

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

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



5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5643

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

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



5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
# File 'lib/google/ads/google_ads/factories/v12/operations.rb', line 5682

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