// Update payload{"costMicros":1250000,"cost":{"currencyCode":"USD","units":"1","nanos":500000000}}// Response payload{"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"costMicros","description":"Cannot update both costMicros and cost."}]}]}}
已停用的功能
如果某项产品功能不再提供,相应字段将被标记为
且可能返回语义上适当的默认值。最新动态
可以忽略。
{// The salesperson split amount in micros.// Deprecated: The Sales Management feature has been deprecated. This field// will always be `0`."salespersonSplitMicros":number,}
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Ad Manager API utilizes Major version releases for backward-incompatible changes and in-place releases for backward-compatible updates within a Major version.\u003c/p\u003e\n"],["\u003cp\u003eDeprecated services, methods, and fields will remain functional until the Major version they belong to is retired, although breaking changes might occur during the Beta phase.\u003c/p\u003e\n"],["\u003cp\u003eBackward compatibility within a Major version is ensured for source, wire, and semantic compatibility to minimize disruptions for existing integrations.\u003c/p\u003e\n"],["\u003cp\u003eWhile adding new services, methods, and optional fields is backward compatible, removing or significantly altering existing elements is generally not, requiring careful consideration during upgrades.\u003c/p\u003e\n"],["\u003cp\u003eDeprecated fields might have replacements, and in such cases, either the original or the replacement field can be used, but using both simultaneously will result in an error.\u003c/p\u003e\n"]]],["The Ad Manager API has major version releases with backward-incompatible changes and in-place releases for backward-compatible changes. Within a major version, services, methods, and fields can be deprecated but remain supported until that version's retirement. Backward compatibility ensures code compiles, communicates correctly, and receives expected results. Adding new services, methods, or optional fields is backward compatible, while removing services, methods, adding required fields, or changing field types is not. Deprecated fields might be replaced, with both the old and new fields populated. Discontinued feature fields will return default values and updates may be ignored.\n"],null,["# Versioning\n\nThe Ad Manager API has both named Major version releases and\nbackward compatible in-place releases to the current Major version.\n\nServices, methods, and fields could be marked as deprecated at any time within a\nMajor version (e.g. v1), however, they will remain supported until that Major\nversion is retired.\n| **Caution:** While the Ad Manager API is in Beta, breaking changes could be introduced. Google will endeavor to provide notice 30 days before making breaking changes.\n\nMajor version releases\n----------------------\n\nA Major version release is defined as a release with backward incompatible\nAPI changes. These releases will be named and have different API endpoints.\nPrevious Major versions are supported for a migration period.\n\nThe Ad Manager API does not have a regular release cadence for Major\nversions. New Major versions will only be released when necessary.\n\nIn-place releases\n-----------------\n\nBackward compatible changes including new features and bug fixes are released\nin-place to the current Major API version. Clients must handle unknown fields\nin API responses.\n\nBackward Compatibility\n----------------------\n\nBackward compatibility is maintained for changes within a Major version.\nCompatibility is defined as:\n\n1. Source compatibility: Code written against a previous release compiles\n against a newer release, and successfully runs with a newer version of the\n client library.\n\n2. Wire compatibility: Code written against a previous release\n communicates correctly with a newer server. In other words, not only are inputs\n and outputs compatible, but the serialization and deserialization expectations\n continue to match.\n\n3. Semantic compatibility: Code written against a previous version continues\n to receive what most reasonable developers would expect.\n\nThe following tables enumerate types of API changes and if they are considered\nbackward compatible.\n\n### Services\n\n| Type of Change | Backward compatible |\n|-------------------|---------------------|\n| Add a new service | Yes |\n| Remove a service | No |\n\n### Methods\n\n| Type of Change | Backward compatible |\n|--------------------------------------------|---------------------|\n| Add a new method | Yes |\n| Remove a method | No |\n| Change a method's request or response type | No |\n\n### Objects\n\n| Type of Change | Backward compatible |\n|--------------------------------------------|---------------------|\n| Add a required field | No |\n| Add an optional field | Yes |\n| Moving a field into or out of a submessage | No |\n| Change a field from required to optional | Yes |\n| Change a field from optional to required | No |\n| Remove an immutable restriction | Yes |\n| Add an immutable restriction | No |\n\n### Enumerations\n\n| Type of Change | Backward compatible |\n|----------------------|---------------------|\n| Add an enum value | Yes |\n| Remove an enum value | No |\n\nDeprecated field behavior\n-------------------------\n\n#### Replacement fields\n\nFor fields that have a replacement, both fields will be populated when feasible.\nWhen updating, either field can be set. Including both fields in an update\nrequest results in an `INVALID_ARGUMENT` error.\n\nConsider the following schema: \n\n {\n // The cost of this Foo in micros.\n // Deprecated: Use `cost` instead.\n \"costMicros\": number,\n\n // The cost of this Foo.\n \"cost\": {\n object (Money)\n }\n }\n\nA read response populates both fields with equivalent values: \n\n {\n \"costMicros\": 1250000,\n \"cost\": {\n \"currencyCode\": \"USD\",\n \"units\": \"1\",\n \"nanos\": 250000000\n }\n }\n\nUpdate requests can set either value. Including both fields results in an\n`INVALID_ARGUMENT` error: \n\n### costMicros\n\n // Update payload\n {\n \"costMicros\": 1500000\n }\n\n // Response payload\n {\n \"costMicros\": 1500000,\n \"cost\": {\n \"currencyCode\": \"USD\",\n \"units\": \"1\",\n \"nanos\": 500000000\n }\n }\n\n### cost\n\n // Update payload\n {\n \"cost\": {\n \"currencyCode\": \"USD\",\n \"units\": \"1\",\n \"nanos\": 500000000\n }\n }\n\n // Response payload\n {\n \"costMicros\": 1500000,\n \"cost\": {\n \"currencyCode\": \"USD\",\n \"units\": \"1\",\n \"nanos\": 500000000\n }\n }\n\n### Both\n\n // Update payload\n {\n \"costMicros\": 1250000,\n \"cost\": {\n \"currencyCode\": \"USD\",\n \"units\": \"1\",\n \"nanos\": 500000000\n }\n }\n\n // Response payload\n {\n \"error\": {\n \"code\": 400,\n \"message\": \"Request contains an invalid argument.\",\n \"status\": \"INVALID_ARGUMENT\",\n \"details\": [\n {\n \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n \"fieldViolations\": [\n {\n \"field\": \"costMicros\",\n \"description\": \"Cannot update both costMicros and cost.\"\n }\n ]\n }\n ]\n }\n }\n\n#### Discontinued features\n\nIf a product feature is discontinued, corresponding fields will be marked as\ndeprecated and may return a semantically appropriate default value. Updates\ncan be ignored. \n\n {\n // The salesperson split amount in micros.\n // Deprecated: The Sales Management feature has been deprecated. This field\n // will always be `0`.\n \"salespersonSplitMicros\": number,\n }"]]