AdWords API Re: api class-fieldsspecification

2009-08-05 Thread Harutyun Terteryan
Hi,
I have my own value objects for all adword .net api classes.
 in that case is it correct to set fieldnamespecified = true in
corresponding field.
For example in AdGroup
  public AdGroupStatus Status
{
get { return _status; }
set
{
_status = value;
_statusSpecified = true;
}
}
is it covers all cases?


Best regards
Harut.

On Tue, Aug 4, 2009 at 12:38 PM, Harutyun Terteryan harr...@gmail.comwrote:

 Ok

 Thank's for quick answer :).

 Best
 Harut.


 On Tue, Aug 4, 2009 at 12:22 PM, AdWords API Advisor 
 adwordsapiadvi...@google.com wrote:


 Hi Harut,

 statusSpecified and status are independent properties of AdGroup
 objects, setting value for one property does not affect the value of
 the other property. However, they work together when you make an
 AdWords API call. For instance, assume that you are trying to Enable a
 Paused AdGroup.

 //retrieve the adgroup.
 ...

 adGroup.statusSpecified = false; //statusSpecified is now false
 adGroup.status = AdGroupStatus.Enabled; //status is now Enabled.

 //this API call will not update the adgroup status, since
 //statusSpecified = false causes the SOAP framework to ignore
 //the new status while making API calls.

 adGroupService.updateAdGroup(adGroup);

 //however, this call will update the adgroup status.
 adGroup.statusSpecified = true;
 adGroup.status = AdGroupStatus.Enabled;
 adGroupService.updateAdGroup(adGroup);

 Regards,
 Anash P. Oommen, AdWords API Team.


 On Aug 4, 9:20 am, Harutyun Terteryan harr...@gmail.com wrote:
  Hi Anash
 
  Did you mean that if I set the value like this
   adGroup.statusSpecified = default value(false);
  then even when I set the value of
  adGroup.status = AdGroupStatus.Enabled;
 
  adGroup.status will be equals its dafault value?
 
  Best
  Harut.
 
  On Mon, Aug 3, 2009 at 10:20 PM, AdWords API Advisor 
 
  adwordsapiadvi...@google.com wrote:
 
   Hi Harut,
 
   I assume you are writing .NET code. .NET's WSDL to code converter
   generates an additional field named like propertyNameSpecified if it
   encounters a nilable value type in WSDL. While setting values to such
   a field, you also have to mention serviceName.propertyNameSpecified =
   true. If not, the value you set to the field will be ignored by the
   SOAP library.
 
   For instance, this is how you can set an AdGroup's status.
 
   adGroup.statusSpecified = true;
   adGroup.status = AdGroupStatus.Enabled;
 
   Regards,
   Anash P. Oommen, AdWords API Team.
 
   On Aug 3, 5:24 pm, Harutyun Terteryan harr...@gmail.com wrote:
Hi
 
Why we need and when can be used fields specification(f.i
AdGroup.statusSpecified, and so on...) ?
What if I don't set any specification ?
 
Thank's in advance
 
Harut.
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: api class-fieldsspecification

2009-08-04 Thread AdWords API Advisor

Hi Harut,

statusSpecified and status are independent properties of AdGroup
objects, setting value for one property does not affect the value of
the other property. However, they work together when you make an
AdWords API call. For instance, assume that you are trying to Enable a
Paused AdGroup.

//retrieve the adgroup.
...

adGroup.statusSpecified = false; //statusSpecified is now false
adGroup.status = AdGroupStatus.Enabled; //status is now Enabled.

//this API call will not update the adgroup status, since
//statusSpecified = false causes the SOAP framework to ignore
//the new status while making API calls.

adGroupService.updateAdGroup(adGroup);

//however, this call will update the adgroup status.
adGroup.statusSpecified = true;
adGroup.status = AdGroupStatus.Enabled;
adGroupService.updateAdGroup(adGroup);

Regards,
Anash P. Oommen, AdWords API Team.


On Aug 4, 9:20 am, Harutyun Terteryan harr...@gmail.com wrote:
 Hi Anash

 Did you mean that if I set the value like this
  adGroup.statusSpecified = default value(false);
 then even when I set the value of
 adGroup.status = AdGroupStatus.Enabled;

 adGroup.status will be equals its dafault value?

 Best
 Harut.

 On Mon, Aug 3, 2009 at 10:20 PM, AdWords API Advisor 

 adwordsapiadvi...@google.com wrote:

  Hi Harut,

  I assume you are writing .NET code. .NET's WSDL to code converter
  generates an additional field named like propertyNameSpecified if it
  encounters a nilable value type in WSDL. While setting values to such
  a field, you also have to mention serviceName.propertyNameSpecified =
  true. If not, the value you set to the field will be ignored by the
  SOAP library.

  For instance, this is how you can set an AdGroup's status.

  adGroup.statusSpecified = true;
  adGroup.status = AdGroupStatus.Enabled;

  Regards,
  Anash P. Oommen, AdWords API Team.

  On Aug 3, 5:24 pm, Harutyun Terteryan harr...@gmail.com wrote:
   Hi

   Why we need and when can be used fields specification(f.i
   AdGroup.statusSpecified, and so on...) ?
   What if I don't set any specification ?

   Thank's in advance

   Harut.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---